s4-smbtorture: Skip secdesc set calls for non-user objects in RPC-SAMR for Samba3.
authorGünther Deschner <gd@samba.org>
Mon, 11 May 2009 21:46:45 +0000 (23:46 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 11 May 2009 22:27:23 +0000 (00:27 +0200)
Note that they are skipped for all objects while testing Samba4.

Guenther

source4/torture/rpc/samr.c

index d68d945987c292615030f4d209eb238fa705bd6b..40d57bc7878770bf808b5c5153389fd2410ed055 100644 (file)
@@ -3482,8 +3482,10 @@ static bool test_alias_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
 {
        bool ret = true;
 
 {
        bool ret = true;
 
-       if (!test_QuerySecurity(p, tctx, alias_handle)) {
-               ret = false;
+       if (!torture_setting_bool(tctx, "samba3", false)) {
+               if (!test_QuerySecurity(p, tctx, alias_handle)) {
+                       ret = false;
+               }
        }
 
        if (!test_QueryAliasInfo(p, tctx, alias_handle)) {
        }
 
        if (!test_QueryAliasInfo(p, tctx, alias_handle)) {
@@ -4420,8 +4422,10 @@ static bool test_OpenGroup(struct dcerpc_pipe *p,
                return false;
        }
 
                return false;
        }
 
-       if (!test_QuerySecurity(p, tctx, &group_handle)) {
-               ret = false;
+       if (!torture_setting_bool(tctx, "samba3", false)) {
+               if (!test_QuerySecurity(p, tctx, &group_handle)) {
+                       ret = false;
+               }
        }
 
        if (!test_QueryGroupInfo(p, tctx, &group_handle)) {
        }
 
        if (!test_QueryGroupInfo(p, tctx, &group_handle)) {
@@ -4460,8 +4464,10 @@ static bool test_OpenAlias(struct dcerpc_pipe *p, struct torture_context *tctx,
                return false;
        }
 
                return false;
        }
 
-       if (!test_QuerySecurity(p, tctx, &alias_handle)) {
-               ret = false;
+       if (!torture_setting_bool(tctx, "samba3", false)) {
+               if (!test_QuerySecurity(p, tctx, &alias_handle)) {
+                       ret = false;
+               }
        }
 
        if (!test_QueryAliasInfo(p, tctx, &alias_handle)) {
        }
 
        if (!test_QueryAliasInfo(p, tctx, &alias_handle)) {
@@ -5737,7 +5743,9 @@ static bool test_OpenDomain(struct dcerpc_pipe *p, struct torture_context *tctx,
                if (!ret) {
                        printf("Failed to CreateUser in SAMR-OTHER on domain %s!\n", dom_sid_string(tctx, sid));
                }
                if (!ret) {
                        printf("Failed to CreateUser in SAMR-OTHER on domain %s!\n", dom_sid_string(tctx, sid));
                }
-               ret &= test_QuerySecurity(p, tctx, &domain_handle);
+               if (!torture_setting_bool(tctx, "samba3", false)) {
+                       ret &= test_QuerySecurity(p, tctx, &domain_handle);
+               }
                ret &= test_RemoveMemberFromForeignDomain(p, tctx, &domain_handle);
                ret &= test_CreateAlias(p, tctx, &domain_handle, &alias_handle, sid);
                ret &= test_CreateDomainGroup(p, tctx, &domain_handle, &group_handle, sid);
                ret &= test_RemoveMemberFromForeignDomain(p, tctx, &domain_handle);
                ret &= test_CreateAlias(p, tctx, &domain_handle, &alias_handle, sid);
                ret &= test_CreateDomainGroup(p, tctx, &domain_handle, &group_handle, sid);
@@ -6012,7 +6020,9 @@ bool torture_rpc_samr(struct torture_context *torture)
 
        ret &= test_Connect(p, torture, &handle);
 
 
        ret &= test_Connect(p, torture, &handle);
 
-       ret &= test_QuerySecurity(p, torture, &handle);
+       if (!torture_setting_bool(torture, "samba3", false)) {
+               ret &= test_QuerySecurity(p, torture, &handle);
+       }
 
        ret &= test_EnumDomains(p, torture, &handle, TORTURE_SAMR_OTHER, NULL);
 
 
        ret &= test_EnumDomains(p, torture, &handle, TORTURE_SAMR_OTHER, NULL);