summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-05 15:21:43 +0100
committerGünther Deschner <gd@samba.org>2008-03-05 15:23:00 +0100
commit65b0235ee394f90e7a4938cfa5bc5d2d951e9d82 (patch)
treef4121ee250da0c4464395a451c25c8800a866ee2
parent0a15d8a3bd9092d0b08e376fcebcc4c593d046fc (diff)
downloadsamba-65b0235ee394f90e7a4938cfa5bc5d2d951e9d82.tar.gz
samba-65b0235ee394f90e7a4938cfa5bc5d2d951e9d82.tar.bz2
samba-65b0235ee394f90e7a4938cfa5bc5d2d951e9d82.zip
Give a better error message why NetServerSetInfo() may fail in the gui.
Guenther (This used to be commit 1bbbebb7767b8a25532e8be3dbd274c211e34bbd)
-rw-r--r--source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c2
-rw-r--r--source3/lib/netapi/serverinfo.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 73b14d4d87..a3719c7442 100644
--- a/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
@@ -154,7 +154,7 @@ static void callback_apply_description_change(GtkWidget *widget,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
"Failed to change computer description: %s.",
- libnetapi_errstr(status));
+ libnetapi_get_error_string(state->ctx, status));
g_signal_connect_swapped(dialog, "response",
G_CALLBACK(gtk_widget_destroy),
dialog);
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index 54512950bf..d30e7d97f7 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -185,6 +185,9 @@ static WERROR NetServerSetInfoLocal_1005(struct libnetapi_ctx *ctx,
}
if (!lp_config_backend_is_registry()) {
+ libnetapi_set_error_string(ctx,
+ "Configuration manipulation requested but not "
+ "supported by backend");
return WERR_NOT_SUPPORTED;
}