diff options
author | Günther Deschner <gd@samba.org> | 2007-11-30 19:55:40 +0100 |
---|---|---|
committer | Volker Lendecke <vl@sernet.de> | 2007-11-30 22:25:01 +0100 |
commit | 1484b1d17471e33f6687e3fa3635b07a452edf03 (patch) | |
tree | 8baefce211b6ab1732af6b220752e2b5ddfcb72e /source3/lib/netapi | |
parent | 5ee27320ce9a662bc8c4f8e99ebbd88c0b3b6a47 (diff) | |
download | samba-1484b1d17471e33f6687e3fa3635b07a452edf03.tar.gz samba-1484b1d17471e33f6687e3fa3635b07a452edf03.tar.bz2 samba-1484b1d17471e33f6687e3fa3635b07a452edf03.zip |
Give NetJoinDomain() enough time to finish.
Guenther
(This used to be commit 7f021b3cb7845c6eb142668f66599886cd92182f)
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r-- | source3/lib/netapi/joindomain.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index bf2f8fce7e..7c71276de6 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -33,6 +33,7 @@ WERROR NetJoinDomain(const char *server_name, struct wkssvc_PasswordBuffer encrypted_password; NTSTATUS status; WERROR werr; + unsigned int old_timeout; mem_ctx = talloc_init("NetJoinDomain"); if (!mem_ctx) { @@ -58,6 +59,8 @@ WERROR NetJoinDomain(const char *server_name, goto done; } + old_timeout = cli_set_timeout(cli, 60000); + pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_WKSSVC, &status); if (!pipe_cli) { @@ -70,6 +73,8 @@ WERROR NetJoinDomain(const char *server_name, &cli->user_session_key, &encrypted_password); + old_timeout = cli_set_timeout(cli, 60000); + status = rpccli_wkssvc_NetrJoinDomain2(pipe_cli, mem_ctx, server_name, domain_name, account_ou, Account, @@ -82,6 +87,7 @@ WERROR NetJoinDomain(const char *server_name, werr = WERR_OK; done: + cli_set_timeout(cli, old_timeout); cli_shutdown(cli); TALLOC_FREE(mem_ctx); |