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
|
#! /bin/sh -e
# $Id: postinst,v 1.5 1998/03/28 01:15:41 herbert Exp $
#
# postinst script for the Debian GNU/Linux xlockmore-gl package
#
# Written by Dirk Eddelbuettel <edd@debian.org>
#
# Modified by Herbert Xu <herbert@debian.org>
case "$1" in
configure | abort-upgrade | abort-remove | abort-deconfigure)
;;
*)
echo "$0: incorrect arguments: $*" >&2
exit 1
;;
esac
# For security reason, xlockmore is packaged with modes 0755
# However, shadow passwords require it be setgid shadow
if [ -f /etc/shadow ]
then
if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
suidregister -s xlockmore-gl /usr/X11R6/bin/xlock root shadow 2755
else
chown root.shadow /usr/X11R6/bin/xlock
chmod 2755 /usr/X11R6/bin/xlock
fi
fi
# Behan Webster <behanw@verisim.com> proposed this to make xlock
# cope with NIS-mangled passwords ... again untested on my setup
if [ -x /usr/bin/ypmatch ]
then
if /usr/bin/id | grep "^uid=0(" >/dev/null 2>&1
then
PASSWD=`su nobody -c "ypmatch nobody passwd" | cut -d: -f2`
else
PASSWD=`ypmatch nobody passwd | cut -d: -f2`
fi
if [ "$PASSWD" = 'x' ]
then
## NIS=on_mangled
if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
suidregister -s xlockmore-gl /usr/X11R6/bin/xlock root root 4755
else
chown root.root /usr/X11R6/bin/xlock
chmod 4755 /usr/X11R6/bin/xlock
fi
fi
fi
#DEBHELPER#
exit 0
|