From 113b94faf165994e694c8713d43b990d729b5129 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 14 Apr 2008 16:16:25 +0200 Subject: net: exit early in net_ads_join() if the domain is not set. Guenther (This used to be commit 8331fbe735e2bec386ab8fc1645dc371d45d3063) --- source3/utils/net_ads.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/utils/net_ads.c') diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index a6712b7172..b4814521aa 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1159,6 +1159,12 @@ int net_ads_join(int argc, const char **argv) } } + if (!*domain) { + d_fprintf(stderr, "Please supply a valid domain name\n"); + werr = WERR_INVALID_PARAM; + goto fail; + } + /* Do the domain join here */ r->in.domain_name = domain; -- cgit