1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

net: abort when lp_realm is not set in net_ads_leave().

Guenther
This commit is contained in:
Günther Deschner
2008-04-14 22:58:38 +02:00
parent 1782e89f33
commit 53735edcbb

View File

@ -816,6 +816,11 @@ static int net_ads_leave(int argc, const char **argv)
struct libnet_UnjoinCtx *r = NULL; struct libnet_UnjoinCtx *r = NULL;
WERROR werr; WERROR werr;
if (!*lp_realm()) {
d_fprintf(stderr, "No realm set, are we joined ?\n");
return -1;
}
if (!(ctx = talloc_init("net_ads_leave"))) { if (!(ctx = talloc_init("net_ads_leave"))) {
d_fprintf(stderr, "Could not initialise talloc context.\n"); d_fprintf(stderr, "Could not initialise talloc context.\n");
return -1; return -1;