samba/samba-3.2.0pre2-libnetapi_f...

82 lines
2.8 KiB
Diff

commit 29fca3c0353f2be4577613d7e38fbc51d2a370fa
Author: Günther Deschner <gd@samba.org>
Date: Wed Mar 5 13:20:32 2008 +0100
Add PICFLAG to libnetapi Makefile.
Guenther
diff --git a/source/lib/netapi/examples/Makefile.in b/source/lib/netapi/examples/Makefile.in
index 6de3e65..000eef1 100644
--- a/source/lib/netapi/examples/Makefile.in
+++ b/source/lib/netapi/examples/Makefile.in
@@ -7,6 +7,7 @@ LIBS=@LIBS@ -lnetapi -ltdb -ltalloc
DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
FLAGS=-I../ -L../../../bin @CFLAGS@ $(GTK_FLAGS)
CC=@CC@
+PICFLAG=@PICFLAG@
LDFLAGS=@PIE_LDFLAGS@ @LDFLAGS@
DYNEXP=@DYNEXP@
commit d9f4060c660da0ad671e061b123df71d109d51b9
Author: Günther Deschner <gd@samba.org>
Date: Thu Mar 6 00:51:20 2008 +0100
Fix lp_load with an empty registry and "config backend = registry". Michael, please check.
Guenther
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 5651a43..25aa48b 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -3404,6 +3404,13 @@ static bool process_registry_globals(bool (*pfunc)(const char *, const char *))
}
}
+ if (!libnet_conf_share_exists(conf_ctx, GLOBAL_NAME)) {
+ /* nothing to read from the registry yet but make sure lp_load
+ * doesn't return false */
+ ret = true;
+ goto done;
+ }
+
werr = libnet_conf_get_share(mem_ctx, conf_ctx, GLOBAL_NAME,
&num_params, &param_names, &param_values);
if (!W_ERROR_IS_OK(werr)) {
commit 1bbbebb7767b8a25532e8be3dbd274c211e34bbd
Author: Günther Deschner <gd@samba.org>
Date: Wed Mar 5 15:21:43 2008 +0100
Give a better error message why NetServerSetInfo() may fail in the gui.
Guenther
diff --git a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c b/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
index 73b14d4..a3719c7 100644
--- a/source/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui.c
+++ b/source/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/source/lib/netapi/serverinfo.c b/source/lib/netapi/serverinfo.c
index 5451295..d30e7d9 100644
--- a/source/lib/netapi/serverinfo.c
+++ b/source/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;
}