summaryrefslogtreecommitdiff
path: root/source4/ntvfs/simple/vfs_simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/simple/vfs_simple.c')
-rw-r--r--source4/ntvfs/simple/vfs_simple.c10
1 files changed, 7 insertions, 3 deletions
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);