svn commit: samba r8248 - in branches/SAMBA_4_0/source/libnet: .

abartlet at samba.org abartlet at samba.org
Sat Jul 9 01:54:29 GMT 2005


Author: abartlet
Date: 2005-07-09 01:54:28 +0000 (Sat, 09 Jul 2005)
New Revision: 8248

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

Log:
Make these comments more accurate.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libnet/libnet_join.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_join.c	2005-07-09 01:53:57 UTC (rev 8247)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c	2005-07-09 01:54:28 UTC (rev 8248)
@@ -69,14 +69,14 @@
 	uint32_t rid, access_granted;
 	int policy_min_pw_len = 0;
 
-	/* prepare connect to the SAMR pipe of users domain PDC */
+	/* prepare connect to the SAMR pipe of PDC */
 	c.level                     = LIBNET_RPC_CONNECT_PDC;
 	c.in.domain_name            = r->samr.in.domain_name;
 	c.in.dcerpc_iface_name      = DCERPC_SAMR_NAME;
 	c.in.dcerpc_iface_uuid      = DCERPC_SAMR_UUID;
 	c.in.dcerpc_iface_version   = DCERPC_SAMR_VERSION;
 
-	/* 1. connect to the SAMR pipe of users domain PDC (maybe a standalone server or workstation) */
+	/* 1. connect to the SAMR pipe of the PDC */
 	status = libnet_RpcConnect(ctx, mem_ctx, &c);
 	if (!NT_STATUS_IS_OK(status)) {
 		r->samr.out.error_string = talloc_asprintf(mem_ctx,
@@ -237,7 +237,7 @@
 		goto disconnect;
 	}
 
-	/* prepare samr_SetUserInfo level 23 */
+	/* prepare samr_QueryUserInfo (get flags) */
 	qui.in.user_handle = &u_handle;
 	qui.in.level = 16;
 	
@@ -257,7 +257,8 @@
 					  r->samr.in.account_name, nt_errstr(status));
 		goto disconnect;
 	}
-	
+
+	/* Possibly change account type */
 	if ((qui.out.info->info16.acct_flags & (ACB_WSTRUST | ACB_SVRTRUST | ACB_DOMTRUST)) 
 	    != r->samr.in.acct_type) {
 		acct_flags = (qui.out.info->info16.acct_flags & ~(ACB_WSTRUST | ACB_SVRTRUST | ACB_DOMTRUST))
@@ -268,6 +269,7 @@
 	
 	acct_flags = (acct_flags & ~ACB_DISABLED);
 
+	/* reset flags (if required) */
 	if (acct_flags != qui.out.info->info16.acct_flags) {
 		ZERO_STRUCT(u_info);
 		u_info.info16.acct_flags = acct_flags;



More information about the samba-cvs mailing list