summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-06-14 14:45:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:22 -0500
commit9c4d185ef0740ea31da8718b9cb16dac7cddcc15 (patch)
treec90b8cf559d8254a39faff45ca4c8a98197f626a /source3/smbd/trans2.c
parentbca15dbc68d5804f528ee2897396c5b1f42c9ae6 (diff)
downloadsamba-9c4d185ef0740ea31da8718b9cb16dac7cddcc15.tar.gz
samba-9c4d185ef0740ea31da8718b9cb16dac7cddcc15.tar.bz2
samba-9c4d185ef0740ea31da8718b9cb16dac7cddcc15.zip
r23500: Two changes to survive the now activated test for rename_internals_fsp:
With the target being open we have to return NT_STATUS_ACCESS_DENIED and root_fid != 0 leads to NT_STATUS_INVALID_PARAMETER (This used to be commit b599e5b1e10bdf825b2ce53de4a6ec35726d00f6)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 429fdc154d..af6bc413d9 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -4611,7 +4611,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
pstring fname)
{
BOOL overwrite;
- /* uint32 root_fid; */ /* Not used */
+ uint32 root_fid;
uint32 len;
pstring newname;
pstring base_name;
@@ -4624,10 +4624,10 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
}
overwrite = (CVAL(pdata,0) ? True : False);
- /* root_fid = IVAL(pdata,4); */
+ root_fid = IVAL(pdata,4);
len = IVAL(pdata,8);
- if (len > (total_data - 12) || (len == 0)) {
+ if (len > (total_data - 12) || (len == 0) || (root_fid != 0)) {
return NT_STATUS_INVALID_PARAMETER;
}