summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-07-09 01:54:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:25 -0500
commit96ead1a02b9cd5d8dbaf448322d4d3a15300e0f0 (patch)
treebff1d744d6ddaf6a2f7512547e1ed86097fbfc82 /source4/libnet
parentbde98850be7d7868c59597012e3366cf14fd0169 (diff)
downloadsamba-96ead1a02b9cd5d8dbaf448322d4d3a15300e0f0.tar.gz
samba-96ead1a02b9cd5d8dbaf448322d4d3a15300e0f0.tar.bz2
samba-96ead1a02b9cd5d8dbaf448322d4d3a15300e0f0.zip
r8248: Make these comments more accurate.
Andrew Bartlett (This used to be commit 00e1cf79410eb7d31958ba272d87eb2d379c3613)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_join.c10
1 files changed, 6 insertions, 4 deletions
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;