diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_domain.c | 4 | ||||
-rw-r--r-- | source3/utils/net.c | 5 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 81ae7c1340..c91cbf7af1 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -210,6 +210,10 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, return nt_status; } + /* store a successful connection */ + + saf_store( domain, cli->desthost ); + ZERO_STRUCT(info3); /* diff --git a/source3/utils/net.c b/source3/utils/net.c index 069047c9ec..032c65bc59 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -395,6 +395,11 @@ struct cli_state *net_make_ipc_connection(unsigned flags) nt_status = connect_to_ipc(&cli, &server_ip, server_name); } + /* store the server in the affinity cache if it was a PDC */ + + if ( flags & NET_FLAGS_PDC ) + saf_store( cli->server_domain, cli->desthost ); + SAFE_FREE(server_name); if (NT_STATUS_IS_OK(nt_status)) { return cli; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index a9dc3a1fc6..85b09f9e07 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -5541,6 +5541,10 @@ static int rpc_trustdom_establish(int argc, const char **argv) nt_errstr(nt_status))); return -1; } + + /* store who we connected to */ + + saf_store( domain_name, cli->desthost ); /* * Connect to \\server\ipc$ again (this time anonymously) |