From 6ec4306f8c3fed7ec5b5bd164c5829b2661589b7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 16 Apr 2011 15:41:50 +1000 Subject: auth/kerberos: Create common helper to get the verified PAC from GSSAPI This only works for Heimdal and MIT Krb5 1.8, other versions will get an ACCESS_DEINED error. We no longer manually verify any details of the PAC in Samba for GSSAPI logins, as we never had the information to do it properly, and it is better to have the GSSAPI library handle it. Andrew Bartlett --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 49f11f2e5b..6081ac9d4d 100644 --- a/source3/wscript +++ b/source3/wscript @@ -632,7 +632,7 @@ msg.msg_acctrightslen = sizeof(fd); if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'): have_gssapi=True - conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred', 'gssapi gssapi_krb5 krb5') + conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute', 'gssapi gssapi_krb5 krb5') conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5') conf.CHECK_FUNCS(''' krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes -- cgit From cd7112ba84759a677e51111e44b5f531d602c77c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 16 Apr 2011 15:39:00 +1000 Subject: s3-gse: Don't release the mech OID from gss_accept_security_context This is constant data according to the man pages I find for this fucntion, and causes a segfault to free() when linked to Heimdal. I am advised that while it is constant for gss_mech_krb5, it may not be for other mechanisms, so an assert will ensure this is dealt with by the programmer who extends this code in future. Andrew Bartlett --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 6081ac9d4d..cdafc1683a 100644 --- a/source3/wscript +++ b/source3/wscript @@ -632,7 +632,7 @@ msg.msg_acctrightslen = sizeof(fd); if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'): have_gssapi=True - conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute', 'gssapi gssapi_krb5 krb5') + conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_oid_equal', 'gssapi gssapi_krb5 krb5') conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5') conf.CHECK_FUNCS(''' krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes -- cgit From 47e28702288f065d539baab70907d50b7d59d27e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 27 Apr 2011 14:34:03 +1000 Subject: auth/kerberos Add check for gss_inquire_sec_context_by_oid Not all kerberos distributions have this function. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Wed Apr 27 07:39:08 CEST 2011 on sn-devel-104 --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index cdafc1683a..d9cc0c6124 100644 --- a/source3/wscript +++ b/source3/wscript @@ -632,7 +632,7 @@ msg.msg_acctrightslen = sizeof(fd); if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'): have_gssapi=True - conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_oid_equal', 'gssapi gssapi_krb5 krb5') + conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_oid_equal gss_inquire_sec_context_by_oid', 'gssapi gssapi_krb5 krb5') conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5') conf.CHECK_FUNCS(''' krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes -- cgit From a60889e00695ce2b0c85f01654d4fd42a892b009 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 27 Apr 2011 18:55:24 +1000 Subject: s3-waf Don't enable profiling by default This is disabled by default in the s3-autoconf build. Andrew Bartlett --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index d9cc0c6124..45e60aae7c 100644 --- a/source3/wscript +++ b/source3/wscript @@ -59,7 +59,7 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('syslog') opt.SAMBA3_ADD_OPTION('automount') opt.SAMBA3_ADD_OPTION('aio-support') - opt.SAMBA3_ADD_OPTION('profiling-data') + opt.SAMBA3_ADD_OPTION('profiling-data', default=False) opt.SAMBA3_ADD_OPTION('cluster-support') -- cgit From cad8fafa0391e9f13c2958c45ca5ec57f93f1e7b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Apr 2011 16:07:35 +0200 Subject: s3-waf: check for pthread support. Guenther --- source3/wscript | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 45e60aae7c..3f9dfd9303 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1637,6 +1637,37 @@ main() { if Options.options.with_profiling_data: conf.DEFINE('WITH_PROFILE', 1); + PTHREAD_CFLAGS='error' + PTHREAD_LDFLAGS='error' + + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthread'): + PTHREAD_CFLAGS='-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS' + PTHREAD_LDFLAGS='-lpthread' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthreads'): + PTHREAD_CFLAGS='-D_THREAD_SAFE' + PTHREAD_LDFLAGS='-lpthreads' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'c_r'): + PTHREAD_CFLAGS='-D_THREAD_SAFE -pthread' + PTHREAD_LDFLAGS='-pthread' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNC('pthread_attr_init'): + PTHREAD_CFLAGS='-D_REENTRANT' + PTHREAD_LDFLAGS='-lpthread' + # especially for HP-UX, where the CHECK_FUNC macro fails to test for + # pthread_attr_init. On pthread_mutex_lock it works there... + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_mutex_lock', 'pthread'): + PTHREAD_CFLAGS='-D_REENTRANT' + PTHREAD_LDFLAGS='-lpthread' + + if PTHREAD_CFLAGS != 'error' and PTHREAD_LDFLAGS != 'error': + conf.ADD_CFLAGS(PTHREAD_CFLAGS) + conf.ADD_LDFLAGS(PTHREAD_LDFLAGS) + conf.CHECK_HEADERS('pthread.h') + conf.DEFINE('HAVE_PTHREAD', '1') default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server -- cgit From 66b26195d21f0889e7ccd0de25a5827bb3722196 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 27 Apr 2011 13:16:59 +0200 Subject: s3-waf: add pthreadpool support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Volker, please check. Guenther Autobuild-User: Günther Deschner Autobuild-Date: Wed Apr 27 17:57:32 CEST 2011 on sn-devel-104 --- source3/wscript | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 3f9dfd9303..7f178a4c55 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1669,6 +1669,13 @@ main() { conf.CHECK_HEADERS('pthread.h') conf.DEFINE('HAVE_PTHREAD', '1') + if Options.options.with_pthreadpool: + if conf.CONFIG_SET('HAVE_PTHREAD'): + conf.DEFINE('WITH_PTHREADPOOL', '1') + else: + Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") + conf.undefine('WITH_PTHREADPOOL') + default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin vfs_default -- cgit From a427652010820fdf8fa82cf425f5162cc70348e0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 26 Apr 2011 13:53:45 +1000 Subject: s3-libads: Use ldap_init_fd() to connect to AD server in socket_wrapper This means that we control the connection setup, don't rely on signals for timeouts and the connection uses socket_wrapper where that is required in our test environment. According to bug reports, this method is also used by curl and other tools, so we are not the first to (ab)use the OpenLDAP libs in this way. It is ONLY enabled for socket_wrapper at this time, as this is the best way to get 'make test' working for S3 winbind tests in an S4 domain. Andrew Bartlett --- source3/wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 7f178a4c55..175bbf12ef 100644 --- a/source3/wscript +++ b/source3/wscript @@ -574,7 +574,7 @@ msg.msg_acctrightslen = sizeof(fd); # Check for LDAP if Options.options.with_ldap: - conf.CHECK_HEADERS('ldap.h lber.h') + conf.CHECK_HEADERS('ldap.h lber.h ldap_pvt.h') conf.CHECK_TYPE('ber_tag_t', 'unsigned int', headers='ldap.h lber.h') conf.CHECK_FUNCS_IN('ber_scanf ber_sockbuf_add_io', 'lber') conf.CHECK_VARIABLE('LDAP_OPT_SOCKBUF', headers='ldap.h') @@ -584,7 +584,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.CHECK_VARIABLE('LBER_OPT_LOG_PRINT_FN', define='HAVE_LBER_LOG_PRINT_FN', headers='lber.h') - conf.CHECK_FUNCS_IN('ldap_init ldap_initialize ldap_set_rebind_proc', 'ldap') + conf.CHECK_FUNCS_IN('ldap_init ldap_init_fd ldap_initialize ldap_set_rebind_proc', 'ldap') conf.CHECK_FUNCS_IN('ldap_add_result_entry', 'ldap') # Check if ldap_set_rebind_proc() takes three arguments -- cgit From e1eae822856c076f63874d8d3b07691b3154848d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 30 Apr 2011 12:05:25 +1000 Subject: kerberos: Only include gssapi/gssapi_krb5.h when available --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 175bbf12ef..78ff40c99a 100644 --- a/source3/wscript +++ b/source3/wscript @@ -619,7 +619,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.check_cfg(path="krb5-config", args="--cflags --libs", package="gssapi", uselib_store="krb5") conf.CHECK_HEADERS('krb5.h krb5/locate_plugin.h', lib='krb5') - conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h com_err.h', lib='krb5') + conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h gssapi/gssapi_krb5.h com_err.h', lib='krb5') if conf.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'): conf.env['WINBIND_KRB5_LOCATOR'] = 'bin/winbind_krb5_locator.so' -- cgit From 0d1b2d2033e9cc33accea29a4c3a8fafd3d75aa2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 4 May 2011 18:01:04 +0200 Subject: s3-waf: add vfs_gpfs_hsm_notify to the build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Volker, can you please check this is correct ? Guenther Autobuild-User: Günther Deschner Autobuild-Date: Wed May 4 19:03:45 CEST 2011 on sn-devel-104 --- source3/wscript | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 78ff40c99a..55b62d1c7e 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1676,6 +1676,9 @@ main() { Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") conf.undefine('WITH_PTHREADPOOL') + if conf.CHECK_HEADERS('gpfs_gpl.h'): + conf.DEFINE('HAVE_GPFS', '1') + default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin vfs_default @@ -1716,6 +1719,9 @@ main() { if conf.CONFIG_SET('DARWINOS'): default_shared_modules.extend(TO_LIST('charset_macosxfs')) + if conf.CONFIG_SET('HAVE_GPFS'): + default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify')) + explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') -- cgit From ac25835ab7b76226bd59fec9ffef46d5c5817d54 Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Fri, 6 May 2011 16:00:08 -0700 Subject: Fix Samba3 on OpenIndiana. I'd like Samba to use the native OpenLDAP and MIT Kerberos libs. Attached are some patches to do that. (relative to git master) It does not build for me without these. (OpenIndiana is an off-shoot of OpenSolaris See http://www.openindiana.org) Autobuild-User: Jeremy Allison Autobuild-Date: Sat May 7 02:20:14 CEST 2011 on sn-devel-104 --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 55b62d1c7e..583e97af0f 100644 --- a/source3/wscript +++ b/source3/wscript @@ -632,7 +632,7 @@ msg.msg_acctrightslen = sizeof(fd); if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'): have_gssapi=True - conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_oid_equal gss_inquire_sec_context_by_oid', 'gssapi gssapi_krb5 krb5') + conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_mech_krb5 gss_oid_equal gss_inquire_sec_context_by_oid', 'gssapi gssapi_krb5 krb5') conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5') conf.CHECK_FUNCS(''' krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes -- cgit From d1df1cb714289b90dc173a72e488773960952402 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 8 May 2011 17:35:05 +0200 Subject: build: Allow the C code to know if this is a waf build This allows addition of functionality that can't be handled (for example, due to dependencies) in the autoconf build. Andrew Bartlett --- source3/wscript | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 583e97af0f..4d30592d2f 100644 --- a/source3/wscript +++ b/source3/wscript @@ -78,6 +78,7 @@ def configure(conf): if not conf.env.toplevel_build: version = samba_version.load_version(env=conf.env) conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1) + conf.DEFINE('_SAMBA_WAF_BUILD_', version.MAJOR) conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True) conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True) -- cgit From a47c7f6b4cfc8ce271cfd5addbf8f901d9ab3c6e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 7 May 2011 00:50:04 +1000 Subject: s3-passdb: added pdb_samba4 This uses direct LDB operations and calls to the dsdb library to allow passdb operations (such as pdbedit and smbpasswd) offline, and uses transactions internally for database consistency. Pair-Programmed-With: Andrew Tridgell --- source3/wscript | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 4d30592d2f..ee4a98c85d 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1699,6 +1699,9 @@ main() { default_static_modules.extend(TO_LIST('pdb_ads auth_netlogond')) default_shared_modules.extend(TO_LIST('charset_weird perfcount_test')) + if conf.env.toplevel_build: + default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4')) + if Options.options.with_acl_support and conf.CONFIG_SET('HAVE_POSIX_ACLS'): default_static_modules.extend(TO_LIST('vfs_posixacl')) -- cgit From 5abab13851ff2fc3a5792d08cc753c9b479c8cc1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 31 May 2011 15:38:55 -0700 Subject: Add check for the getcwd function being able to take NULL,0 arguments. --- source3/wscript | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index ee4a98c85d..83b0a0ef04 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1420,6 +1420,16 @@ main() { conf.DEFINE('AIX_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') + # Check for getcwd allowing a NULL arg. + conf.CHECK_CODE(''' +#include +main() { + char *s = getcwd(NULL,0); + exit(s != NULL ? 0 : 1); +}''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, + msg="getcwd takes a NULL argument") + + conf.CHECK_CODE('''enum TDB_ERROR err = TDB_ERR_NESTING''', 'HAVE_TDB_ERR_NESTING', headers='tdb.h', -- cgit From 754c677b0bbf3ea6c7d2a73c93848f1b0d68c91e Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 16:54:15 +0930 Subject: lib: import ccan modules for tdb2 Imported from git://git.ozlabs.org/~ccan/ccan init-1161-g661d41f Signed-off-by: Rusty Russell --- source3/wscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 83b0a0ef04..4b5d98bbc3 100644 --- a/source3/wscript +++ b/source3/wscript @@ -92,6 +92,7 @@ def configure(conf): if not conf.env.toplevel_build: conf.RECURSE('../lib/replace') conf.RECURSE('build') + conf.RECURSE('../lib/ccan') conf.RECURSE('../lib/tdb') conf.RECURSE('../lib/talloc') conf.RECURSE('../lib/tevent') @@ -102,7 +103,7 @@ def configure(conf): conf.RECURSE('../libcli/smbreadline') conf.RECURSE('../lib/util') - conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace''') + conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace #lib''') if not conf.env.USING_SYSTEM_TDB: conf.ADD_EXTRA_INCLUDES('#lib/tdb/include') if not conf.env.USING_SYSTEM_TEVENT: -- cgit From 0e4c358e2710580d5aeb439d767c87aaf4c0f2f3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:25 +0930 Subject: tdb_compat.h: divert every tdb build and includes to tdb_compat We change all the headers and wscript files to use tdb_compat; this means we have one place to decide whether to use TDB1 or TDB2. Signed-off-by: Rusty Russell --- source3/wscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 4b5d98bbc3..12bb08bfd7 100644 --- a/source3/wscript +++ b/source3/wscript @@ -25,7 +25,7 @@ def set_options(opt): opt.RECURSE('../lib/nss_wrapper') opt.RECURSE('../lib/socket_wrapper') opt.RECURSE('../lib/tevent') - opt.RECURSE('../lib/tdb') + opt.RECURSE('../lib/tdb_compat') opt.add_option('--with-static-modules', help=("Comma-separated list of names of modules to statically link in"), @@ -93,7 +93,7 @@ def configure(conf): conf.RECURSE('../lib/replace') conf.RECURSE('build') conf.RECURSE('../lib/ccan') - conf.RECURSE('../lib/tdb') + conf.RECURSE('../lib/tdb_compat') conf.RECURSE('../lib/talloc') conf.RECURSE('../lib/tevent') conf.RECURSE('../lib/popt') @@ -105,7 +105,7 @@ def configure(conf): conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace #lib''') if not conf.env.USING_SYSTEM_TDB: - conf.ADD_EXTRA_INCLUDES('#lib/tdb/include') + conf.ADD_EXTRA_INCLUDES('#lib/tdb_compat') if not conf.env.USING_SYSTEM_TEVENT: conf.ADD_EXTRA_INCLUDES('#lib/tevent') if not conf.env.USING_SYSTEM_TALLOC: -- cgit From de0e0119447060c64f4531c031e5509de3afc1b5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 Jun 2011 09:58:59 +1000 Subject: lib/util/charset: Remove autodetection of charset from LOCALE In the past, our LOCALE would set the display charset of Samba. The display charset has now been removed. This patch removes the support code that detected the locale from the environment. We cannot safely have 'unix charset' follow the locale (at it creates files on disk and entries in databases that must not vary), so this code is unused. As an example, imagine a database is manipulated in the administrator's locale, and then read by smbd starting up in the system default locale. Or smbd restarted by the administrator rather than a startup script. Both of these situations could corrupt databases or filenames on disk. Andrew Bartlett --- source3/wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index 12bb08bfd7..a3a14f0607 100644 --- a/source3/wscript +++ b/source3/wscript @@ -131,7 +131,7 @@ def configure(conf): conf.CHECK_FUNCS('opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64') conf.CHECK_FUNCS('fdopendir fdopendir64') conf.CHECK_FUNCS('getpwent_r getdents64 setenv strcasecmp fcvt fcvtl') - conf.CHECK_FUNCS('syslog vsyslog timegm setlocale nl_langinfo') + conf.CHECK_FUNCS('syslog vsyslog timegm setlocale') conf.CHECK_FUNCS_IN('nanosleep', 'rt') conf.CHECK_FUNCS('lutimes futimes utimensat futimens') conf.CHECK_FUNCS('mlock munlock mlockall munlockall') @@ -289,7 +289,7 @@ inotify_init lgetea lgetxattr listea listxattr llistea llistxattr llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek lseek64 lsetea lsetxattr _lstat __lstat lstat64 _lstat64 __lstat64 lutimes __lxstat memalign mknod mknod64 mlock mlockall munlock munlockall -nl_langinfo _open __open open64 _open64 __open64 _opendir __opendir +_open __open open64 _open64 __open64 _opendir __opendir opendir64 pathconf poll posix_fallocate posix_fallocate64 posix_memalign prctl pread _pread __pread pread64 _pread64 __pread64 pwrite _pwrite __pwrite pwrite64 _pwrite64 -- cgit From 4d2c56c4b1a4f846b44f24c6f73e1b95fdf3a9bb Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 Jun 2011 10:40:26 +1000 Subject: s3-net: Bind our gettext results to 'unix charset' This ensures that the translations and any embedded strings are in the same charset. It won't be the one from the user's locale (we no longer auto-detect that), but it will be self-consistent. Thanks to Steve Langasek for pointing this function out! Andrew Bartlett --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/wscript') diff --git a/source3/wscript b/source3/wscript index a3a14f0607..d88faa2104 100644 --- a/source3/wscript +++ b/source3/wscript @@ -138,7 +138,7 @@ def configure(conf): conf.CHECK_FUNCS('memalign posix_memalign hstrerror') conf.CHECK_FUNCS('shmget') conf.CHECK_FUNCS_IN('shm_open', 'rt', checklibc=True) - conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain') + conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain bind_textdomain_codeset') #FIXME: for some reason this one still fails conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl') conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv') -- cgit