diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-02-14 12:50:11 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-02-14 12:50:11 +1100 |
commit | 039f85835d60ae48c4176891598cf24e18d0cd0a (patch) | |
tree | caaf935c9bae70e5ab6958d2dc1e537a10942048 /source4/ntvfs/posix | |
parent | 839ab724dc2d204bfbb0693aeed64f6f83a4266b (diff) | |
download | samba-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/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_setfileinfo.c | 8 |
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 */ |