428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek#!/bin/bash
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekpkg-config --exists nss_wrapper || exit 1
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekpkg-config --exists uid_wrapper || exit 1
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozeknss_wrapper=$(pkg-config --libs nss_wrapper)
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekuid_wrapper=$(pkg-config --libs uid_wrapper)
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekif [ -z $nss_wrapper -o -z $uid_wrapper ]; then
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek echo "Cannot locate cwrap libraries"
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek exit 2
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekfi
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozek
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekexport LD_PRELOAD="$nss_wrapper $uid_wrapper"
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekexport NSS_WRAPPER_PASSWD=$CWRAP_TEST_SRCDIR/passwd
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekexport NSS_WRAPPER_GROUP=$CWRAP_TEST_SRCDIR/group
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekexport UID_WRAPPER=1
428db8a58c0c149d5efccc6d788f70916c1d34d7Jakub Hrozekexport UID_WRAPPER_ROOT=1
d9e88bddc99bae0542b2179c9b94c968855b0fd0Petr Cech
900778b5afd0143005cfd40cc67ad5086481f7eeLukas Slebodnikexport LDB_MODULES_PATH=$ABS_TOP_BUILDDIR/ldb_mod_test_dir