mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3-libnet_join: always pass down admin domain to ads layer
Otherwise we could loose the information that a non-default domain name has been used for admin creds. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13861 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
a80ea6bf4f
commit
ea29aa27cb
@ -205,7 +205,19 @@ static ADS_STATUS libnet_join_connect_ads(TALLOC_CTX *mem_ctx,
|
||||
password = r->in.machine_password;
|
||||
ccname = "MEMORY:libnet_join_machine_creds";
|
||||
} else {
|
||||
char *p = NULL;
|
||||
|
||||
username = r->in.admin_account;
|
||||
|
||||
p = strchr(r->in.admin_account, '@');
|
||||
if (p == NULL) {
|
||||
username = talloc_asprintf(mem_ctx, "%s@%s",
|
||||
r->in.admin_account,
|
||||
r->in.admin_domain);
|
||||
}
|
||||
if (username == NULL) {
|
||||
return ADS_ERROR(LDAP_NO_MEMORY);
|
||||
}
|
||||
password = r->in.admin_password;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user