summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-14 16:16:25 +0200
committerGünther Deschner <gd@samba.org>2008-04-14 16:16:25 +0200
commit113b94faf165994e694c8713d43b990d729b5129 (patch)
tree5ff312ea5ab85caa560d55ff969485636a03b21f /source3
parentcbd07aa047e3895f74da984a646fb5fac4980a4a (diff)
downloadsamba-113b94faf165994e694c8713d43b990d729b5129.tar.gz
samba-113b94faf165994e694c8713d43b990d729b5129.tar.bz2
samba-113b94faf165994e694c8713d43b990d729b5129.zip
net: exit early in net_ads_join() if the domain is not set.
Guenther (This used to be commit 8331fbe735e2bec386ab8fc1645dc371d45d3063)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_ads.c6
1 files changed, 6 insertions, 0 deletions
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;