diff options
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs/vfs_cifs.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/ipc/vfs_ipc.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/reference/vfs_ref.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/simple/vfs_simple.c | 10 |
4 files changed, 10 insertions, 6 deletions
diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 9a17336519..1afdb66a1c 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -424,7 +424,7 @@ static NTSTATUS cvfs_rmdir(struct request_context *req, struct smb_rmdir *rd) /* rename a set of files */ -static NTSTATUS cvfs_rename(struct request_context *req, struct smb_rename *ren) +static NTSTATUS cvfs_rename(struct request_context *req, union smb_rename *ren) { struct cvfs_private *private = req->conn->ntvfs_private; struct cli_request *c_req; diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index fe310d104e..b13c358dd5 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -114,7 +114,7 @@ static NTSTATUS ipc_rmdir(struct request_context *req, struct smb_rmdir *rd) /* rename a set of files */ -static NTSTATUS ipc_rename(struct request_context *req, struct smb_rename *ren) +static NTSTATUS ipc_rename(struct request_context *req, union smb_rename *ren) { return NT_STATUS_ACCESS_DENIED; } diff --git a/source4/ntvfs/reference/vfs_ref.c b/source4/ntvfs/reference/vfs_ref.c index b4fa2e61ff..13b4eb5fbc 100644 --- a/source4/ntvfs/reference/vfs_ref.c +++ b/source4/ntvfs/reference/vfs_ref.c @@ -378,7 +378,7 @@ static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd) /* rename a set of files */ -static NTSTATUS svfs_rename(struct request_context *req, struct smb_rename *ren) +static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren) { char *unix_path1, *unix_path2; diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index caf7732ac7..52e772af74 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -340,12 +340,16 @@ static NTSTATUS svfs_rmdir(struct request_context *req, struct smb_rmdir *rd) /* rename a set of files */ -static NTSTATUS svfs_rename(struct request_context *req, struct smb_rename *ren) +static NTSTATUS svfs_rename(struct request_context *req, union smb_rename *ren) { char *unix_path1, *unix_path2; - unix_path1 = svfs_unix_path(req, ren->in.pattern1); - unix_path2 = svfs_unix_path(req, ren->in.pattern2); + if (ren->generic.level != RAW_RENAME_RENAME) { + return NT_STATUS_INVALID_LEVEL; + } + + unix_path1 = svfs_unix_path(req, ren->rename.in.pattern1); + unix_path2 = svfs_unix_path(req, ren->rename.in.pattern2); if (rename(unix_path1, unix_path2) != 0) { return map_nt_error_from_unix(errno); |