svn commit: samba r9981 - in branches/tmp/RPCREWRITE/source/smbd: .

jra at samba.org jra at samba.org
Sat Sep 3 00:59:56 GMT 2005


Author: jra
Date: 2005-09-03 00:59:55 +0000 (Sat, 03 Sep 2005)
New Revision: 9981

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

Log:
Enough is working to start getting smbd back up and going...
Jeremy.

Modified:
   branches/tmp/RPCREWRITE/source/smbd/change_trust_pw.c


Changeset:
Modified: branches/tmp/RPCREWRITE/source/smbd/change_trust_pw.c
===================================================================
--- branches/tmp/RPCREWRITE/source/smbd/change_trust_pw.c	2005-09-03 00:52:34 UTC (rev 9980)
+++ branches/tmp/RPCREWRITE/source/smbd/change_trust_pw.c	2005-09-03 00:59:55 UTC (rev 9981)
@@ -33,7 +33,8 @@
 	NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
 	struct in_addr pdc_ip;
 	fstring dc_name;
-	struct cli_state *cli;
+	struct cli_state *cli = NULL;
+	struct rpc_pipe_client *netlogon_pipe = NULL;
 
 	DEBUG(5,("change_trust_account_password: Attempting to change trust account password in domain %s....\n",
 		domain));
@@ -71,20 +72,17 @@
 	 * Now start the NT Domain stuff :-).
 	 */
 
-	if(cli_nt_session_open(cli, PI_NETLOGON) == False) {
+	netlogon_pipe = cli_rpc_pipe_open_noauth(cli, PI_NETLOGON);
+	if (!netlogon_pipe) {
 		DEBUG(0,("modify_trust_password: unable to open the domain client session to machine %s. Error was : %s.\n", 
 			dc_name, cli_errstr(cli)));
-		cli_nt_session_close(cli);
-		cli_ulogoff(cli);
 		cli_shutdown(cli);
 		nt_status = NT_STATUS_UNSUCCESSFUL;
 		goto failed;
 	}
 
-	nt_status = trust_pw_find_change_and_store_it(cli, cli->mem_ctx, domain);
+	nt_status = trust_pw_find_change_and_store_it(netlogon_pipe, cli->mem_ctx, domain);
   
-	cli_nt_session_close(cli);
-	cli_ulogoff(cli);
 	cli_shutdown(cli);
 	
 failed:



More information about the samba-cvs mailing list