summaryrefslogtreecommitdiffstats
path: root/src/tests/cwrap/cwrap_test_setup.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 05:31:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 05:31:45 +0000
commit74aa0bc6779af38018a03fd2cf4419fe85917904 (patch)
tree9cb0681aac9a94a49c153d5823e7a55d1513d91f /src/tests/cwrap/cwrap_test_setup.sh
parentInitial commit. (diff)
downloadsssd-74aa0bc6779af38018a03fd2cf4419fe85917904.tar.xz
sssd-74aa0bc6779af38018a03fd2cf4419fe85917904.zip
Adding upstream version 2.9.4.upstream/2.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/cwrap/cwrap_test_setup.sh')
-rwxr-xr-xsrc/tests/cwrap/cwrap_test_setup.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/cwrap/cwrap_test_setup.sh b/src/tests/cwrap/cwrap_test_setup.sh
new file mode 100755
index 0000000..e2f78e9
--- /dev/null
+++ b/src/tests/cwrap/cwrap_test_setup.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+pkg-config --exists nss_wrapper || exit 1
+pkg-config --exists uid_wrapper || exit 1
+
+nss_wrapper=$(pkg-config --libs nss_wrapper)
+uid_wrapper=$(pkg-config --libs uid_wrapper)
+if [ -z $nss_wrapper -o -z $uid_wrapper ]; then
+ echo "Cannot locate cwrap libraries"
+ exit 2
+fi
+
+export LD_PRELOAD="$nss_wrapper $uid_wrapper"
+export NSS_WRAPPER_PASSWD=$CWRAP_TEST_SRCDIR/passwd
+export NSS_WRAPPER_GROUP=$CWRAP_TEST_SRCDIR/group
+export UID_WRAPPER=1
+export UID_WRAPPER_ROOT=1
+
+export LDB_MODULES_PATH=$ABS_TOP_BUILDDIR/ldb_mod_test_dir