svn commit: samba r15011 - branches/SAMBA_3_0/source/utils trunk/source/utils

vlendec at samba.org vlendec at samba.org
Sun Apr 9 17:02:01 GMT 2006


Author: vlendec
Date: 2006-04-09 17:01:59 +0000 (Sun, 09 Apr 2006)
New Revision: 15011

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15011

Log:
Fix bug # 2413. net rpc info can't reliably work anonymously anymore.

Volker


Modified:
   branches/SAMBA_3_0/source/utils/net_rpc.c
   trunk/source/utils/net_rpc.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_rpc.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_rpc.c	2006-04-09 10:19:43 UTC (rev 15010)
+++ branches/SAMBA_3_0/source/utils/net_rpc.c	2006-04-09 17:01:59 UTC (rev 15011)
@@ -430,6 +430,7 @@
 	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 @@
 				      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 @@
 
 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);
 }

Modified: trunk/source/utils/net_rpc.c
===================================================================
--- trunk/source/utils/net_rpc.c	2006-04-09 10:19:43 UTC (rev 15010)
+++ trunk/source/utils/net_rpc.c	2006-04-09 17:01:59 UTC (rev 15011)
@@ -430,6 +430,7 @@
 	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 @@
 				      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 @@
 
 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);
 }



More information about the samba-cvs mailing list