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:
@ -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;
|
||||||
|
Reference in New Issue
Block a user