[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-2632-g3ace160
Günther Deschner
gd at samba.org
Thu Feb 28 16:32:28 GMT 2008
The branch, v3-2-test has been updated
via 3ace1601ac5b5d87d6bfd8aa0afe0c75858b6990 (commit)
via 892b2bc0cf1692c5707d322d0eb711b8245a3a96 (commit)
via 58048f0c575d6ac5b770873e308d4a1a9ce68123 (commit)
from 01596c9335f0e7f2fd618e79fe313caf97dbb2f4 (commit)
http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 3ace1601ac5b5d87d6bfd8aa0afe0c75858b6990
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 28 17:09:47 2008 +0100
Only set DEBUGLEVEL to 0 in libnetapi when not set already.
Guenther
commit 892b2bc0cf1692c5707d322d0eb711b8245a3a96
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 28 17:02:14 2008 +0100
Add some more error handling in libnetjoin.
Guenther
commit 58048f0c575d6ac5b770873e308d4a1a9ce68123
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 28 16:56:35 2008 +0100
Use libnetapi_get_error_string() in "net dom" commands.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/lib/netapi/netapi.c | 4 +++-
source/libnet/libnet_join.c | 10 ++++++++++
source/utils/net_dom.c | 4 ++--
3 files changed, 15 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/netapi/netapi.c b/source/lib/netapi/netapi.c
index 47b3ba9..fb091f6 100644
--- a/source/lib/netapi/netapi.c
+++ b/source/lib/netapi/netapi.c
@@ -50,7 +50,9 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context)
return W_ERROR_V(WERR_NOMEM);
}
- DEBUGLEVEL = 0;
+ if (!DEBUGLEVEL) {
+ DEBUGLEVEL = 0;
+ }
setup_logging("libnetapi", true);
dbf = x_stderr;
diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c
index 623ca39..97fad95 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");
diff --git a/source/utils/net_dom.c b/source/utils/net_dom.c
index 30993ae..e88bbdb 100644
--- a/source/utils/net_dom.c
+++ b/source/utils/net_dom.c
@@ -101,7 +101,7 @@ static int net_dom_unjoin(int argc, const char **argv)
status = NetUnjoinDomain(server_name, account, password, unjoin_flags);
if (status != 0) {
printf("Failed to unjoin domain: %s\n",
- libnetapi_errstr(status));
+ libnetapi_get_error_string(ctx, status));
goto done;
}
@@ -215,7 +215,7 @@ static int net_dom_join(int argc, const char **argv)
Account, password, join_flags);
if (status != 0) {
printf("Failed to join domain: %s\n",
- libnetapi_errstr(status));
+ libnetapi_get_error_string(ctx, status));
goto done;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list