summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba_third_party.py5
-rw-r--r--lib/README2
-rwxr-xr-xselftest/target/Samba3.pm2
-rw-r--r--third_party/nss_wrapper/nss_wrapper.c (renamed from lib/nss_wrapper/nss_wrapper.c)0
-rwxr-xr-xthird_party/nss_wrapper/nss_wrapper.pl (renamed from lib/nss_wrapper/nss_wrapper.pl)0
-rw-r--r--third_party/nss_wrapper/wscript (renamed from lib/nss_wrapper/wscript)4
-rw-r--r--third_party/wscript3
-rw-r--r--wscript6
-rw-r--r--wscript_build2
9 files changed, 16 insertions, 8 deletions
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index 170c101099a..917f8b92956 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -44,3 +44,8 @@ Build.BuildContext.CHECK_CMOCKA = CHECK_CMOCKA
def CHECK_SOCKET_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.1.7')
Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
+
+@conf
+def CHECK_NSS_WRAPPER(conf):
+ return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.3')
+Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER
diff --git a/lib/README b/lib/README
index 971438b0576..24e9fac5c66 100644
--- a/lib/README
+++ b/lib/README
@@ -1,7 +1,5 @@
compression - Various compression algorithms (MSZIP, lzxpress)
dnspython - Python module for working with DNS.
-nss_wrapper - Wrapper for the user and group NSS API allowing the use
- of other data sources.
popt - Command-line option parsing library
replace - Provides replacements for standard (POSIX, C99) functions
not provided by the host platform.
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 688045522af..f0e6a63175d 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1598,7 +1598,7 @@ sub provision($$$$$$$$$)
my $conffile="$libdir/server.conf";
my $dfqconffile="$libdir/dfq.conf";
- my $nss_wrapper_pl = "$ENV{PERL} $self->{srcdir}/lib/nss_wrapper/nss_wrapper.pl";
+ my $nss_wrapper_pl = "$ENV{PERL} $self->{srcdir}/third_party/nss_wrapper/nss_wrapper.pl";
my $nss_wrapper_passwd = "$privatedir/passwd";
my $nss_wrapper_group = "$privatedir/group";
my $nss_wrapper_hosts = "$ENV{SELFTEST_PREFIX}/hosts";
diff --git a/lib/nss_wrapper/nss_wrapper.c b/third_party/nss_wrapper/nss_wrapper.c
index 566d02ca34b..566d02ca34b 100644
--- a/lib/nss_wrapper/nss_wrapper.c
+++ b/third_party/nss_wrapper/nss_wrapper.c
diff --git a/lib/nss_wrapper/nss_wrapper.pl b/third_party/nss_wrapper/nss_wrapper.pl
index 48fa2c52b8f..48fa2c52b8f 100755
--- a/lib/nss_wrapper/nss_wrapper.pl
+++ b/third_party/nss_wrapper/nss_wrapper.pl
diff --git a/lib/nss_wrapper/wscript b/third_party/nss_wrapper/wscript
index f35e94e4068..90c6e71d6e9 100644
--- a/lib/nss_wrapper/wscript
+++ b/third_party/nss_wrapper/wscript
@@ -5,7 +5,7 @@ import os
VERSION="1.1.3"
def configure(conf):
- if conf.CHECK_BUNDLED_SYSTEM('nss_wrapper', minversion=VERSION, set_target=False):
+ if conf.CHECK_NSS_WRAPPER():
conf.DEFINE('USING_SYSTEM_NSS_WRAPPER', 1)
libnss_wrapper_so_path = 'libnss_wrapper.so'
else:
@@ -102,7 +102,7 @@ def configure(conf):
# Create full path to nss_wrapper
blddir = os.path.realpath(conf.blddir)
- libnss_wrapper_so_path = blddir + '/default/lib/nss_wrapper/libnss-wrapper.so'
+ libnss_wrapper_so_path = blddir + '/default/third_party/nss_wrapper/libnss-wrapper.so'
conf.DEFINE('LIBNSS_WRAPPER_SO_PATH', libnss_wrapper_so_path)
conf.DEFINE('NSS_WRAPPER', 1)
diff --git a/third_party/wscript b/third_party/wscript
index a5192eb5f1c..9c6bccffb61 100644
--- a/third_party/wscript
+++ b/third_party/wscript
@@ -53,6 +53,7 @@ def configure(conf):
conf.RECURSE('aesni-intel')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('socket_wrapper')
+ conf.RECURSE('nss_wrapper')
def build(bld):
@@ -79,3 +80,5 @@ def build(bld):
bld.RECURSE('aesni-intel')
if bld.CONFIG_GET('SOCKET_WRAPPER'):
bld.RECURSE('socket_wrapper')
+ if bld.CONFIG_GET('NSS_WRAPPER'):
+ bld.RECURSE('nss_wrapper')
diff --git a/wscript b/wscript
index f7bdb1f3d39..30cf0251738 100644
--- a/wscript
+++ b/wscript
@@ -161,6 +161,11 @@ def configure(conf):
else:
conf.define('USING_SYSTEM_SOCKET_WRAPPER', 1)
+ if not conf.CHECK_NSS_WRAPPER():
+ raise Utils.WafError('nss_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_NSS_WRAPPER', 1)
+
conf.RECURSE('lib/ldb')
if not (Options.options.without_ad_dc):
@@ -189,7 +194,6 @@ def configure(conf):
conf.RECURSE('lib/crypto')
conf.RECURSE('pidl')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
- conf.RECURSE('lib/nss_wrapper')
conf.RECURSE('lib/resolv_wrapper')
conf.RECURSE('lib/uid_wrapper')
if Options.options.with_pam:
diff --git a/wscript_build b/wscript_build
index 4d8c098e9af..d3982a39634 100644
--- a/wscript_build
+++ b/wscript_build
@@ -67,8 +67,6 @@ bld.RECURSE('source4/lib/messaging')
bld.RECURSE('source4/lib/events')
bld.RECURSE('source4/lib/cmdline')
bld.RECURSE('source4/lib/http')
-if bld.CONFIG_GET('NSS_WRAPPER'):
- bld.RECURSE('lib/nss_wrapper')
if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
bld.RECURSE('lib/pam_wrapper')
if bld.CONFIG_GET('RESOLV_WRAPPER'):