diff options
author | Günther Deschner <gd@samba.org> | 2019-04-02 13:14:06 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-04-03 17:54:25 +0000 |
commit | ea29aa27cbac4253ee1701fed99a3e0811f7475d (patch) | |
tree | c466d950f25aef1b204577c152cc4d263851ebff /source3/libnet | |
parent | a80ea6bf4fede6de044f15c608ebb3852defff01 (diff) | |
download | samba-ea29aa27cbac4253ee1701fed99a3e0811f7475d.tar.gz |
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>
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_join.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index e052306523d..fc7429e6a23 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -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; /* |