[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Thu Feb 11 05:26:53 MST 2010
The branch, master has been updated
via 5e1dd19... testprogs: one more error code for spoolss test.
via 4f8a4cb... testprogs: print secdesc->Control in spoolss test.
via 490e1f8... testprogs: use ConvertSidToStringSid in order to print sids in spoolss test.
from 7bd7194... s4-drs: Add DRSUAPI_DRS_NONGC_RO_REP bit to DRS_OPTIONS
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5e1dd19221a412d88540422004b18d190e9caa28
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 11 01:24:12 2010 +0100
testprogs: one more error code for spoolss test.
Guenther
commit 4f8a4cb81b073e3339744cfec334d8fce34cb03f
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 11 00:06:20 2010 +0100
testprogs: print secdesc->Control in spoolss test.
Guenther
commit 490e1f84fede5585c6c611a5720b9f2362a9214f
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 11 00:04:53 2010 +0100
testprogs: use ConvertSidToStringSid in order to print sids in spoolss test.
Guenther
-----------------------------------------------------------------------
Summary of changes:
testprogs/win32/spoolss/error.c | 2 ++
testprogs/win32/spoolss/printlib.c | 31 +++++++++++++++++--------------
2 files changed, 19 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/testprogs/win32/spoolss/error.c b/testprogs/win32/spoolss/error.c
index 241e1e5..0ff775b 100644
--- a/testprogs/win32/spoolss/error.c
+++ b/testprogs/win32/spoolss/error.c
@@ -117,6 +117,8 @@ const char *errstr(DWORD error)
return "RPC_S_SERVER_UNAVAILABLE";
case RPC_S_INVALID_NET_ADDR:
return "RPC_S_INVALID_NET_ADDR";
+ case RPC_S_CALL_FAILED:
+ return "RPC_S_CALL_FAILED";
default:
break;
}
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c
index ff18517..b9198d4 100644
--- a/testprogs/win32/spoolss/printlib.c
+++ b/testprogs/win32/spoolss/printlib.c
@@ -22,6 +22,7 @@
#include <windows.h>
#include <stdio.h>
#include <assert.h>
+#include <sddl.h>
void print_devmode(DEVMODE *pDevModeIn)
{
@@ -125,24 +126,27 @@ void print_acl(const char* str, ACL *acl)
return;
}
-void print_sid(const char* str, SID *sid)
+void PrintLastError();
+
+void print_sid(LPSTR str, PSID sid)
{
- DWORD i = 0;
+ LPSTR sid_string;
printf("%s\n", str);
- printf("0x%x\n", sid);
- if (sid == NULL)
+
+ if (sid == NULL) {
+ printf("(null sid)\n");
+ return;
+ }
+
+ if (!ConvertSidToStringSid(sid, &sid_string)) {
+ PrintLastError();
return;
- printf("\t\tRevision\t\t0x%x\n", sid->Revision);
- printf("\t\tSubAuthorityCount\t0x%x\n", sid->SubAuthorityCount);
- printf("\t\tSubAuthority\n\t");
- while (i < sid->SubAuthorityCount) {
- printf("\t0x%x", sid->SubAuthority[i]);
- if (i%4 == 3)
- printf("\n\t");
- i++;
}
+ printf("%s\n", sid_string);
+ LocalFree(sid_string);
+
return;
}
@@ -155,6 +159,7 @@ void print_secdesc(SECURITY_DESCRIPTOR *secdesc)
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);
@@ -583,11 +588,9 @@ void print_printer_info_2(PPRINTER_INFO_2 info)
printf("\tDevice Mode Information\n");
printf("\t-----------------------\n");
print_devmode(info->pDevMode);
-#if 0
printf("\tSecurity Descriptor Information\n");
printf("\t-------------------------------\n");
print_secdesc(info->pSecurityDescriptor);
-#endif
return;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list