summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-07-31 05:38:53 +0000
committerAndrew Tridgell <tridge@samba.org>2002-07-31 05:38:53 +0000
commitce344ad4b7b5eef057364dfdde4ee2764d210e39 (patch)
treeddeb12e91c9bbd1eaa89e0d9bd5938512bf072de /source3/utils
parent4516a14dbbc03f2ae2ce3c4d4e22e11e24a8a42f (diff)
downloadsamba-ce344ad4b7b5eef057364dfdde4ee2764d210e39.tar.gz
samba-ce344ad4b7b5eef057364dfdde4ee2764d210e39.tar.bz2
samba-ce344ad4b7b5eef057364dfdde4ee2764d210e39.zip
fixed a net crash bug if we can't find a DC in a 'net rpc' command
(This used to be commit ced5dc4e05badfb07cbae7a2880825b9bad4e68d)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index a13a8c5e22..9b3248cf63 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -132,6 +132,10 @@ static int run_rpc_command(struct cli_state *cli_arg, const char *pipe_name, int
else
cli = cli_arg;
+ if (!cli) {
+ return -1;
+ }
+
domain_sid = net_get_remote_domain_sid(cli);
/* Create mem_ctx */