From: Günther Deschner Date: Mon, 14 Apr 2008 14:16:25 +0000 (+0200) Subject: net: exit early in net_ads_join() if the domain is not set. X-Git-Tag: samba-3.3.0pre1~2661 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8331fbe735e2bec386ab8fc1645dc371d45d3063;p=thirdparty%2Fsamba.git net: exit early in net_ads_join() if the domain is not set. Guenther --- diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index a6712b71724..b4814521aac 100644 --- a/source/utils/net_ads.c +++ b/source/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;