The branch, master has been updated
       via  c201e49 s4-smbtorture: print SVCCTL security descriptor in 
test_QueryServiceObjectSecurity().
      from  1585c4d lib/tdb: fix c++ build warning in tdb_header_hash().

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c201e494c476e3245f887c4491a909126d1c3333
Author: Günther Deschner <g...@samba.org>
Date:   Mon Sep 20 17:41:18 2010 -0700

    s4-smbtorture: print SVCCTL security descriptor in 
test_QueryServiceObjectSecurity().
    
    Guenther

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

Summary of changes:
 source4/torture/rpc/svcctl.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 5ad678f..5c4f803 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_svcctl_c.h"
 #include "librpc/gen_ndr/ndr_svcctl.h"
+#include "librpc/gen_ndr/ndr_security.h"
 #include "torture/rpc/torture_rpc.h"
 #include "param/param.h"
 
@@ -280,6 +281,10 @@ static bool test_QueryServiceObjectSecurity(struct 
torture_context *tctx,
        uint8_t *buffer;
        uint32_t needed;
 
+       enum ndr_err_code ndr_err;
+       struct security_descriptor sd;
+       DATA_BLOB blob;
+
        if (!test_OpenSCManager(b, tctx, &h))
                return false;
 
@@ -315,6 +320,18 @@ static bool test_QueryServiceObjectSecurity(struct 
torture_context *tctx,
 
        torture_assert_werr_ok(tctx, r.out.result, "QueryServiceObjectSecurity 
failed!");
 
+       blob = data_blob_const(buffer, needed);
+
+       ndr_err = ndr_pull_struct_blob(&blob, tctx, &sd,
+               (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
+       if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+               return false;
+       }
+
+       if (DEBUGLEVEL >= 1) {
+               NDR_PRINT_DEBUG(security_descriptor, &sd);
+       }
+
        if (!test_CloseServiceHandle(b, tctx, &s))
                return false;
 


-- 
Samba Shared Repository

Reply via email to