File: security.sysconfig

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (39 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (8)
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