From cfbe85f1f08ad1cbb240755c487ac494c41e05b5 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Tue, 12 May 2009 20:05:53 +0000 Subject: [PATCH] * debian/login.postinst: Install /var/log/faillog during initial installs only. This permits admins to disable failed logins recording. Closes: #488420 --- debian/changelog | 5 ++++- debian/login.postinst | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 91fa09da..d571b6dc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,11 @@ shadow (1:4.1.4-2) unstable; urgency=low * The "Banon" release. * debian/rules, debian/passwd.linda-overrides, debian/login.linda-overrides: Removed linda-overrides files. + * debian/login.postinst: Install /var/log/faillog during initial installs + only. This permits admins to disable failed logins recording. + Closes: #488420 - -- Nicolas FRANCOIS (Nekral) Mon, 11 May 2009 22:29:12 +0200 + -- Nicolas FRANCOIS (Nekral) Mon, 11 May 2009 22:39:07 +0200 shadow (1:4.1.4-1) unstable; urgency=low diff --git a/debian/login.postinst b/debian/login.postinst index 3aa8b5e9..59d6b7fc 100644 --- a/debian/login.postinst +++ b/debian/login.postinst @@ -14,10 +14,14 @@ then fi rm -f /etc/pam.d/login.pre-upgrade 2>/dev/null -if [ ! -f /var/log/faillog ] ; then - touch /var/log/faillog - chown root:root /var/log/faillog - chmod 644 /var/log/faillog +if [ "$1" = "configure" ] && [ "$2" = "" ] +then + # Install faillog during initial installs only + if [ ! -f /var/log/faillog ] ; then + touch /var/log/faillog + chown root:root /var/log/faillog + chmod 644 /var/log/faillog + fi fi #DEBHELPER#