summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba_third_party.py5
-rw-r--r--third_party/uid_wrapper/uid_wrapper.c (renamed from lib/uid_wrapper/uid_wrapper.c)0
-rw-r--r--third_party/uid_wrapper/wscript (renamed from lib/uid_wrapper/wscript)5
-rw-r--r--third_party/wscript3
-rw-r--r--wscript6
-rw-r--r--wscript_build2
6 files changed, 15 insertions, 6 deletions
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index 99336154def..3253f948b8b 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -54,3 +54,8 @@ Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER
def CHECK_RESOLV_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.4')
Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER
+
+@conf
+def CHECK_UID_WRAPPER(conf):
+ return conf.CHECK_BUNDLED_SYSTEM_PKG('uid_wrapper', minversion='1.2.4')
+Build.BuildContext.CHECK_UID_WRAPPER = CHECK_UID_WRAPPER
diff --git a/lib/uid_wrapper/uid_wrapper.c b/third_party/uid_wrapper/uid_wrapper.c
index 8f41ed92cb9..8f41ed92cb9 100644
--- a/lib/uid_wrapper/uid_wrapper.c
+++ b/third_party/uid_wrapper/uid_wrapper.c
diff --git a/lib/uid_wrapper/wscript b/third_party/uid_wrapper/wscript
index 9c1c0090770..6e1540f108d 100644
--- a/lib/uid_wrapper/wscript
+++ b/third_party/uid_wrapper/wscript
@@ -6,7 +6,7 @@ import os, sys
VERSION="1.2.4"
def configure(conf):
- if conf.CHECK_BUNDLED_SYSTEM('uid_wrapper', minversion=VERSION, set_target=False):
+ if conf.CHECK_UID_WRAPPER():
conf.DEFINE('USING_SYSTEM_UID_WRAPPER', 1)
libuid_wrapper_so_path = 'libuid_wrapper.so'
else:
@@ -113,7 +113,7 @@ syscall(SYS_setgroups32, 0, NULL);
# Create full path to uid_wrapper
blddir = os.path.realpath(conf.blddir)
- libuid_wrapper_so_path = blddir + '/default/lib/uid_wrapper/libuid-wrapper.so'
+ libuid_wrapper_so_path = blddir + '/default/third_party/uid_wrapper/libuid-wrapper.so'
conf.DEFINE('LIBUID_WRAPPER_SO_PATH', libuid_wrapper_so_path)
conf.DEFINE('UID_WRAPPER', 1)
@@ -128,4 +128,3 @@ def build(bld):
deps='dl',
install=False,
realname='libuid-wrapper.so')
-
diff --git a/third_party/wscript b/third_party/wscript
index a39c1ebdc10..72f1daabcde 100644
--- a/third_party/wscript
+++ b/third_party/wscript
@@ -55,6 +55,7 @@ def configure(conf):
conf.RECURSE('socket_wrapper')
conf.RECURSE('nss_wrapper')
conf.RECURSE('resolv_wrapper')
+ conf.RECURSE('uid_wrapper')
def build(bld):
@@ -85,3 +86,5 @@ def build(bld):
bld.RECURSE('nss_wrapper')
if bld.CONFIG_GET('RESOLV_WRAPPER'):
bld.RECURSE('resolv_wrapper')
+ if bld.CONFIG_GET('UID_WRAPPER'):
+ bld.RECURSE('uid_wrapper')
diff --git a/wscript b/wscript
index 771555a1c04..7dbaa90e773 100644
--- a/wscript
+++ b/wscript
@@ -171,6 +171,11 @@ def configure(conf):
else:
conf.define('USING_SYSTEM_RESOLV_WRAPPER', 1)
+ if not conf.CHECK_UID_WRAPPER():
+ raise Utils.WafError('uid_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_UID_WRAPPER', 1)
+
conf.RECURSE('lib/ldb')
if not (Options.options.without_ad_dc):
@@ -199,7 +204,6 @@ def configure(conf):
conf.RECURSE('lib/crypto')
conf.RECURSE('pidl')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
- conf.RECURSE('lib/uid_wrapper')
if Options.options.with_pam:
conf.RECURSE('lib/pam_wrapper')
if Options.options.with_ntvfs_fileserver != False:
diff --git a/wscript_build b/wscript_build
index 2e892280398..b7ebaae630e 100644
--- a/wscript_build
+++ b/wscript_build
@@ -69,8 +69,6 @@ bld.RECURSE('source4/lib/cmdline')
bld.RECURSE('source4/lib/http')
if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
bld.RECURSE('lib/pam_wrapper')
-if bld.CONFIG_GET('UID_WRAPPER'):
- bld.RECURSE('lib/uid_wrapper')
if bld.CHECK_FOR_THIRD_PARTY():
bld.RECURSE('third_party')
bld.RECURSE('source4/lib/stream')