git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5ee2732
)
Give NetJoinDomain() enough time to finish.
author
Günther Deschner
<gd@samba.org>
Fri, 30 Nov 2007 18:55:40 +0000
(19:55 +0100)
committer
Volker Lendecke
<vl@sernet.de>
Fri, 30 Nov 2007 21:25:01 +0000
(22:25 +0100)
Guenther
(This used to be commit
7f021b3cb7845c6eb142668f66599886cd92182f
)
source3/lib/netapi/joindomain.c
patch
|
blob
|
history
diff --git
a/source3/lib/netapi/joindomain.c
b/source3/lib/netapi/joindomain.c
index bf2f8fce7efb38fecabddb1732702bb26d736cc9..7c71276de6f5f21782a72965ec85cf7d62364dd6 100644
(file)
--- 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;
struct wkssvc_PasswordBuffer encrypted_password;
NTSTATUS status;
WERROR werr;
+ unsigned int old_timeout;
mem_ctx = talloc_init("NetJoinDomain");
if (!mem_ctx) {
mem_ctx = talloc_init("NetJoinDomain");
if (!mem_ctx) {
@@
-58,6
+59,8
@@
WERROR NetJoinDomain(const char *server_name,
goto done;
}
goto done;
}
+ old_timeout = cli_set_timeout(cli, 60000);
+
pipe_cli = cli_rpc_pipe_open_noauth(cli, PI_WKSSVC,
&status);
if (!pipe_cli) {
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);
&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,
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:
werr = WERR_OK;
done:
+ cli_set_timeout(cli, old_timeout);
cli_shutdown(cli);
TALLOC_FREE(mem_ctx);
cli_shutdown(cli);
TALLOC_FREE(mem_ctx);