Package: libpam-foreground
Version: 0.2
Severity: important

When using libpam-foreground on a system where /var/run/ isn't on a
ram file system, the /var/run/console/ directory might fill up with
files for users logged into the console when the machine crashed.  The
package need to remove all files in /var/run/console/ at boot time if
the directory exist to work properly and not grant access to the wrong
users.

I suggest adding a init.d script like this in
/etc/rcS.d/S46libpam-foreground-clean:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          libpam-foreground-clean
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Clean old status files during boot.
### END INIT INFO

set -e

. /lib/lsb/init-functions
PATH=/sbin:/bin

STATEDIR=/var/run/console

case "$1" in
  start)
    if [ -d $STATEDIR ]; then
      log_begin_msg "Cleaning up $STATEDIR/..."
      rm -f $STATEDIR/*
      log_end_msg 0
    fi
    exit 0
    ;;

  stop|restart|force-reload)
    exit 0
    ;;

  *)
    echo "Usage: $0 {start|stop|restart|force-reload}" >&2
    exit 3
    ;;
esac


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to