Package: xdm
Version: 4.1.0-8
Severity: normal
Hi,
I originally reported this bug as BTS #81520, which has been
closed.
Unfortunately, "xdm" still does not enter failed logins into the
system failed log file (/var/log/faillog).
I am referring, of course, to a user entering a correct "user
name" into the "xdm" login widget, along with an incorrect
password.
Thanks,
--- Begin /etc/X11/xdm/Xreset (modified conffile)
#!/bin/sh
PATH=$PATH:/usr/bin/X11
HOSTSERVER=$(echo $DISPLAY | cut -d. -f1)
PIDFILE=/var/run/xconsole.$HOSTSERVER.pid
if [ -e $PIDFILE ]; then
PID=$(cat $PIDFILE 2> /dev/null)
if [ -n "$PID" ]; then
kill $PID 2> /dev/null
fi
rm $PIDFILE
fi
if grep -qs ^use-sessreg /etc/X11/xdm/xdm.options && command -v sessreg > /dev/null 2>&1; then
sessreg -d -l $DISPLAY -u /var/run/utmp -x /etc/X11/xdm/Xservers $USER
fi
echo >&2 "$0: off $(date)"
exit 0
--- End /etc/X11/xdm/Xreset
--- Begin /etc/X11/xdm/Xsession (modified conffile)
#!/bin/sh
echo >&2 "${0}: on $(date)"
. /etc/X11/Xsession
--- End /etc/X11/xdm/Xsession
--- Begin /etc/X11/xdm/Xsetup (modified conffile)
#!/bin/sh
PATH=$PATH:/usr/bin/X11
HOSTSERVER=$(echo $DISPLAY | cut -d. -f1)
PIDFILE=/var/run/xconsole.$HOSTSERVER.pid
CONSOLEDEV=/dev/xconsole
echo >&2 "$0: on $(date)"
xsetroot -solid LavenderBlush4
if [ -e $PIDFILE ]; then
PID=$(cat $PIDFILE 2> /dev/null)
if [ -n "$PID" ]; then
kill $PID 2> /dev/null
fi
rm $PIDFILE
fi
add_to_font_path () {
if fspid=`cat /var/run/${1}.pid 2>/dev/null` && \
ps -p ${fspid} >/dev/null 2>&1
then
xset "${2}" "unix/:${3}"
fi
}
add_to_font_path xfstt +fp 7101
add_to_font_path xfs +fp 7100
eval "`/etc/local/defs xconsole_xres`"
if test "${xconsole_xres:+set}" = "set" ; then
xrdb -merge "${xconsole_xres}"
else
echo >&2 "$0: expected xconsole resource file is not available"
fi
if [ -r $CONSOLEDEV ]; then
xconsole -notify -verbose -exitOnFail -file $CONSOLEDEV &
echo $! > $PIDFILE
fi
echo > $CONSOLEDEV
grep -v '^#' /etc/X11/xdm/Xsetup-msg > $CONSOLEDEV
echo > $CONSOLEDEV
exit 0
--- End /etc/X11/xdm/Xsetup
--- Begin /etc/X11/xdm/Xstartup (modified conffile)
#!/bin/sh
PATH=$PATH:/usr/bin/X11
echo >&2 "${0}: on $(date)"
if grep -qs ^ignore-nologin /etc/X11/xdm/xdm.options; then
if [ -f /etc/nologin ]; then
xmessage -file /etc/nologin -geometry 640x480
fi
elif [ -f /etc/nologin ]; then
# root can log in anyway
if [ "$(id -u)" != "0" ]; then
xmessage -file /etc/nologin -geometry 640x480
exit 1
fi
fi
lastmsg=`lastlog -u ${USER} | sed -n -e '2p'`
failmsg=`faillog -u ${USER} | sed -n -e '2p'`
if grep -qs ^use-sessreg /etc/X11/xdm/xdm.options && command -v sessreg > /dev/null 2>&1; then
sessreg -a -l $DISPLAY -u /var/run/utmp -x /etc/X11/xdm/Xservers $USER
if [ "$?" != "0" ]; then
exit $?
fi
fi
xconsole=/dev/null
xconsole=/dev/xconsole
set -- ${lastmsg}
case ${#} in
4)
lmsg="None - never logged in" ;;
8)
lmsg="${3} ${4} ${5} ${6} ${8} on ${2}" ;;
9)
lmsg="${4} ${5} ${6} ${7} ${9} on ${2} from ${3}" ;;
0)
lmsg="** Unknown User **" ;;
*)
lmsg="** Case Error [${#}]: ${*} **" ;;
esac
echo "Last login for user ${USER}: ${lmsg}." >${xconsole}
if test -f /etc/motd ; then
cat /etc/motd >${xconsole}
fi
: ${MAIL:=/var/mail/${USER}}
if test -s "${MAIL}" ; then
# Only recognizes new mail with GNU find -printf extensions.
atime=`find "${MAIL}" -prune -printf "%A@\n"`
mtime=`find "${MAIL}" -prune -printf "%T@\n"`
if test "${?}" = "0" && test "${mtime}" -ge "${atime}" ; then
echo "You have new mail user ${USER}." >${xconsole}
else
echo "You have mail user ${USER}." >${xconsole}
fi
else
echo "No mail for user ${USER}." >${xconsole}
fi
set -- ${failmsg}
fmsg=""
case ${#} in
0)
: "unknown user or never logged in" ;;
3)
: "never logged in" ;;
11)
case ${2} in
0)
: "no failures since last login" ;;
1)
fmsg="${2} failure" ;;
*)
fmsg="${2} failures" ;;
esac
test -n "${fmsg}" && \
fmsg="${fmsg} since last login for user ${USER}. Last was ${4} ${5} ${6} ${7} ${9} on ${11}."
;;
*)
fmsg="??? failures for user ${USER} since last login. ** Case Error [${#}]: ${*} **" ;;
esac
test -n "${fmsg}" && echo "${fmsg}" >${xconsole}
echo >${xconsole}
case `who | awk '$2 !~ /tty([vCe]8|9)/ { ++count }; END { print count }'` in
1)
fortune -a >${xconsole}
echo >${xconsole}
;;
esac
exit 0
--- End /etc/X11/xdm/Xstartup
--- Begin /etc/X11/xdm/xdm-config (modified conffile)
! $Xorg: xdm-conf.cpp,v 1.3 2000/08/17 19:54:17 cpqbld Exp $
!
!
!
!
! $XFree86: xc/programs/xdm/config/xdm-conf.cpp,v 1.6 2000/01/31 19:33:43 dawes Exp $
!
DisplayManager.errorLogFile: /var/log/xdm.log
DisplayManager.pidFile: /var/run/xdm.pid
DisplayManager.keyFile: /usr/X11R6/lib/X11/xdm/xdm-keys
DisplayManager.servers: /usr/X11R6/lib/X11/xdm/Xservers
DisplayManager.accessFile: /usr/X11R6/lib/X11/xdm/Xaccess
DisplayManager.authDir: /var/lib/xdm
DisplayManager.willing: su nobody -c /usr/X11R6/lib/X11/xdm/Xwilling
! All displays should use authorization.
! X terminals may not be configured that way, so they will require
! individualized resource settings.
DisplayManager*authorize: true
! Remove the first default authorization mechanism, ie, XDM-AUTHORIZATION-1.
DisplayManager*authName: MIT-MAGIC-COOKIE-1
! Scripts to start the server, start the user session, and reset the server
DisplayManager*setup: /usr/X11R6/lib/X11/xdm/Xsetup
DisplayManager*startup: /usr/X11R6/lib/X11/xdm/Xstartup
DisplayManager*reset: /usr/X11R6/lib/X11/xdm/Xreset
DisplayManager*resources: /usr/X11R6/lib/X11/xdm/Xresources
DisplayManager*session: /usr/X11R6/lib/X11/xdm/Xsession
DisplayManager*authComplain: true
! Scripts to start the server, etc, for the :0 display.
!!DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
!!DisplayManager._0.startup: /etc/X11/xdm/Xstartup_0
!!DisplayManager._0.reset: /etc/X11/xdm/Xreset_0
!!DisplayManager._0.resources: /etc/X11/xdm/Xresources_0
! One must first export these variables in the invocation of xdm.
!!DisplayManager.exportList: EXPORTED_VAR ANOTHER_EXPORTED_VAR
!
! Preempt any potential PATH problems in the /etc/X11/xdm/X* scripts.
DisplayManager*userPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
DisplayManager*systemPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
DisplayManager*loginmoveInterval: 10
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
DisplayManager.requestPort: 0
--- End /etc/X11/xdm/xdm-config
--- Begin /etc/pam.d/xdm (modified conffile)
auth required pam_nologin.so
auth required pam_env.so
auth required pam_unix.so
account required pam_unix.so
password required pam_unix.so
session required pam_unix.so
--- End /etc/pam.d/xdm