1 |
From a3978285d05eb0bd9b52b0d1c2908388005b32e1 Mon Sep 17 00:00:00 2001 |
2 |
From: Alexander Bokovoy <ab@samba.org> |
3 |
Date: Tue, 14 Jun 2016 22:37:31 +0300 |
4 |
Subject: [PATCH] libnet_join: use sitename if it was set by pre-join detection |
5 |
|
6 |
When domain member is joined to AD, we need to use the same DC to |
7 |
authenticate against after the join because the machine account might |
8 |
not be replicated yet to other domain controllers, including off-site. |
9 |
|
10 |
Bug https://bugzilla.samba.org/show_bug.cgi?id=11769 dealt with |
11 |
detection of the site pre-join. However, we rewrite private local |
12 |
krb5.conf afterwards without taking the discovered site name into |
13 |
account. |
14 |
|
15 |
Fix this by reusing the site discovered pre-join. |
16 |
|
17 |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11975 |
18 |
|
19 |
Signed-off-by: Alexander Bokovoy <ab@samba.org> |
20 |
Reviewed-by: Jeremy Allison <jra@samba.org> |
21 |
Reviewed-by: Andreas Schneider <asn@samba.org> |
22 |
|
23 |
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> |
24 |
Autobuild-Date(master): Wed Jun 15 15:25:44 CEST 2016 on sn-devel-144 |
25 |
|
26 |
(cherry picked from commit 4c408f6de5c32a41fbb44971419118e5425d13e7) |
27 |
--- |
28 |
source3/libnet/libnet_join.c | 2 +- |
29 |
1 file changed, 1 insertion(+), 1 deletion(-) |
30 |
|
31 |
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c |
32 |
index a28864d..c007183 100644 |
33 |
--- a/source3/libnet/libnet_join.c |
34 |
+++ b/source3/libnet/libnet_join.c |
35 |
@@ -2500,7 +2500,7 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx, |
36 |
|
37 |
create_local_private_krb5_conf_for_domain( |
38 |
r->out.dns_domain_name, r->out.netbios_domain_name, |
39 |
- NULL, smbXcli_conn_remote_sockaddr(cli->conn)); |
40 |
+ sitename, smbXcli_conn_remote_sockaddr(cli->conn)); |
41 |
|
42 |
if (r->out.domain_is_ad && |
43 |
!(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_UNSECURE)) { |
44 |
-- |
45 |
2.9.0 |
46 |
|