From 103b1ead98ace55649ebba9276e2ee58ba0d9ff2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 16 Aug 2007 01:05:18 +0000 Subject: r24478: Check that NTrename also maps NT_STATUS_OBJECT_NAME_COLLISION to ERRDOS, ERRrename. Jeremy. (This used to be commit 7cc8be50b6c64bc1d0a3f43ab5d78a28260a3c93) --- source4/torture/raw/samba3misc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source4/torture/raw') 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); -- cgit