summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-11 19:24:59 +0000
committerJeremy Allison <jra@samba.org>2000-12-11 19:24:59 +0000
commita95ccc27790cb8275f44df76fa6dc33a6a17c12e (patch)
tree9d850e8e8a7492fe566c5e40cec75ddbc64fca46
parentc9d38e177bf6b519458a5ba497f69f3336366c6f (diff)
downloadsamba-a95ccc27790cb8275f44df76fa6dc33a6a17c12e.tar.gz
samba-a95ccc27790cb8275f44df76fa6dc33a6a17c12e.tar.bz2
samba-a95ccc27790cb8275f44df76fa6dc33a6a17c12e.zip
Adding in debug for SD's.
Jeremy. (This used to be commit a19f936b644fedc4c59ada5f12172abed9894910)
-rw-r--r--source3/printing/nt_printing.c17
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c31
2 files changed, 48 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index b3b942d2ed..2ad2e564ec 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2889,6 +2889,23 @@ BOOL nt_printing_getsec(char *printername, SEC_DESC_BUF **secdesc_ctr)
}
}
+ if (DEBUGLEVEL >= 10) {
+ SEC_ACL *acl = (*secdesc_ctr)->sec->dacl;
+ int i;
+
+ DEBUG(10, ("secdesc_ctr for %s has %d aces:\n",
+ printername, acl->num_aces));
+
+ for (i = 0; i < acl->num_aces; i++) {
+ fstring sid_str;
+
+ sid_to_string(sid_str, &acl->ace[i].sid);
+
+ DEBUG(10, ("%s 0x%08x\n", sid_str,
+ acl->ace[i].info.mask));
+ }
+ }
+
prs_mem_free(&ps);
talloc_destroy(mem_ctx);
return True;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 69cb79156b..c0ecfefc92 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -3384,6 +3384,37 @@ static uint32 update_printer_sec(POLICY_HND *handle, uint32 level,
nt_printing_getsec(Printer->dev.handlename, &old_secdesc_ctr);
+ if (DEBUGLEVEL >= 10) {
+ SEC_ACL *acl;
+ int i;
+
+ acl = old_secdesc_ctr->sec->dacl;
+ DEBUG(10, ("old_secdesc_ctr for %s has %d aces:\n",
+ PRINTERNAME(snum), acl->num_aces));
+
+ for (i = 0; i < acl->num_aces; i++) {
+ fstring sid_str;
+
+ sid_to_string(sid_str, &acl->ace[i].sid);
+
+ DEBUG(10, ("%s 0x%08x\n", sid_str,
+ acl->ace[i].info.mask));
+ }
+
+ acl = secdesc_ctr->sec->dacl;
+ DEBUG(10, ("secdesc_ctr for %s has %d aces:\n",
+ PRINTERNAME(snum), acl->num_aces));
+
+ for (i = 0; i < acl->num_aces; i++) {
+ fstring sid_str;
+
+ sid_to_string(sid_str, &acl->ace[i].sid);
+
+ DEBUG(10, ("%s 0x%08x\n", sid_str,
+ acl->ace[i].info.mask));
+ }
+ }
+
new_secdesc_ctr = sec_desc_merge(secdesc_ctr, old_secdesc_ctr);
if (sec_desc_equal(new_secdesc_ctr->sec, old_secdesc_ctr->sec)) {