This file is indexed.

/usr/lib/tiger/util/buildconf is in tiger 1:3.2.4~rc1-1.

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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
#!/bin/sh
#
#     tiger - A UN*X security checking system
#     Copyright (C) 1993 Douglas Lee Schales, David K. Hess, David R. Safford
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2, or (at your option)
#    any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
# buildconf
#
# Creates a configuration file for any given operating system and
# release with all the standard configuration files. Can be used
# as a first step to any port.
#
# 07/26/2002 jfs Modified so it can work properly standalone
# 04/15/2003 jfs Added necessary commands CUT WC EXPAND HEAD ID
# 04/23/2003 jfs Bail out if no argument is given, sanity check on confile
# 08/11/2003 jfs Alphabetically ordered commands and added some other.
#
# ------------------------------------------------------------------------


[ -z "$WORKDIR" ] && WORKDIR=./run
[ -z "$BASEDIR" ] && BASEDIR=.
[ -z "$GREP" ] && GREP=`which grep`
[ -z "$EGREP" ] && EGREP=`which egrep`
[ -z "$TAIL" ] && TAIL=`which tail`
[ -z "$AWK" ] && AWK=`which awk`
[ -z "$LS" ] && LS=`which ls`
[ -z "$CAT" ] && CAT=`which cat`
[ -z "$SED" ] && CAT=`which sed`

confile=
[ -n "$1" ] && {
  case "$1" in
    -*);;
    *) confile="$1"; shift;;
  esac
}

[ -z "$confile" ] && {
	echo "You must specify the name of the file to store the configuration"
	exit 1;
}

# If given as a relative file add a complete location
# (otherwise sourcing it might have unexpected consequences since
# it depends on PATH having '.')
[ -z "`echo $confile |$EGREP ^[/\.]`" ] && confile="./$confile"


findcmd()
{
  CMD=$1

  SRCH=/usr/ucb:/usr/bin:/bin:/etc:/usr/etc
  
  SAVEIFS=$IFS
  IFS=:
  set $SRCH
  IFS=$SAVEIFS
  for dir
  do
    [ $TESTEXEC $dir/$CMD ] && {
      echo $dir/$CMD
      return
    }
  done
}

TESTEXEC=-x
( [ $TESTEXEC /bin/sh ] ) 2> $WORKDIR/te.$$
[ -s $WORKDIR/te.$$ ] && TESTEXEC=-f
export TESTEXEC

RM=`findcmd rm`
[ -n "$RM" ] && $RM $WORKDIR/te.$$

while read var cmds
do
  gotit=0
  for cmd in $cmds
  do
    where=`findcmd $cmd`
    if [ "$where" != "" ]; then
      echo "$var=$where"
      echo "export $var"
      gotit=1
      break
    fi
  done
  [ $gotit = 0 ] && {
    echo '#'
    echo "# Could not locate $cmd"
    echo '#'
    echo "$var="
    echo "export $var"
    echo "Can not find $var as any of: $cmd" 1>&2
  }
done << EOL > $confile
AWK awk
BASENAME basename
CAT cat
CC cc
CHAGE chage
CHMOD chmod
CHOWN chown
COLUMN column
COMM comm
CUT cut
DATE date
DIFF diff
EGREP egrep
EXPAND expand
EXPR expr
FILECMD file
FIND find
FMT fmt cat
GETFS mount
GETHOSTNAME hostname
GREP grep
GROUPSS groups
HEAD head
ID id
IFCONFIG ifconfig
JOIN join
LASTLOG lastlog
LN ln
LS ls
LSOF lsof
MAIL mail mailx Mail sendmail
MAILER mail mailx Mail sendmail
MESG mesg
MD5 md5
MD5SUM md5sum
MV mv
NETSTAT netstat
PASTE paste
PS ps
PWCK pwck
PWD pwd
REALPATH realpath
RM rm
SED sed
SNEFRU snefru
SORT sort
STRINGS strings
TAIL tail
TCPD tcpd
TEE tee
TEST test
TR tr
UNAME uname
UNIQ uniq
YPCAT ypcat
WC wc
EOL

echo "WAIT=wait" >> $confile
echo "export WAIT" >> $confile

. $confile

echo "#" >> $confile
echo "# How to get different effects" >> $confile
echo "#" >> $confile

datecmd='$DATE +%D'
timecmd='$DATE +%H:%M:%S'
eval $datecmd 2>/dev/null > /dev/null || {
  datecmd='echo'
  timecmd='echo'
}
echo "DATECMD=\"$datecmd\"" >> $confile
echo "TIMECMD=\"$timecmd\"" >> $confile
echo "export DATECMD TIMECMD" >> $confile

sgrep='$EGREP -s'
X=`$EGREP -s : /etc/passwd 2>&1 | $TAIL -n 1`
[ "$X" != "" ] && {
  sgrep='$GREP -s'
  X=`$GREP -s : /etc/passwd 2>&1 | $TAIL -n 1`
  [ "$X" != "" ] && {
    sgrep='$BASEDIR/util/sgrep'
  }
}

echo "SGREP=\"$sgrep\"" >> $confile
echo "export SGREP" >> $confile

lsgroup="-g"
F1=`$LS -l $lsgroup -d /etc | $AWK '{print NF}'`
F2=`$LS -d /etc | $AWK '{print NF}'`
[ $F1 -lt $F2 ] && lsgroup=

echo "LSGROUP=$lsgroup" >> $confile
echo "export LSGROUP" >> $confile

lslink="-L"
$LS $lslink 2>/dev/null >/dev/null || lslink=

echo "LSLINK=$lslink" >> $confile
echo "export LSLINK" >> $confile

echo '#' >> $confile
echo '# Where are system directories/files?' >> $confile
echo '#' >> $confile

if [ -d /usr/mail ]; then
  echo "MAILSPOOL=/usr/mail" >> $confile
elif [ -d /usr/spool/mail ]; then
  echo "MAILSPOOL=/usr/spool/mail" >> $confile
elif [ -d /var/spool/mail ]; then
  echo "MAILSPOOL=/var/spool/mail" >> $confile
else
  echo "MAILSPOOL=" >> $confile
fi

echo "export MAILSPOOL" >> $confile

if [ -d /usr/spool/cron/crontabs ]; then
  echo "CRONTAB=/usr/spool/cron/crontabs" >> $confile
elif [ -d /var/spool/cron/crontabs ]; then
  echo "CRONTAB=/var/spool/cron/crontabs" >> $confile
elif [ -d /etc/cron ]; then
  echo "CRONTAB=/etc/cron" >> $confile
else
  echo "CRONTAB="
fi

echo "export CRONTAB" >> $confile

echo "ETCSHELLS=/etc/shell" >> $confile
echo "export ETCSHELLS" >> $confile
echo >> $confile

echo '#' >> $confile
echo '# Segment of code to find system specific tiger parts' >> $confile
echo '#' >> $confile

$CAT <<'_END_OF_TEXT' >> $confile

CDIR="$BASEDIR/systems"
eval `
  while read var file
  do
    if [ -f "$CONFIG_DIR/$file" ]; then
      loc="$CONFIG_DIR"
    elif [ -f "$CDIR/$OS/$REL/$REV/$ARCH/$file" ]; then
      loc="$CDIR/$OS/$REL/$REV/$ARCH"
    elif [ -f "$CDIR/$OS/$REL/$REV/$file" ]; then
      loc="$CDIR/$OS/$REL/$REV"
    elif [ -f "$CDIR/$OS/$REL/$file" ]; then
      loc="$CDIR/$OS/$REL"
    elif [ -f "$CDIR/$OS/$file" ]; then
      loc="$CDIR/$OS"
    else
      loc=""
    fi
    if [ "$loc" != "" ]; then
      echo $var="$loc/$file;"
    else
      echo "$var=;"
    fi
    echo "export $var;"
  done << EOL
GETFS gen_mounts
GEN_PASSWD_SETS gen_passwd_sets
GEN_GROUP_SETS gen_group_sets
GEN_ALIAS_SETS gen_alias_sets
CHECK_CRON check_cron
GEN_BOOTPARAM_SETS gen_bootparam_sets
GEN_EXPORT_SETS gen_export_sets
GEN_SERVICES_SETS gen_services
GET_MOUNTS gen_mounts
SIGNATURE_FILE signatures
SERVICESFILE services
INETDFILE inetd
FILE_ACL file_access_list
SUID_LIST suid_list
REL_FILE_EXCP rel_file_exp_list
EOL
`
_END_OF_TEXT