summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-08-16 01:05:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:55 -0500
commit103b1ead98ace55649ebba9276e2ee58ba0d9ff2 (patch)
tree55e430529fb2b65f1b45d656f99e7936ab1fa90e /source4/torture
parent255c24eb8f6a341dbb9453d48119d8d6399bed43 (diff)
downloadsamba-103b1ead98ace55649ebba9276e2ee58ba0d9ff2.tar.gz
samba-103b1ead98ace55649ebba9276e2ee58ba0d9ff2.tar.bz2
samba-103b1ead98ace55649ebba9276e2ee58ba0d9ff2.zip
r24478: Check that NTrename also maps NT_STATUS_OBJECT_NAME_COLLISION
to ERRDOS, ERRrename. Jeremy. (This used to be commit 7cc8be50b6c64bc1d0a3f43ab5d78a28260a3c93)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/samba3misc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index ded230a423..fe413495ea 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -549,9 +549,24 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
/* Try the rename test. */
{
union smb_rename io;
+ memset(&io, '\0', sizeof(io));
io.rename.in.pattern1 = fpath1;
io.rename.in.pattern2 = fpath;
+ /* Try with SMBmv rename. */
+ status = smb_raw_rename(cli_nt->tree, &io);
+ CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+ status = smb_raw_rename(cli_dos->tree, &io);
+ CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRrename));
+
+ /* Try with NT rename. */
+ io.generic.level = RAW_RENAME_NTRENAME;
+ io.ntrename.in.old_name = fpath1;
+ io.ntrename.in.new_name = fpath;
+ io.ntrename.in.attrib = 0;
+ io.ntrename.in.cluster_size = 0;
+ io.ntrename.in.flags = RENAME_FLAG_RENAME;
+
status = smb_raw_rename(cli_nt->tree, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
status = smb_raw_rename(cli_dos->tree, &io);