| 1 |
#!/bin/sh |
| 2 |
if [ $# -ne 2 ]; then |
| 3 |
# need 2 command line arguments |
| 4 |
exit 1 |
| 5 |
fi |
| 6 |
subjectdn=$1 |
| 7 |
username=$2 |
| 8 |
|
| 9 |
# example 1: verify the DN matches an accepted pattern |
| 10 |
#if [ "${subjectdn}" != "/O=Grid/OU=MyProxy CA/CN=${username}" ]; then |
| 11 |
# exit 1 |
| 12 |
#fi |
| 13 |
|
| 14 |
# example 2: check the DN against a blacklist |
| 15 |
#blacklistfile="/etc/myproxy-server-blacklist" |
| 16 |
#if [ -r $blacklistfile ]; then |
| 17 |
# grep "${subjectdn}" $blacklistfile >/dev/null 2>&1 |
| 18 |
# if [ $? -eq 0 ]; then |
| 19 |
# logger -t myproxy-server denied blacklisted user: "${subjectdn}" |
| 20 |
# exit 1; |
| 21 |
# fi |
| 22 |
#fi |
| 23 |
|
| 24 |
exit 0 |