summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-14 12:50:11 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-14 12:50:11 +1100
commit039f85835d60ae48c4176891598cf24e18d0cd0a (patch)
treecaaf935c9bae70e5ab6958d2dc1e537a10942048 /source4/ntvfs
parent839ab724dc2d204bfbb0693aeed64f6f83a4266b (diff)
downloadsamba-039f85835d60ae48c4176891598cf24e18d0cd0a.tar.gz
samba-039f85835d60ae48c4176891598cf24e18d0cd0a.tar.bz2
samba-039f85835d60ae48c4176891598cf24e18d0cd0a.zip
we need to refuse a root_fid in rename on SMB but not SMB2
(This used to be commit 9a139c35b7f1326616d26ce13bbdc7d6b22cd9b5)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 2a936ad8a7..ce977873c8 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -103,9 +103,11 @@ static NTSTATUS pvfs_setfileinfo_rename(struct pvfs_state *pvfs,
return NT_STATUS_INVALID_PARAMETER;
}
- /* w2k3 does not appear to allow relative rename */
- if (info->rename_information.in.root_fid != 0) {
- DEBUG(1,("WARNING: got invalid root_fid in rename_information.\n"));
+ /* w2k3 does not appear to allow relative rename. On SMB2, vista sends it sometimes,
+ but I suspect it is just uninitialised memory */
+ if (info->rename_information.in.root_fid != 0 &&
+ (req->ctx->protocol != PROTOCOL_SMB2)) {
+ return NT_STATUS_INVALID_PARAMETER;
}
/* construct the fully qualified windows name for the new file name */