From 96ead1a02b9cd5d8dbaf448322d4d3a15300e0f0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 9 Jul 2005 01:54:28 +0000 Subject: r8248: Make these comments more accurate. Andrew Bartlett (This used to be commit 00e1cf79410eb7d31958ba272d87eb2d379c3613) --- source4/libnet/libnet_join.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/libnet') diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 53b6db51b1..4910f6b4ff 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -69,14 +69,14 @@ static NTSTATUS libnet_JoinDomain_samr(struct libnet_context *ctx, 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 @@ static NTSTATUS libnet_JoinDomain_samr(struct libnet_context *ctx, 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 @@ static NTSTATUS libnet_JoinDomain_samr(struct libnet_context *ctx, 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 @@ static NTSTATUS libnet_JoinDomain_samr(struct libnet_context *ctx, 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; -- cgit