r20422: A torture test extension for Jeremy
authorVolker Lendecke <vlendec@samba.org>
Sat, 30 Dec 2006 17:39:27 +0000 (17:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:30:34 +0000 (14:30 -0500)
source/torture/basic/base.c

index 9d067b4df644f0e9720515d32239c072a96a720e..a2d9944ee8449e9e926f0ecb8c0702c20ccca0d1 100644 (file)
@@ -1519,6 +1519,32 @@ static BOOL torture_samba3_errorpaths(struct torture_context *tctx)
                goto fail;
        }
 
+       {
+               union smb_mkdir md;
+               md.t2mkdir.level = RAW_MKDIR_T2MKDIR;
+               md.t2mkdir.in.path = dname;
+               md.t2mkdir.in.num_eas = 0;
+               md.t2mkdir.in.eas = NULL;
+
+               status = smb_raw_mkdir(cli_nt->tree, &md);
+               if (!NT_STATUS_EQUAL(status,
+                                    NT_STATUS_OBJECT_NAME_COLLISION)) {
+                       torture_comment(
+                               tctx, "(%s) incorrect status %s should be "
+                               "NT_STATUS_OBJECT_NAME_COLLISION\n",
+                               __location__, nt_errstr(status));
+                       goto fail;
+               }
+               status = smb_raw_mkdir(cli_dos->tree, &md);
+               if (!NT_STATUS_EQUAL(status,
+                                    NT_STATUS_DOS(ERRDOS, ERRrename))) {
+                       torture_comment(tctx, "(%s) incorrect status %s "
+                                       "should be ERRDOS:ERRnoaccess\n",
+                                       __location__, nt_errstr(status));
+                       goto fail;
+               }
+       }
+
        io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY;
        status = smb_raw_open(cli_nt->tree, mem_ctx, &io);
        if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {