summaryrefslogtreecommitdiff
path: root/source4/ntvfs/simple
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-13 16:04:21 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-13 16:04:21 +0000
commit75c0125fb71b0562e7bdd85c391764796b5f12f6 (patch)
treeb589d2e6bbc2c517a3f79790d0ed309ef79f7507 /source4/ntvfs/simple
parenta3b86fe170beb70ffab8585a276ca1648fffd454 (diff)
downloadsamba-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/simple')
-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);