1
0
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:
Günther Deschner 2019-04-02 13:14:06 +02:00 committed by Andreas Schneider
parent a80ea6bf4f
commit ea29aa27cb

View File

@ -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;
/*