1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
GSI_SEC_DIR=/etc/grid-security
RETVAL=0
case "$1" in
CENTRAL)
KRB5_PRINCIPAL=host/`hostname`
GSI_CERT=castor-central-cert.pem
GSI_KEY=castor-central.pem
;;
DISK)
KRB5_PRINCIPAL=host/`hostname`
GSI_CERT=castor-disk-cert.pem
GSI_KEY=castor-disk.pem
;;
TAPE)
KRB5_PRINCIPAL=host/`hostname`
GSI_CERT=castor-tape-cert.pem
GSI_KEY=castor-tape.pem
;;
*)
echo "Usage: $0 {CENTRAL|DISK|TAPE}"
RETVAL=1;
;;
esac
if [ $RETVAL -ne 1 ]; then
/usr/sue/bin/kinit -k $KRB5_PRINCIPAL
export X509_USER_CERT=$GSI_SEC_DIR/$GSI_CERT
export X509_USER_KEY=$GSI_SEC_DIR/$GSI_KEY
export CSEC_MECH=KRB5
export CSEC_AUTH_MECH='KRB5 GSI'
fi
#export CSEC_TRACE=1
#export CSEC_TRACEFILE=/tmp/vmgr_csec_trace
|