From deaa473859ffdb8c15c6fc7bc04113fe29524135 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 18 Dec 2014 10:21:30 +0100 Subject: [PATCH 1/3] wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY() Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett (similar to commit 82e583b04b04e560c121163850d70c52d2fce78d) --- buildtools/wafsamba/wafsamba.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index d26b7b5..ba8b40b 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -109,6 +109,7 @@ def SAMBA_LIBRARY(bld, libname, source, ldflags='', external_library=False, realname=None, + keep_underscore=False, autoproto=None, autoproto_extra_source='', group='libraries', @@ -209,7 +210,10 @@ def SAMBA_LIBRARY(bld, libname, source, libname) if target_type == 'PYTHON' or realname or not private_library: - bundled_name = libname.replace('_', '-') + if keep_underscore: + bundled_name = libname + else: + bundled_name = libname.replace('_', '-') else: bundled_name = PRIVATE_NAME(bld, libname, bundled_extension, private_library) -- 1.9.1 From 2746e31d2b7e7bc48c298823b851855d5e2f86b8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 18 Dec 2014 20:13:44 +0100 Subject: [PATCH 2/3] selftest: use shared/libnss_wrapper_winbind.so.2 This library is always available in make test. nss-wrapper strictly requires the linux nss api. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett (similar to commit 4eb24fa545234be506eb1330ccbbfd5c2b9e0d82) --- selftest/target/Samba.pm | 3 ++- source4/selftest/tests.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm index 5f18a47..684eacb 100644 --- a/selftest/target/Samba.pm +++ b/selftest/target/Samba.pm @@ -68,7 +68,8 @@ sub nss_wrapper_winbind_so_path($) { my ($object) = @_; my $ret = $ENV{NSS_WRAPPER_WINBIND_SO_PATH}; if (not defined($ret)) { - $ret = bindir_path($object, "default/nsswitch/libnss-winbind.so"); + $ret = bindir_path($object, "shared/libnss_wrapper_winbind.so.2"); + $ret = abs_path($ret); } return $ret; } diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 6552b35..004118b 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -382,7 +382,7 @@ for env in ["plugin_s4_dc", "dc", "s4member"]: nsstest4 = binpath("nsstest") for env in ["plugin_s4_dc", "dc", "s4member", "s3dc", "s3member", "member"]: if os.path.exists(nsstest4): - plantestsuite("samba4.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "default/nsswitch/libnss-winbind.so")]) + plantestsuite("samba4.nss.test using winbind(%s)" % env, env, [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "shared/libnss_wrapper_winbind.so.2")]) else: skiptestsuite("samba4.nss.test using winbind(%s)" % env, "nsstest not available") -- 1.9.1 From ff972ba6559442af20a9df795094ac7ed808577a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 18 Dec 2014 10:33:34 +0100 Subject: [PATCH 3/3] nsswitch: fix soname of linux nss_*.so.2 modules Bug: https://bugzilla.samba.org/show_bug.cgi?id=9299 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider (similar to commit 575b093dac3c509b1bfaab0b4ad29b9b4214e487) --- nsswitch/wscript_build | 24 ++++++++++++++++++------ source3/wscript_build | 7 ------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build index 55ba776..0e33730 100644 --- a/nsswitch/wscript_build +++ b/nsswitch/wscript_build @@ -30,12 +30,24 @@ bld.SAMBA_LIBRARY('nss_wrapper_winbind', # the search for .rfind('gnu') covers gnu* and *-gnu is that too broad? if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)): - bld.SAMBA_LIBRARY('nss_winbind', - source='winbind_nss_linux.c', - deps='winbind-client', - realname='libnss_winbind.so.2', - soname='libnss_winbind.so', - vnum='2') + bld.SAMBA_LIBRARY('nss_winbind', + keep_underscore=True, + source='winbind_nss_linux.c', + deps='winbind-client', + public_headers=[], + public_headers_install=False, + pc_files=[], + vnum='2') + + # for nss_wins is linux only + bld.SAMBA3_LIBRARY('nss_wins', + keep_underscore=True, + source='wins.c', + deps='''param libsmb LIBTSOCKET''', + public_headers=[], + public_headers_install=False, + pc_files=[], + vnum='2') elif (host_os.rfind('freebsd') > -1): # FreeBSD winbind client is implemented as a wrapper around # the Linux version. diff --git a/source3/wscript_build b/source3/wscript_build index c4281ed..8795a93 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -653,13 +653,6 @@ bld.SAMBA3_LIBRARY('smbsharemodes', vnum='0', vars=locals()) -bld.SAMBA3_LIBRARY('nss_wins', - source=WINBIND_WINS_NSS_SRC, - deps='''param libsmb LIBTSOCKET''', - realname='libnss_wins.so.2', - soname='libnss_wins.so', - vnum='2') - bld.SAMBA3_LIBRARY('gse', source='librpc/crypto/gse_krb5.c librpc/crypto/gse.c', deps='krb5samba gensec param KRBCLIENT secrets3', -- 1.9.1