Age | Commit message (Collapse) | Author | Files | Lines |
|
This caused the panics on the RAW-SETFILEINFO.RENAME test,
because we returned an empty strings.
The problem was:
ERROR: talloc_steal with references at ntvfs/posix/pvfs_setfileinfo.c:215
reference at ntvfs/posix/pvfs_resolve.c:799
metze
|
|
When the notify buffer overruns and there are no pending notify
requests, the notify buffer doesn't actually get destroyed, it just
gets put in a state where new notifies are discarded and the next
notify change request will return 0 changes.
|
|
|
|
This change brings ntvfs_connect into compliance with other ntvfs functions
which take an ntvfs module, an ntvfs request and an smb io union.
It now becomes the responsibility of ntvfs modules to examine
tcon->generic.level themselves and derive the share name and any other
options
directly; e.g.
const char *sharename;
switch (tcon->generic.level) {
case RAW_TCON_TCON:
sharename = tcon->tcon.in.service;
break;
case RAW_TCON_TCONX:
sharename = tcon->tconx.in.path;
break;
case RAW_TCON_SMB2:
default:
return NT_STATUS_INVALID_LEVEL;
}
if (strncmp(sharename, "\\\\", 2) == 0) {
char *p = strchr(sharename+2, '\\');
if (p) {
sharename = p + 1;
}
}
service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in
some of the tcon->..out values.
For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and
tcon->tconx.out.options
For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and
tcon->tcon.out.max_xmit
Thus the ntvfs_connect function for vfs modules may override these values
if desired, but are not required to.
ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type
fields, for RAW_TCON_TCONX, perhaps something like:
if (tcon->generic.level == RAW_TCON_TCONX) {
tcon->tconx.out.fs_type = ntvfs->ctx->fs_type;
tcon->tconx.out.dev_type = ntvfs->ctx->dev_type;
}
Signed-off-by: Sam Liddicott <sam@liddicott.com>
(I fixed the ntvfs_connect() in the smb_server/smb2/
and the RAW_TCON_SMB2 switch case in the modules)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
Separate again the public from the private headers.
Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
|
|
This allows the RAW-STREAMS test to work again. We still have some
limitations though:
- renames of a stream to the default stream doesn't work
- delete on close handling between streams and the main file
is still broken
|
|
metze
|
|
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"
for s in $list; do
o=`echo $s | cut -d ':' -f1`
n=`echo $s | cut -d ':' -f2`
r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
for f in $files; do
cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
mv $f.tmp $f
done
done
metze
|
|
metze
|
|
|
|
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'
metze
|
|
metze
|
|
metze
|
|
metze
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metze
(This used to be commit 3c6cadf76861d6522c5ec41953df1ba2fac4910d)
|
|
(This used to be commit 4f6646f06988b1fb8be9e0c8ae833bb9792184af)
|
|
(This used to be commit 341f64834e13cdbc7d4742a4652ae39b70a4231f)
|
|
Also in particular the 'sync' flags (which Samba has traditionally
ignored).
Thanks to Olivier Salamin <olivier.salamin@gmail.com> for pointing out
more flags that needed to be handled.
Andrew Bartlett
(This used to be commit 370bb39cd79fe49efd36a1ceb3e896d386e6d3ce)
|
|
The MS-SMB document explains that some of these options should be
ignored. The test proves it.
/* Must be ignored by the server, per MS-SMB 2.2.8 */
/* Must be ignored by the server, per MS-SMB 2.2.8 */
If we implement HSM in samba4 (likely) we should honour this bit.
/* Don't pull this file off tape in a HSM system */
Andrew Bartlett
(This used to be commit 502739ff90d56d2c9aabe8e224317f6ceb175c17)
|
|
That means that the pvfs_acl implementations no longer register
as ntvfs modules (which was wrong)
metze
(This used to be commit 89e90556ec57fce24faf0ed3d6fe262edd974b28)
|
|
metze
(This used to be commit c904e28bef95cb0d61bf86f2ba1cef2d4e018d5f)
|
|
(This used to be commit 9d74201e462f2f95ed5bd91200681db3bd2a9277)
|
|
Note: that libreplace always provides utimes()
metze
(This used to be commit 61bad69e2d7f84e2c6d6fb82917cfa86b17f54b0)
|
|
metze
(This used to be commit 7f033ce4fb6fc897f8159926d5a6d2e45dd447b6)
|
|
metze
(This used to be commit 58c118ab4d2b76c4ea68d79b711b81900634f767)
|
|
metze
(This used to be commit 418e2592b48d558ff1d32031d64263ae21cf1eb0)
|
|
metze
(This used to be commit c8e15d4c185f18322a882aa908939fa9d0e341a0)
|
|
metze
(This used to be commit c3ba19ca62affced96b927fcbe63cf5d075aed22)
|
|
By default get the current write time from the opendb,
but allow callers to pass PVFS_RESOLVE_NO_OPENDB
for performance reasons, if they don't need to the write time.
metze
(This used to be commit def52cc0988c26a815e74b3391e5857512408d90)
|
|
metze
(This used to be commit 3868d8ce630c71e2c70aae442fcdbd68ba1eb708)
|
|
(This used to be commit 85d1873ee92fcc7df3addc42ddb8189144901f8b)
|
|
The UNLOCK bit is only used from the first lock structure
(This used to be commit 9483b7c137b61d3029a1e1e7d8d8d0723b541129)
|
|
(This used to be commit c50e7a15f9a7f2c5821b5ee468f9ade6eaa0ed55)
|
|
(This used to be commit 1dfa50a48040bdc1166be2dbe1063fd8a79166f8)
|
|
(This used to be commit b1d2d388ecff96dfcc17da24796f36c40cbb3eed)
|