summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-26 20:32:55 +0100
committerStefan Metzmacher <metze@samba.org>2009-04-17 21:46:47 +0200
commit257809558bfab3e45703cf8be76357596392a3ea (patch)
tree9374b8a038eda32258defa68715660f0029551fb /source3/utils
parentc0dfe0cf80ee50f395912b7d6aec0d87febd34c0 (diff)
downloadsamba-257809558bfab3e45703cf8be76357596392a3ea.tar.gz
samba-257809558bfab3e45703cf8be76357596392a3ea.tar.bz2
samba-257809558bfab3e45703cf8be76357596392a3ea.zip
s3:net: add --request-timeout option
metze
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c1
-rw-r--r--source3/utils/net.h1
-rw-r--r--source3/utils/net_util.c2
3 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 7823a98219..bd5107af53 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -651,6 +651,7 @@ static struct functable net_func[] = {
{"force", 'f', POPT_ARG_NONE, &c->opt_force},
{"stdin", 'i', POPT_ARG_NONE, &c->opt_stdin},
{"timeout", 't', POPT_ARG_INT, &c->opt_timeout},
+ {"request-timeout",0,POPT_ARG_INT, &c->opt_request_timeout},
{"machine-pass",'P', POPT_ARG_NONE, &c->opt_machine_pass},
{"kerberos", 'k', POPT_ARG_NONE, &c->opt_kerberos},
{"myworkgroup", 'W', POPT_ARG_STRING, &c->opt_workgroup},
diff --git a/source3/utils/net.h b/source3/utils/net.h
index 2d72756def..d88f962d41 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -43,6 +43,7 @@ struct net_context {
const char *opt_container;
int opt_flags;
int opt_timeout;
+ int opt_request_timeout;
const char *opt_target_workgroup;
int opt_machine_pass;
int opt_localgroup;
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index c6b6ee9e80..2915ffb809 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -521,6 +521,8 @@ NTSTATUS net_make_ipc_connection_ex(struct net_context *c ,const char *domain,
d_fprintf(stderr, "Connection failed: %s\n",
nt_errstr(nt_status));
cli = NULL;
+ } else if (c->opt_request_timeout) {
+ cli_set_timeout(cli, c->opt_request_timeout * 1000);
}
done: