summaryrefslogtreecommitdiff
path: root/testprogs/win32
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-16 16:21:02 +0100
committerGünther Deschner <gd@samba.org>2010-02-18 02:18:59 +0100
commit9ff2c1ea64a267bb459eaba4a273c8300bb82c5a (patch)
tree59a4d53f122f88eead7029775f35229381f3f22e /testprogs/win32
parent6cf10cc1020dd7ef483887caebcbd76d28572432 (diff)
downloadsamba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.tar.gz
samba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.tar.bz2
samba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.zip
testprogs: print SDDL string of printer security descriptors
Diffstat (limited to 'testprogs/win32')
-rw-r--r--testprogs/win32/spoolss/printlib.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c
index a41a5c1c90..c1eaeebe14 100644
--- a/testprogs/win32/spoolss/printlib.c
+++ b/testprogs/win32/spoolss/printlib.c
@@ -152,15 +152,25 @@ void print_sid(LPSTR str, PSID sid)
void print_secdesc(SECURITY_DESCRIPTOR *secdesc)
{
+ LPSTR sd_string;
+
if (secdesc == NULL) {
printf("\tSecurity Descriptor\t= (null)\n");
return;
}
+ if (!ConvertSecurityDescriptorToStringSecurityDescriptor(secdesc, 1, 7, &sd_string, NULL)) {
+ PrintLastError();
+ return;
+ }
+
+ printf("%s\n", sd_string);
+ LocalFree(sd_string);
+
+#if 0
printf("\tRevision\t= 0x%x\n", secdesc->Revision);
printf("\tSbz1\t\t= 0x%x\n", secdesc->Sbz1);
printf("\tControl\t\t= 0x%x\n", secdesc->Control);
-#if 0
print_sid("\tOwner\t\t= ", secdesc->Owner);
print_sid("\tGroup\t\t= ",secdesc->Group);
print_acl("\tSacl\t\t= ", secdesc->Sacl);