Now ACL inheritance flags are working, add test_inheritance_flags() back into raw...
authorJeremy Allison <jra@samba.org>
Wed, 29 Aug 2012 22:18:19 +0000 (15:18 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 30 Aug 2012 18:01:30 +0000 (11:01 -0700)
source4/torture/raw/acls.c

index 01ee8be6a9f1da3addbd08bf47b904abe2591642..0342bf9b5d9e6936f571ceeb1d9353b0db989abb 100644 (file)
@@ -1846,7 +1846,6 @@ done:
        return ret;
 }
 
-#if 0
 static bool test_inheritance_flags(struct torture_context *tctx,
     struct smbcli_state *cli)
 {
@@ -1867,7 +1866,7 @@ static bool test_inheritance_flags(struct torture_context *tctx,
                uint32_t parent_get_ace_inherit;
                uint32_t child_get_sd_type;
                uint32_t child_get_ace_inherit;
-       } tflags[16]; /* 2^4 */
+       } tflags[16] = {{0}}; /* 2^4 */
 
        for (i = 0; i < 15; i++) {
                torture_comment(tctx, "i=%d:", i);
@@ -1926,6 +1925,8 @@ static bool test_inheritance_flags(struct torture_context *tctx,
 
        torture_comment(tctx, "TESTING ACL INHERITANCE FLAGS\n");
 
+       ZERO_STRUCT(io);
+
        io.generic.level = RAW_OPEN_NTCREATEX;
        io.ntcreatex.in.root_fid.fnum = 0;
        io.ntcreatex.in.flags = 0;
@@ -2072,9 +2073,15 @@ done:
        smbcli_close(cli->tree, fnum);
        smb_raw_exit(cli->session);
        smbcli_deltree(cli->tree, BASEDIR);
+
+       if (!ret) {
+               torture_result(tctx,
+                       TORTURE_FAIL, "(%s) test_inheritance_flags\n",
+                       __location__);
+       }
+
        return ret;
 }
-#endif
 
 /*
   test dynamic acl inheritance
@@ -2456,9 +2463,7 @@ struct torture_suite *torture_raw_acls(TALLOC_CTX *mem_ctx)
        torture_suite_add_1smb_test(suite, "owner", test_owner_bits);
        torture_suite_add_1smb_test(suite, "inheritance", test_inheritance);
 
-#if 0
        torture_suite_add_1smb_test(suite, "INHERITFLAGS", test_inheritance_flags);
-#endif
        torture_suite_add_1smb_test(suite, "dynamic", test_inheritance_dynamic);
 #if 0
        /* XXX This test does not work against XP or Vista. */