tests: verify that groupname is read correctly when in kerberos auth

This commit is contained in:
Nikos Mavrogiannopoulos
2015-06-29 14:40:28 +02:00
parent 7716f725ff
commit b2ca1cd069
3 changed files with 16 additions and 1 deletions

View File

@@ -6,6 +6,15 @@ if [ "$REASON" != "connect" ];then
else
echo $STATS_BYTES_IN >/tmp/disconnect/not-ok
fi
elif [ "$REASON" = "connect" ];then
rm -f /tmp/disconnect/group-ok
if test "$GROUPNAME" != "testuser";then
echo "Groupname failed: $GROUPNAME" >/tmp/group-not-ok
exit 1;
else
echo "Groupname ok: $GROUPNAME" >/tmp/group-ok
fi
fi
exit 0

View File

@@ -158,7 +158,7 @@ rekey-method = ssl
# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
# in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
# ID (a unique numeric ID); REASON may be "connect" or "disconnect".
#connect-script = /usr/bin/myscript
connect-script = /usr/bin/myscript
disconnect-script = /usr/bin/myscript
# UTMP

View File

@@ -104,6 +104,12 @@ if test $? != 0;then
ret=1
fi
check_for_file /tmp/group-ok test_ocserv_kerberos
if test $? != 0;then
echo "Kerberos group name detection test failed"
ret=1
fi
$DOCKER stop test_ocserv_kerberos
$DOCKER rm test_ocserv_kerberos
$DOCKER stop test_ocserv_client_kerberos