Give a better error message why NetServerSetInfo() may fail in the gui.
authorGünther Deschner <gd@samba.org>
Wed, 5 Mar 2008 14:21:43 +0000 (15:21 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 Mar 2008 08:14:41 +0000 (09:14 +0100)
Guenther
(cherry picked from commit 1bbbebb7767b8a25532e8be3dbd274c211e34bbd)
(This used to be commit 370d030b227486ba87a98f4f6e8920f52f743a94)

source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
source3/lib/netapi/serverinfo.c

index 73b14d4d874971c29a27437ba2514c2de7f9b08c..a3719c7442c60da8ac5216d07c6b49358880a73b 100644 (file)
@@ -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);
index 7fa166e411fbe84e1396420ce449af72e766378e..09f275bac9a19dca6e09f95bf9c019df565cd89f 100644 (file)
@@ -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;
        }