From: Günther Deschner Date: Thu, 28 Feb 2008 10:26:47 +0000 (+0100) Subject: Check for mandatory domain name in libnetjoin/unjoin. X-Git-Tag: samba-3.2.0pre2~37^2~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95bdf2f23c195cad1b317995e362f153695e793a;p=thirdparty%2Fsamba.git Check for mandatory domain name in libnetjoin/unjoin. Guenther --- diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index c690cfc0dc7..31eec805619 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -1171,8 +1171,9 @@ static WERROR libnet_unjoin_config(struct libnet_UnjoinCtx *r) static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx, struct libnet_JoinCtx *r) { - if (!r->in.domain_name) { + libnet_join_set_error_string(mem_ctx, r, + "No domain name defined"); return WERR_INVALID_PARAM; } @@ -1496,6 +1497,12 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, static WERROR libnet_unjoin_pre_processing(TALLOC_CTX *mem_ctx, struct libnet_UnjoinCtx *r) { + if (!r->in.domain_name) { + libnet_unjoin_set_error_string(mem_ctx, r, + "No domain name defined"); + return WERR_INVALID_PARAM; + } + if (r->in.modify_config && !lp_config_backend_is_registry()) { return WERR_NOT_SUPPORTED; }