diff options
author | Günther Deschner <gd@samba.org> | 2008-04-14 22:58:38 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-14 22:58:38 +0200 |
commit | 4122dabbf9ffce5b2353a25e16794e9d6d38228d (patch) | |
tree | 82eafcbfe11e0914fb4c0cbcbfdde5e351a78d1b /source3/utils | |
parent | a31281a751d2ad2528ad99348a5c9c9ae10b99a4 (diff) | |
download | samba-4122dabbf9ffce5b2353a25e16794e9d6d38228d.tar.gz samba-4122dabbf9ffce5b2353a25e16794e9d6d38228d.tar.bz2 samba-4122dabbf9ffce5b2353a25e16794e9d6d38228d.zip |
net: abort when lp_realm is not set in net_ads_leave().
Guenther
(This used to be commit 53735edcbb059e73c51ae17d4ff75d2a4dee53e5)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index b4814521aa..50e5b3752b 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -816,6 +816,11 @@ static int net_ads_leave(int argc, const char **argv) struct libnet_UnjoinCtx *r = NULL; WERROR werr; + if (!*lp_realm()) { + d_fprintf(stderr, "No realm set, are we joined ?\n"); + return -1; + } + if (!(ctx = talloc_init("net_ads_leave"))) { d_fprintf(stderr, "Could not initialise talloc context.\n"); return -1; |