From 6ead7fbae534b7cc25310d8ea2875fc2e737a2b7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Nov 2010 18:04:02 +1100 Subject: s3-libnetapi Load case tables earlier If we don't load the case tables as the 'first' thing we do, we will segfault on the first case insensitive string comparison. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Wed Nov 24 09:21:05 CET 2010 on sn-devel-104 --- source3/lib/netapi/netapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 4bb8004e1a..9d76017a01 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -67,14 +67,15 @@ NET_API_STATUS libnetapi_init(struct libnetapi_ctx **context) #endif frame = talloc_stackframe(); + /* Case tables must be loaded before any string comparisons occour */ + load_case_tables(); + /* When libnetapi is invoked from an application, it does not * want to be swamped with level 10 debug messages, even if * this has been set for the server in smb.conf */ lp_set_cmdline("log level", "0"); setup_logging("libnetapi", DEBUG_STDERR); - load_case_tables(); - if (!lp_load(get_dyn_CONFIGFILE(), true, false, false, false)) { TALLOC_FREE(frame); fprintf(stderr, "error loading %s\n", get_dyn_CONFIGFILE() ); -- cgit