diff options
author | Günther Deschner <gd@samba.org> | 2010-02-16 16:21:02 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-02-18 02:18:59 +0100 |
commit | 9ff2c1ea64a267bb459eaba4a273c8300bb82c5a (patch) | |
tree | 59a4d53f122f88eead7029775f35229381f3f22e /testprogs | |
parent | 6cf10cc1020dd7ef483887caebcbd76d28572432 (diff) | |
download | samba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.tar.gz samba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.tar.xz samba-9ff2c1ea64a267bb459eaba4a273c8300bb82c5a.zip |
testprogs: print SDDL string of printer security descriptors
Diffstat (limited to 'testprogs')
-rw-r--r-- | testprogs/win32/spoolss/printlib.c | 12 |
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); |