Index: util/faxcron.sh.in =================================================================== --- util/faxcron.sh.in (revision 2569) +++ util/faxcron.sh.in (revision 2568) @@ -37,22 +37,6 @@ # 4. Notify about sites that currently have jobs rejected. # -# -# Deduce the effective user id: -# 1. Refer to the $EUID environment variable -# 2. POSIX-style, the id program -# 3. the old whoami program -# 4. last gasp, check if we have write permission on /dev -# -unset euid -test -z "$EUID" && EUID=`id |$SED -e 's/.*uid=\([^(]*\).*/\1/'` -[ "$EUID" = "0" ] && euid=root -test -z "$euid" && euid=`(whoami) 2>/dev/null` -test -z "$euid" && test -w /dev && euid=root -if [ "$euid" = "root" ]; then - exec su @FAXUID@ "$0" -- "$@" -fi - AGEINFO=30 # purge remote info after 30 days inactivity AGELOG=30 # keep log info for last 30 days AGERCV=7 # purge received facsimile after 7 days Index: util/recvstats.sh.in =================================================================== --- util/recvstats.sh.in (revision 2569) +++ util/recvstats.sh.in (revision 2568) @@ -31,22 +31,6 @@ NOCLOBBER_OFF=@NOCLOBBER_OFF@ # -# Deduce the effective user id: -# 1. Refer to the $EUID environment variable -# 2. POSIX-style, the id program -# 3. the old whoami program -# 4. last gasp, check if we have write permission on /dev -# -unset euid -test -z "$EUID" && EUID=`id |$SED -e 's/.*uid=\([^(]*\).*/\1/'` -[ "$EUID" = "0" ] && euid=root -test -z "$euid" && euid=`(whoami) 2>/dev/null` -test -z "$euid" && test -w /dev && euid=root -if [ "$euid" = "root" ]; then - exec su @FAXUID@ "$0" -- "$@" -fi - -# # Print Statistics about Received Facsimile. # SPOOL=@SPOOL@ Index: util/xferfaxstats.sh.in =================================================================== --- util/xferfaxstats.sh.in (revision 2569) +++ util/xferfaxstats.sh.in (revision 2568) @@ -28,22 +28,6 @@ # # -# Deduce the effective user id: -# 1. Refer to the $EUID environment variable -# 2. POSIX-style, the id program -# 3. the old whoami program -# 4. last gasp, check if we have write permission on /dev -# -unset euid -test -z "$EUID" && EUID=`id |$SED -e 's/.*uid=\([^(]*\).*/\1/'` -[ "$EUID" = "0" ] && euid=root -test -z "$euid" && euid=`(whoami) 2>/dev/null` -test -z "$euid" && test -w /dev && euid=root -if [ "$euid" = "root" ]; then - exec su @FAXUID@ "$0" -- "$@" -fi - -# # Print Statistics about Transmitted Facsimile. # SPOOL=@SPOOL@ Index: etc/faxaddmodem.sh.in =================================================================== --- etc/faxaddmodem.sh.in (revision 2569) +++ etc/faxaddmodem.sh.in (revision 2568) @@ -44,7 +44,6 @@ # this mountain of shell code! # SPOOL=@SPOOL@ -DIR_LIBDATA=@LIBDATA@ die() { @@ -83,27 +82,12 @@ EOF fi -# -# Older versions put setup.cache and setup.modem in the spool/etc directory, -# but for security purposes in preventing uucp from getting root privileges -# this script now looks for those files in $DIR_LIBDATA and normally the -# files will be hard linked between the two locations. The following logic -# is to accommodate upgrades where the files are only in the spool/etc -# directory. -# -if [ -e $SPOOL/etc/setup.cache ] && [ ! -e $DIR_LIBDATA/setup.cache ]; then - ln $SPOOL/etc/setup.cache $DIR_LIBDATA/setup.cache -fi -if [ -e $SPOOL/etc/setup.modem ] && [ ! -e $DIR_LIBDATA/setup.modem ]; then - ln $SPOOL/etc/setup.modem $DIR_LIBDATA/setup.modem -fi - -test -f $DIR_LIBDATA/setup.cache || { +test -f $SPOOL/etc/setup.cache || { cat</dev/null` + REASON=`find $CONFIG_FILES -newer $DIR_SPOOL/etc/setup.cache -print 2>/dev/null` test "$REASON" && REASON="$REASON has been updated" fi - if [ "$REASON" ] && [ -f $DIR_LIBDATA/setup.cache ]; then + if [ "$REASON" ] && [ -f $DIR_SPOOL/etc/setup.cache ]; then Note "Flushing cached parameters because $REASON." Note "" - rm -f $DIR_LIBDATA/setup.cache + rm -f $DIR_SPOOL/etc/setup.cache fi - if [ -f $DIR_LIBDATA/setup.cache ]; then - Note "Reading cached parameters from $DIR_LIBDATA/setup.cache." + if [ -f $DIR_SPOOL/etc/setup.cache ]; then + Note "Reading cached parameters from $DIR_SPOOL/etc/setup.cache." Note "" - . $DIR_LIBDATA/setup.cache + . $DIR_SPOOL/etc/setup.cache fi fi @@ -946,10 +931,10 @@ exit 1 fi - JUNK="$DIR_LIBDATA/setup.tmp" + JUNK="etc/setup.tmp" trap "$RM \$JUNK; $RM -r \$TMPDIR; exit 1" 1 2 15 - exec 5>$DIR_LIBDATA/setup.tmp + exec 5>etc/setup.tmp echo '# Warning, this file was automatically generated by faxsetup' >&5 echo '# on' `date` "for ${USER:-$euid}" >&5 fi @@ -2200,23 +2185,19 @@ STTYCMD=`findApp stty $PATH` (dumpTTYFuncs; dumpSTTYFuncs; dumpOtherModemFuncs)>&5 - $RM $DIR_LIBDATA/setup.modem - $RM $DIR_SPOOL/etc/setup.modem - $MV $DIR_LIBDATA/setup.tmp $DIR_LIBDATA/setup.modem - $CHMOD 444 $DIR_LIBDATA/setup.modem - $LN $DIR_LIBDATA/setup.modem $DIR_SPOOL/etc/setup.modem + $RM etc/setup.modem + $MV etc/setup.tmp etc/setup.modem + $CHMOD 444 etc/setup.modem - $RM $DIR_LIBDATA/setup.cache - $RM $DIR_SPOOL/etc/setup.cache + $RM etc/setup.cache (echo '# Warning, this file was automatically generated by faxsetup' echo '# on' `date` "for ${USER:-$euid}" - dumpvals |sort)> $DIR_LIBDATA/setup.cache - $CHMOD 444 $DIR_LIBDATA/setup.cache - $LN $DIR_LIBDATA/setup.cache $DIR_SPOOL/etc/setup.cache + dumpvals |sort)> etc/setup.cache + $CHMOD 444 etc/setup.cache Note "" - Note "Modem support functions written to $DIR_LIBDATA/setup.modem." - Note "Configuration parameters written to $DIR_LIBDATA/setup.cache." + Note "Modem support functions written to $DIR_SPOOL/etc/setup.modem." + Note "Configuration parameters written to $DIR_SPOOL/etc/setup.cache." fi # Index: etc/probemodem.sh.in =================================================================== --- etc/probemodem.sh.in (revision 2569) +++ etc/probemodem.sh.in (revision 2568) @@ -46,7 +46,6 @@ # SPOOL=@SPOOL@ SBIN=@SBIN@ -DIR_LIBDATA=@LIBDATA@ die() { @@ -71,26 +70,11 @@ done # -# Older versions put setup.cache and setup.modem in the spool/etc directory, -# but for security purposes in preventing uucp from getting root privileges -# this script now looks for those files in $DIR_LIBDATA and normally the -# files will be hard linked between the two locations. The following logic -# is to accommodate upgrades where the files are only in the spool/etc -# directory. -# -if [ -e $SPOOL/etc/setup.cache ] && [ ! -e $DIR_LIBDATA/setup.cache ]; then - ln $SPOOL/etc/setup.cache $DIR_LIBDATA/setup.cache -fi -if [ -e $SPOOL/etc/setup.modem ] && [ ! -e $DIR_LIBDATA/setup.modem ]; then - ln $SPOOL/etc/setup.modem $DIR_LIBDATA/setup.modem -fi - -# # Run faxsetup to setup & verify the target machine if # never done before. We then source the output that has # all the target-specific configuration information. # -test -f $DIR_LIBDATA/setup.cache || { +test -f $SPOOL/etc/setup.cache || { echo "" echo "Running faxsetup to setup your system for fax service. This will" echo "only happen once; though you may also run faxsetup independently." @@ -98,8 +82,8 @@ $SBIN/faxsetup -server } -. $DIR_LIBDATA/setup.cache # common configuration stuff -. $DIR_LIBDATA/setup.modem # modem-specific stuff +. $SPOOL/etc/setup.cache # common configuration stuff +. $SPOOL/etc/setup.modem # modem-specific stuff o="`umask`" umask 077 Index: etc/hylafax.in =================================================================== --- etc/hylafax.in (revision 2569) +++ etc/hylafax.in (revision 2568) @@ -48,29 +48,13 @@ # NB: This script assumes faxgetty processes are managed by init # SPOOL=@SPOOL@ -DIR_LIBDATA=@LIBDATA@ -# -# Older versions put setup.cache and setup.modem in the spool/etc directory, -# but for security purposes in preventing uucp from getting root privileges -# this script now looks for those files in $DIR_LIBDATA and normally the -# files will be hard linked between the two locations. The following logic -# is to accommodate upgrades where the files are only in the spool/etc -# directory. -# -if [ -e $SPOOL/etc/setup.cache ] && [ ! -e $DIR_LIBDATA/setup.cache ]; then - ln $SPOOL/etc/setup.cache $DIR_LIBDATA/setup.cache -fi -if [ -e $SPOOL/etc/setup.modem ] && [ ! -e $DIR_LIBDATA/setup.modem ]; then - ln $SPOOL/etc/setup.modem $DIR_LIBDATA/setup.modem -fi - -test -f $DIR_LIBDATA/setup.cache || { +test -f $SPOOL/etc/setup.cache || { cat<