The branch, v3-4-test has been updated
       via  148fa23d95af164babd9135fc40d528ec147e372 (commit)
       via  6afb9614381f926b590c627f44cf5a93e11068ec (commit)
       via  9c914cf1bd4ce2d7abba6a4e94e393cb930f259e (commit)
      from  db49a0cf2c9b9b108ec10d9b962026032910f4e4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 148fa23d95af164babd9135fc40d528ec147e372
Author: Günther Deschner <[email protected]>
Date:   Wed Apr 15 22:47:15 2009 +0200

    s4-smbtorture: Fix crash bugs in RPC-SAMR_ACCESSMASK.
    
    Also disable security descriptor based tests while testing samba3.
    
    Guenther
    (cherry picked from commit e6aa3f2d09bd004341dde28b15ef769a09401f26)

commit 6afb9614381f926b590c627f44cf5a93e11068ec
Author: Günther Deschner <[email protected]>
Date:   Wed Apr 15 17:07:48 2009 +0200

    s3-examples: make sure to match correct key name in adssearch.
    
    Guenther
    (cherry picked from commit 6fe012ff78caf10f4bf5503b27030cd54563ad0b)

commit 9c914cf1bd4ce2d7abba6a4e94e393cb930f259e
Author: Günther Deschner <[email protected]>
Date:   Tue Apr 14 23:30:13 2009 +0200

    s4-smbtorture: define TORTURE_DEFAULT_SERVICE and set to netlogon.
    
    Guenther
    (cherry picked from commit f1fd39c09f0e094c882775367b1e4c5772d7ee51)

-----------------------------------------------------------------------

Summary of changes:
 examples/misc/adssearch.pl            |    2 +-
 source4/torture/rpc/samr_accessmask.c |   22 +++++++++++++++-------
 source4/torture/rpc/svcctl.c          |   14 ++++++++------
 3 files changed, 24 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl
index d17e680..026853d 100755
--- a/examples/misc/adssearch.pl
+++ b/examples/misc/adssearch.pl
@@ -735,7 +735,7 @@ sub get_machine_password {
                        ($line,$password) = split(/"/, $line);
                        last;
                }
-               if ($line =~ /$key/) {
+               if ($line =~ /\"$key\"/) {
                        $found = 1;
                }
        }
diff --git a/source4/torture/rpc/samr_accessmask.c 
b/source4/torture/rpc/samr_accessmask.c
index 9a8e442..fb560be 100644
--- a/source4/torture/rpc/samr_accessmask.c
+++ b/source4/torture/rpc/samr_accessmask.c
@@ -301,7 +301,12 @@ static bool test_samr_connect_user_acl(struct 
torture_context *tctx,
        /* Try to connect as the test user */
        status = dcerpc_pipe_connect(tctx, 
                             &test_p, binding, &ndr_table_samr,
-                            test_credentials, NULL, tctx->lp_ctx);
+                            test_credentials, tctx->ev, tctx->lp_ctx);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("dcerpc_pipe_connect failed: %s\n", nt_errstr(status));
+               return false;
+       }
+
        /* connect to SAMR as the user */
        status = torture_samr_Connect5(tctx, test_p, SEC_FLAG_MAXIMUM_ALLOWED, 
&uch);
        if (!NT_STATUS_IS_OK(status)) {
@@ -310,9 +315,6 @@ static bool test_samr_connect_user_acl(struct 
torture_context *tctx,
        }
        /* disconnec the user */
        talloc_free(test_p);
-       if (!NT_STATUS_IS_OK(status)) {
-               return false;
-       }
 
 
        /* read the sequrity descriptor back. it should not have changed 
@@ -366,7 +368,11 @@ static bool test_samr_connect_user_acl_enforced(struct 
torture_context *tctx,
 
        status = dcerpc_pipe_connect(tctx, 
                             &test_p, binding, &ndr_table_samr,
-                            test_credentials, NULL, tctx->lp_ctx);
+                            test_credentials, tctx->ev, tctx->lp_ctx);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("dcerpc_pipe_connect failed: %s\n", nt_errstr(status));
+               return false;
+       }
 
        /* connect to SAMR as the user */
        status = torture_samr_Connect5(tctx, test_p, 
SAMR_ACCESS_SHUTDOWN_SERVER, &uch);
@@ -447,6 +453,7 @@ static bool test_samr_accessmask_LookupDomain(struct 
torture_context *tctx,
 
                        ld.in.connect_handle = &ch;
                        ld.in.domain_name    = &dn;
+                       ld.out.sid           = &sid;
                        dn.string            = lp_workgroup(tctx->lp_ctx);
 
                        status = dcerpc_samr_LookupDomain(p, tctx, &ld);
@@ -530,7 +537,7 @@ static bool test_samr_accessmask_OpenDomain(struct 
torture_context *tctx,
 
                        od.in.connect_handle = &ch;
                        od.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-                       od.in.sid = *ld.out.sid;
+                       od.in.sid = sid;
                        od.out.domain_handle = &dh;
 
                        status = dcerpc_samr_OpenDomain(p, tctx, &od);
@@ -627,6 +634,7 @@ static bool test_samr_connect(struct torture_context *tctx,
                ret = false;
        }
 
+       if (!torture_setting_bool(tctx, "samba3", false)) {
 
        /* test if ACLs can be changed for the policy handle
         * returned by Connect5
@@ -649,7 +657,7 @@ static bool test_samr_connect(struct torture_context *tctx,
                ret = false;
        }
 
-
+       }
 
        /* remove the test user */
        torture_leave_domain(tctx, testuser);
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 631e367..a2e32f2 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -26,6 +26,8 @@
 #include "torture/rpc/rpc.h"
 #include "param/param.h"
 
+#define TORTURE_DEFAULT_SERVICE "NetLogon"
+
 static bool test_OpenSCManager(struct dcerpc_pipe *p, struct torture_context 
*tctx, struct policy_handle *h)
 {
        struct svcctl_OpenSCManagerW r;
@@ -85,7 +87,7 @@ static bool test_QueryServiceStatus(struct torture_context 
*tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -118,7 +120,7 @@ static bool test_QueryServiceStatusEx(struct 
torture_context *tctx, struct dcerp
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        buffer = talloc(tctx, uint8_t);
@@ -165,7 +167,7 @@ static bool test_QueryServiceConfigW(struct torture_context 
*tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -207,7 +209,7 @@ static bool test_QueryServiceConfig2W(struct 
torture_context *tctx, struct dcerp
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        buffer = talloc(tctx, uint8_t);
@@ -270,7 +272,7 @@ static bool test_QueryServiceObjectSecurity(struct 
torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.handle = &s;
@@ -403,7 +405,7 @@ static bool test_EnumDependentServicesW(struct 
torture_context *tctx,
        if (!test_OpenSCManager(p, tctx, &h))
                return false;
 
-       if (!test_OpenService(p, tctx, &h, "Netlogon", &s))
+       if (!test_OpenService(p, tctx, &h, TORTURE_DEFAULT_SERVICE, &s))
                return false;
 
        r.in.service = &s;


-- 
Samba Shared Repository

Reply via email to