This file is indexed.

/usr/share/sadms-2.0.15/conf/config-pam_mount.sh is in sadms 2.0.15.repack-0ubuntu2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# bbou@ac-toulouse.fr
# 14/07/2009 
# conf/config-pam_mount.sh

### I N C L U D E
. ./_include.sh

### P A R A M S
if [ "$1" == "-f" ];then
	MYDIR="$2"
	shift
	shift
else
	MYDIR="${PAMDIR}"
fi
MYSERVICES="$1"
MYMODES="$2"
#echo "dir=${MYDIR}"
#echo "services=${MYSERVICES}"
#echo "modes=${MYMODES}"

### M O D I F I E D   F I L E S ...
# those specified by ${MYDIR}/${MYSERVICES}

### ... W I T H   A C C E S S
INST_UID=root
INST_GID=root
INST_PAM_MOD=644

### F O R M A T S
case ${DISTRIBUTION} in
	Debian|Ubuntu)
		libpath=
		;;
	Redhat|Fedora)
		libpath="/lib/security/\$ISA/"
		;;
	Mandriva|Suse)
		libpath=
		;;
	*)
		echo "Unsupported distribution" >&2
		exit 1
		;;
esac

### S T A R T
echo "+install pam_mount"
case ${DISTRIBUTION} in
	Debian|Ubuntu)
		echo "copy libpam-mount profile for pam-auth-update"
		cp pam-configs/libpam-mount /usr/share/pam-configs
		chown ${INST_UID}.${INST_GID} /usr/share/pam-configs/libpam-mount
		chmod ${INST_PAM_MOD} /usr/share/pam-configs/libpam-mount
		;;
	*)
		echo "fall back to common pam files update"

		# C U S T O M I Z E   P A M   H O O K
		j=1
		for i in ${MYSERVICES}; do

			# read mode
			mode=`echo ${MYMODES} | gawk '{split($0,a);print a[nth]}' "nth=${j}"`
			j=$((j+1))	
		
			# handle file
			echo "add pam_mount to ${MYDIR}/${i}"
			if [ ! -f ${MYDIR}/${i} ];then
				echo "cannot customize ${MYDIR}/${i} (does not exist)"	
				continue
			fi
			grep -s "pam_mount.so" ${MYDIR}/${i} > /dev/null
			case $? in
			0)
				echo "pam_mount is already used in ${MYDIR}/${i}"
				;;
			*)
				# customize
				awk -f pam_parse.awk "add_pammount=1" "output_${mode}=1" "libpath=${libpath}" ${MYDIR}/${i} > ${TMPDIR}/${i}
				#cat ${TMPDIR}/${i}

				# install
				echo "install modified ${i} to ${MYDIR}"
				${INSTALL} -o ${INST_UID} -g ${INST_GID} -m ${INST_PAM_MOD} ${TMPDIR}/${i} ${MYDIR} > /dev/null

				# cleanup temporary
				rm -f ${TMPDIR}/${i}
				;;
			esac
		done
		;;
esac