From bb19334f8624b2e67fc3fd641fde3809b94f56df Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 13 Oct 2011 13:08:28 -0700 Subject: debian/patches-applied/update-motd: correctly clear environment when building motd. --- debian/changelog | 2 ++ debian/patches-applied/update-motd | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c807087..47a4ff4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ pam (1.1.3-5) UNRELEASED; urgency=low * debian/patches-applied/{007_modules_pam_unix,055_pam_unix_nullok_secure}: drop unneeded no-op change to reduce delta from upstream. * debian/patches-applied/hurd_no_setfsuid: check all set*id() calls. + * debian/patches-applied/update-motd: correctly clear environment when + building motd. -- Kees Cook Thu, 13 Oct 2011 12:31:03 -0700 diff --git a/debian/patches-applied/update-motd b/debian/patches-applied/update-motd index 8c7b675a..1018a296 100644 --- a/debian/patches-applied/update-motd +++ b/debian/patches-applied/update-motd @@ -6,10 +6,10 @@ Authors: Dustin Kirkland Upstream status: not yet submitted -Index: pam-1.0.1/modules/pam_motd/pam_motd.c +Index: pam-debian/modules/pam_motd/pam_motd.c =================================================================== ---- pam-1.0.1.orig/modules/pam_motd/pam_motd.c -+++ pam-1.0.1/modules/pam_motd/pam_motd.c +--- pam-debian.orig/modules/pam_motd/pam_motd.c 2011-10-10 16:21:50.998512220 -0700 ++++ pam-debian/modules/pam_motd/pam_motd.c 2011-10-13 11:35:02.921398033 -0700 @@ -48,14 +48,38 @@ static char default_motd[] = DEFAULT_MOTD; @@ -80,7 +80,7 @@ Index: pam-1.0.1/modules/pam_motd/pam_motd.c + Otherwise, the admin can force a static MOTD by breaking that symlink + and publishing into an /etc/motd text file. */ + if ((stat("/etc/update-motd.d", &st) == 0) && S_ISDIR(st.st_mode)) { -+ if (!system("run-parts --lsbsysinit /etc/update-motd.d > /var/run/motd.new")) ++ if (!system("/usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin run-parts --lsbsysinit /etc/update-motd.d > /var/run/motd.new")) + rename("/var/run/motd.new", "/var/run/motd"); } -- cgit v1.2.3