This file is indexed.

/usr/share/sadms-2.0.15/pre/start.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
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#!/bin/bash
# bbou@ac-toulouse.fr
# 2007-04-06  
# start.sh

function readlink2()
{
	[ ! -L $1 ] || ls -l $1 | sed s/.*-\>\ *//g
}

function followlink()
{
	prg="$1"
	while [ -h "$prg" ] ; do
		ls=`ls -ld "$prg"`
		link=`expr "$ls" : '.*-> \(.*\)$'`
		if expr "$link" : '.*/.*' > /dev/null; then
			prg="$link"
		else
			prg=`dirname "$prg"`/"$link"
		fi
	done
	echo $prg
}

function absdir() 
{ 
	[ -n "$1" ] && ( cd "$1" 2> /dev/null && pwd ; ) 
}

where=`followlink $0`
where=`dirname ${where}`
where=`absdir ${where}`
cd ${where}

function gettarball()
{
	where=`absdir ..`
	find ${where} -name "sadms-*.tar.gz" ! -name "*install*" | sort | tail -n 1
}

function getpackagerpm()
{
	where=`absdir ..`
	find ${where}/ -name "sadms*$1*.${PACKAGEEXT}" ! -name "*src*" | sort | tail -n 1
}

function getpackagedeb()
{
	where=`absdir ..`
	find ${where}/$1/ -name "sadms*.${PACKAGEEXT}" | sort | tail -n 1
}

function usetarball
{
	tarball=`gettarball`
	if [ ! -z "${tarball}" ];then
		echo "installing tarball ${tarball}"
		v=`echo ${tarball} | sed 's/.*sadms-\([0-9\.]*\)\.tar\.gz/\1/g'`
		pushd ../.. > /dev/null
		tar xvzf sadms-${v}/sadms-${v}.tar.gz
		pushd sadms-${v} > /dev/null
		make install
		popd > /dev/null
		popd > /dev/null
		return $?
	else
		echo "tarball not found"
		return 1
	fi
}

function usepackagerpm()
{
	package="$1"
	if [ ! -z "${package}" ];then
		echo "installing package ${package}"
		${PACKAGEINSTALLFILE} ${package}
		return 0
	else
		echo "package not found"
		usetarball
		return $?
	fi
}

function usepackagedeb()
{
	package="$1"
	if [ ! -z "${package}" ];then
		echo "installing package ${package}"
		${PACKAGEINSTALLFILE} ${package}
		return 0
	else
		echo "package not found"
		usetarball
		return $?
	fi
}

#  I N C L U D E

. ./_include-distribution.sh

# S T A R T

# I N F O
echo "OS=${OS}"
echo "KERNEL=${KERNEL}"
echo "ARCHITECTURE=${ARCHITECTURE}"
echo "DISTRIBUTION=${DISTRIBUTION}"
echo "DISTRIBUTIONTAG=${DISTRIBUTIONTAG}"
echo "DISTRIBUTIONVERSION=${DISTRIBUTIONVERSION}"

case ${DISTRIBUTION} in
	Redhat)
		gc="getpackagerpm rh"
		rc="usepackagerpm"
		;;
	Fedora)
		gc="getpackagerpm fc"
		rc="usepackagerpm"
		;;
	Mandriva)
		gc="getpackagerpm mdk"
		rc="usepackagerpm"
		;;
	Debian)
		gc="getpackagedeb debian"
		rc="usepackagedeb"
		;;
	Ubuntu)
		gc="getpackagedeb ubuntu"
		rc="usepackagedeb"
		;;
	Suse)
		gc="getpackagerpm suse"
		rc="usepackagerpm"
		;;
	*)
		echo "Unsupported distribution : no package available"
		exit 1
		;;
esac

echo "+P A C K A G E    S E L E C T I O N"
package=`eval ${gc}`
echo "select package ${package}"

echo "+P R E I N S T A L L"
if ! ./_preinstall.sh ${package}; then
 	echo preinstall failed
 	read -p "continue (y/n) ? " yes
 	if [ "${yes}" != "y" -a "${yes}" != "Y" ];then
 		exit 1
 	fi
fi

echo "+C H E C K"
if  ! ./_check-samba.sh; then
	echo samba is not properly configured
	exit 1
fi

# P A C K A G E
echo "+I N S T A L L   S A D M S"
if ! ${PACKAGETEST} sadms > /dev/null 2>/dev/null; then
	if ! eval "${rc} ${package}"; then
		exit 1
	fi
else
	version=`${PACKAGEVERSION} sadms`
	echo "version ${version} is already installed"
fi

# S T A R T
read -p "start sadms (y/n) ?" answer
if [ "${answer}" == "y" ]; then
echo "+S T A R T I N G   S A D M S"
echo "to start sadms, run 'sadms' as root"
fi