mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
tests: verify that groupname is read correctly when in kerberos auth
This commit is contained in:
@@ -6,6 +6,15 @@ if [ "$REASON" != "connect" ];then
|
|||||||
else
|
else
|
||||||
echo $STATS_BYTES_IN >/tmp/disconnect/not-ok
|
echo $STATS_BYTES_IN >/tmp/disconnect/not-ok
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ rekey-method = ssl
|
|||||||
# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
|
# 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),
|
# 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".
|
# 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
|
disconnect-script = /usr/bin/myscript
|
||||||
|
|
||||||
# UTMP
|
# UTMP
|
||||||
|
|||||||
@@ -104,6 +104,12 @@ if test $? != 0;then
|
|||||||
ret=1
|
ret=1
|
||||||
fi
|
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 stop test_ocserv_kerberos
|
||||||
$DOCKER rm test_ocserv_kerberos
|
$DOCKER rm test_ocserv_kerberos
|
||||||
$DOCKER stop test_ocserv_client_kerberos
|
$DOCKER stop test_ocserv_client_kerberos
|
||||||
|
|||||||
Reference in New Issue
Block a user