summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches-applied/update-motd10
2 files changed, 9 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 09cafc15..7781898d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ pam (1.1.3-6) UNRELEASED; urgency=low
force a kdm restart on ABI bump. Which is good, since restarting kdm
now seems to also log users out of running sessions, which we rather
want to avoid. Closes: #632673, LP: #744944.
+ * debian/patches-applied/update-motd: set a sane umask before calling
+ run-parts, and restore the old mask afterwards, so /run/motd gets
+ consistent permissions. LP: #871943.
-- Steve Langasek <vorlon@debian.org> Sun, 30 Oct 2011 06:53:29 -0700
diff --git a/debian/patches-applied/update-motd b/debian/patches-applied/update-motd
index 1018a296..b739c60a 100644
--- a/debian/patches-applied/update-motd
+++ b/debian/patches-applied/update-motd
@@ -6,10 +6,10 @@ Authors: Dustin Kirkland <kirkland@canonical.com>
Upstream status: not yet submitted
-Index: pam-debian/modules/pam_motd/pam_motd.c
+Index: pam.ubuntu/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
+--- pam.ubuntu.orig/modules/pam_motd/pam_motd.c
++++ pam.ubuntu/modules/pam_motd/pam_motd.c
@@ -48,14 +48,38 @@
static char default_motd[] = DEFAULT_MOTD;
@@ -51,7 +51,7 @@ Index: pam-debian/modules/pam_motd/pam_motd.c
if (flags & PAM_SILENT) {
return retval;
-@@ -80,34 +104,19 @@
+@@ -80,34 +104,21 @@
if (motd_path == NULL)
motd_path = default_motd;
@@ -80,8 +80,10 @@ Index: pam-debian/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)) {
++ mode_t old_mask = umask(0022);
+ 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");
++ umask(old_mask);
}
- _pam_drop (mtmp);