s4-torture: fix type of enum in various places
[Samba.git] / python / samba / tests / test_pam_winbind.sh
blobc535759885ccecdae2a5e307ecb2c2a7cddc8717
1 #!/bin/sh
3 PYTHON="$1"
4 PAM_WRAPPER_SO_PATH="$2"
5 shift 2
7 DOMAIN="$1"
8 export DOMAIN
9 USERNAME="$2"
10 export USERNAME
11 PASSWORD="$3"
12 export PASSWORD
13 shift 3
15 PAM_WRAPPER_PATH="$BINDIR/default/lib/pam_wrapper"
17 pam_winbind="$BINDIR/shared/pam_winbind.so"
18 service_dir="$SELFTEST_TMPDIR/pam_services"
19 service_file="$service_dir/samba"
21 mkdir $service_dir
22 echo "auth required $pam_winbind debug debug_state" > $service_file
23 echo "account required $pam_winbind debug debug_state" >> $service_file
24 echo "password required $pam_winbind debug debug_state" >> $service_file
25 echo "session required $pam_winbind debug debug_state" >> $service_file
27 PAM_WRAPPER="1"
28 export PAM_WRAPPER
29 PAM_WRAPPER_SERVICE_DIR="$service_dir"
30 export PAM_WRAPPER_SERVICE_DIR
31 LD_PRELOAD="$LD_PRELOAD:$PAM_WRAPPER_SO_PATH"
32 export LD_PRELOAD
34 PAM_WRAPPER_DEBUGLEVEL=${PAM_WRAPPER_DEBUGLEVEL:="2"}
35 export PAM_WRAPPER_DEBUGLEVEL
37 PYTHONPATH="$PYTHONPATH:$PAM_WRAPPER_PATH:$(dirname $0)" $PYTHON -m samba.subunit.run samba.tests.pam_winbind
38 exit_code=$?
40 rm -rf $service_dir
42 exit $exit_code