diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-08-13 16:04:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-08-13 16:04:21 +0000 |
commit | 75c0125fb71b0562e7bdd85c391764796b5f12f6 (patch) | |
tree | b589d2e6bbc2c517a3f79790d0ed309ef79f7507 /source4/ntvfs | |
parent | a3b86fe170beb70ffab8585a276ca1648fffd454 (diff) | |
download | samba-75c0125fb71b0562e7bdd85c391764796b5f12f6.tar.gz samba-75c0125fb71b0562e7bdd85c391764796b5f12f6.tar.bz2 samba-75c0125fb71b0562e7bdd85c391764796b5f12f6.zip |
- added SMBntrename test suite
- allow username of form DOMAIN\username or DOMAIN/username
- added ntrename to gentest
(This used to be commit 2b464472c17b791eb5b117f89d5aaea2bf60f6ad)
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); |