]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net: exit early in net_ads_join() if the domain is not set.
authorGünther Deschner <gd@samba.org>
Mon, 14 Apr 2008 14:16:25 +0000 (16:16 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 14 Apr 2008 14:16:25 +0000 (16:16 +0200)
Guenther

source/utils/net_ads.c

index a6712b7172455c187872c29bc89a2879782090ae..b4814521aac628654b42f382095c720dfef087aa 100644 (file)
@@ -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;