summaryrefslogtreecommitdiff
path: root/source/libnet/libnet_join.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-28 17:02:14 +0100
committerGünther Deschner <gd@samba.org>2008-02-28 17:05:38 +0100
commit892b2bc0cf1692c5707d322d0eb711b8245a3a96 (patch)
treeb10f9b40c948599d8583b0758bace0a9fa578c10 /source/libnet/libnet_join.c
parent58048f0c575d6ac5b770873e308d4a1a9ce68123 (diff)
downloadsamba-892b2bc0cf1692c5707d322d0eb711b8245a3a96.tar.gz
Add some more error handling in libnetjoin.
Guenther
Diffstat (limited to 'source/libnet/libnet_join.c')
-rw-r--r--source/libnet/libnet_join.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 623ca39f715..97fad95a680 100644
--- a/source/libnet/libnet_join.c
+++ b/source/libnet/libnet_join.c
@@ -1193,6 +1193,9 @@ static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx,
}
if (r->in.modify_config && !lp_config_backend_is_registry()) {
+ libnet_join_set_error_string(mem_ctx, r,
+ "Configuration manipulation requested but not "
+ "supported by backend");
return WERR_NOT_SUPPORTED;
}
@@ -1519,9 +1522,16 @@ static WERROR libnet_unjoin_pre_processing(TALLOC_CTX *mem_ctx,
}
if (r->in.modify_config && !lp_config_backend_is_registry()) {
+ libnet_unjoin_set_error_string(mem_ctx, r,
+ "Configuration manipulation requested but not "
+ "supported by backend");
return WERR_NOT_SUPPORTED;
}
+ if (IS_DC) {
+ return WERR_SETUP_DOMAIN_CONTROLLER;
+ }
+
if (!secrets_init()) {
libnet_unjoin_set_error_string(mem_ctx, r,
"Unable to open secrets database");