svn commit: samba r16845 - branches/SAMBA_3_0/source/utils branches/SAMBA_3_0_RELEASE/source/utils trunk/source/utils

jerry at samba.org jerry at samba.org
Fri Jul 7 00:20:56 GMT 2006


Author: jerry
Date: 2006-07-07 00:20:55 +0000 (Fri, 07 Jul 2006)
New Revision: 16845

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

Log:
Properly report the error during join when the set password fails


Modified:
   branches/SAMBA_3_0/source/utils/net_domain.c
   branches/SAMBA_3_0_RELEASE/source/utils/net_domain.c
   trunk/source/utils/net_domain.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_domain.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_domain.c	2006-07-06 21:28:29 UTC (rev 16844)
+++ branches/SAMBA_3_0/source/utils/net_domain.c	2006-07-07 00:20:55 UTC (rev 16845)
@@ -302,6 +302,13 @@
 	status = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, &user_pol, 
 			24, &cli->user_session_key, &ctr);
 
+	if ( !NT_STATUS_IS_OK(status) ) {
+		d_fprintf( stderr, "Failed to set password for machine account (%s)\n", 
+			nt_errstr(status));
+		return status;
+	}
+
+
 	/* Why do we have to try to (re-)set the ACB to be the same as what
 	   we passed in the samr_create_dom_user() call?  When a NT
 	   workstation is joined to a domain by an administrator the

Modified: branches/SAMBA_3_0_RELEASE/source/utils/net_domain.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/utils/net_domain.c	2006-07-06 21:28:29 UTC (rev 16844)
+++ branches/SAMBA_3_0_RELEASE/source/utils/net_domain.c	2006-07-07 00:20:55 UTC (rev 16845)
@@ -302,6 +302,13 @@
 	status = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, &user_pol, 
 			24, &cli->user_session_key, &ctr);
 
+	if ( !NT_STATUS_IS_OK(status) ) {
+		d_fprintf( stderr, "Failed to set password for machine account (%s)\n", 
+			nt_errstr(status));
+		return status;
+	}
+
+
 	/* Why do we have to try to (re-)set the ACB to be the same as what
 	   we passed in the samr_create_dom_user() call?  When a NT
 	   workstation is joined to a domain by an administrator the

Modified: trunk/source/utils/net_domain.c
===================================================================
--- trunk/source/utils/net_domain.c	2006-07-06 21:28:29 UTC (rev 16844)
+++ trunk/source/utils/net_domain.c	2006-07-07 00:20:55 UTC (rev 16845)
@@ -302,6 +302,13 @@
 	status = rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, &user_pol, 
 			24, &cli->user_session_key, &ctr);
 
+	if ( !NT_STATUS_IS_OK(status) ) {
+		d_fprintf( stderr, "Failed to set password for machine account (%s)\n", 
+			nt_errstr(status));
+		return status;
+	}
+
+
 	/* Why do we have to try to (re-)set the ACB to be the same as what
 	   we passed in the samr_create_dom_user() call?  When a NT
 	   workstation is joined to a domain by an administrator the



More information about the samba-cvs mailing list