summaryrefslogtreecommitdiff
path: root/debian/patches-applied
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-applied')
-rw-r--r--debian/patches-applied/update-motd10
1 files changed, 6 insertions, 4 deletions
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);