diff options
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; |