summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-09 17:01:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:56 -0500
commit42131b759dd732e5bb2fb2d8e8f8736c78855f51 (patch)
treea978914baf2e6b65153f8fb1a8affdffb69f52ab
parent4cde26cfc9be73785ac78aa962e68ccccd7cf90d (diff)
downloadsamba-42131b759dd732e5bb2fb2d8e8f8736c78855f51.tar.gz
samba-42131b759dd732e5bb2fb2d8e8f8736c78855f51.tar.bz2
samba-42131b759dd732e5bb2fb2d8e8f8736c78855f51.zip
r15011: Fix bug # 2413. net rpc info can't reliably work anonymously anymore.
Volker (This used to be commit ba41c62b8b4d0c791035d63fb59496c0f655887f)
-rw-r--r--source3/utils/net_rpc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 1ba6794272..26d224651f 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -430,6 +430,7 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
result = rpccli_samr_connect(pipe_hnd, mem_ctx, MAXIMUM_ALLOWED_ACCESS,
&connect_pol);
if (!NT_STATUS_IS_OK(result)) {
+ d_fprintf(stderr, "Could not connect to SAM: %s\n", nt_errstr(result));
goto done;
}
@@ -438,6 +439,7 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
MAXIMUM_ALLOWED_ACCESS,
domain_sid, &domain_pol);
if (!NT_STATUS_IS_OK(result)) {
+ d_fprintf(stderr, "Could not open domain: %s\n", nt_errstr(result));
goto done;
}
@@ -468,7 +470,7 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
int net_rpc_info(int argc, const char **argv)
{
- return run_rpc_command(NULL, PI_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC,
+ return run_rpc_command(NULL, PI_SAMR, NET_FLAGS_PDC,
rpc_info_internals,
argc, argv);
}