diff options
author | Günther Deschner <gd@samba.org> | 2008-02-28 11:26:47 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-28 11:38:01 +0100 |
commit | 46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d (patch) | |
tree | e8d2b08217c9b66bfb7f9eb27ec21f80ae98b08f | |
parent | 4ba6c04d0a1f229cd75de9e3ea6be07653b34b51 (diff) | |
download | samba-46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d.tar.gz samba-46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d.tar.bz2 samba-46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d.zip |
Check for mandatory domain name in libnetjoin/unjoin.
Guenther
(This used to be commit 95bdf2f23c195cad1b317995e362f153695e793a)
-rw-r--r-- | source3/libnet/libnet_join.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index c690cfc0dc..31eec80561 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/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; } |