s4-torture: LookupSids3 is only available over NCACN_IP_TCP.
[kai/samba.git] / source4 / torture / rpc / lsa.c
index 509f4a213c5e35bd9134fe0c207a045bc8f91985..f420ec183386105990ec5c64d7b6663654bf7388 100644 (file)
@@ -753,7 +753,8 @@ bool test_many_LookupSids(struct dcerpc_pipe *p,
                        return false;
                }
        } else if (p->conn->security_state.auth_info->auth_type == DCERPC_AUTH_TYPE_SCHANNEL &&
-                  p->conn->security_state.auth_info->auth_level >= DCERPC_AUTH_LEVEL_INTEGRITY) {
+                  p->conn->security_state.auth_info->auth_level >= DCERPC_AUTH_LEVEL_INTEGRITY &&
+                  (p->binding->transport == NCACN_IP_TCP || p->binding->transport == NCALRPC)) {
                struct lsa_LookupSids3 r;
                struct lsa_RefDomainList *domains = NULL;
                struct lsa_TransNameArray2 names;
@@ -2735,15 +2736,21 @@ static bool test_CreateTrustedDomainEx_common(struct dcerpc_pipe *p,
                        /* For outbound and MIT trusts there is no trust account */
                        if (trustinfo.trust_direction != 2 &&
                            trustinfo.trust_type != 3) {
-                               if (check_dom_trust_pw(p, tctx, trust_name,
-                                                       "x" TRUSTPW "x")) {
-                                       torture_comment(tctx, "Password check passed unexpectedly\n");
-                                       ret = false;
-                               }
-                               if (!check_dom_trust_pw(p, tctx, trust_name,
-                                                       TRUSTPW)) {
-                                       torture_comment(tctx, "Password check failed\n");
-                                       ret = false;
+
+                               if (torture_setting_bool(tctx, "samba3", false) ||
+                                   torture_setting_bool(tctx, "samba4", false)) {
+                                       torture_comment(tctx, "skipping trusted domain auth tests against samba");
+                               } else {
+                                       if (check_dom_trust_pw(p, tctx, trust_name,
+                                                               "x" TRUSTPW "x")) {
+                                               torture_comment(tctx, "Password check passed unexpectedly\n");
+                                               ret = false;
+                                       }
+                                       if (!check_dom_trust_pw(p, tctx, trust_name,
+                                                               TRUSTPW)) {
+                                               torture_comment(tctx, "Password check failed\n");
+                                               ret = false;
+                                       }
                                }
                        }