1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

we need to refuse a root_fid in rename on SMB but not SMB2

(This used to be commit 9a139c35b7)
This commit is contained in:
Andrew Tridgell 2008-02-14 12:50:11 +11:00
parent 839ab724dc
commit 039f85835d

View File

@ -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 */