summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2019-02-11 16:35:29 -0800
committerSteve Langasek <vorlon@debian.org>2019-02-11 22:11:36 -0800
commit8b08f06d8f4e5ec8a37301f3f1b451a8f440bc37 (patch)
tree8dab53ad4324e89ceae976bb6ff2bdc266af03a9
parent6efc211a0f23f9812e013bf02a95dd8708f6592e (diff)
Refresh patches
-rw-r--r--debian/patches-applied/PAM-manpage-section36
-rw-r--r--debian/patches-applied/update-motd115
2 files changed, 46 insertions, 105 deletions
diff --git a/debian/patches-applied/PAM-manpage-section b/debian/patches-applied/PAM-manpage-section
index 1e06f18d..2d335092 100644
--- a/debian/patches-applied/PAM-manpage-section
+++ b/debian/patches-applied/PAM-manpage-section
@@ -18,7 +18,7 @@ Index: pam/doc/man/pam.8.xml
<refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
</refmeta>
-@@ -197,7 +197,7 @@
+@@ -196,7 +196,7 @@
<refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
</citerefentry>,
<citerefentry>
@@ -35,8 +35,8 @@ Index: pam/doc/man/PAM.8
.\" Source: Linux-PAM Manual
.\" Language: English
.\"
--.TH "PAM" "8" "04/01/2016" "Linux-PAM Manual" "Linux-PAM Manual"
-+.TH "PAM" "7" "04/01/2016" "Linux-PAM Manual" "Linux-PAM Manual"
+-.TH "PAM" "8" "05/18/2018" "Linux-PAM Manual" "Linux-PAM Manual"
++.TH "PAM" "7" "05/18/2018" "Linux-PAM Manual" "Linux-PAM Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -50,7 +50,7 @@ Index: pam/modules/pam_access/access.conf.5.xml
===================================================================
--- pam.orig/modules/pam_access/access.conf.5.xml
+++ pam/modules/pam_access/access.conf.5.xml
-@@ -215,7 +215,7 @@
+@@ -227,7 +227,7 @@
<para>
<citerefentry><refentrytitle>pam_access</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
@@ -63,7 +63,7 @@ Index: pam/modules/pam_access/access.conf.5
===================================================================
--- pam.orig/modules/pam_access/access.conf.5
+++ pam/modules/pam_access/access.conf.5
-@@ -199,7 +199,7 @@
+@@ -204,7 +204,7 @@
.PP
\fBpam_access\fR(8),
\fBpam.d\fR(5),
@@ -134,7 +134,7 @@ Index: pam/modules/pam_limits/limits.conf.5.xml
<citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>getrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>getrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>getrlimit</refentrytitle><manvolnum>3p</manvolnum></citerefentry>
</para>
Index: pam/modules/pam_limits/limits.conf.5
@@ -147,9 +147,9 @@ Index: pam/modules/pam_limits/limits.conf.5
\fBpam.d\fR(5),
-\fBpam\fR(8),
+\fBpam\fR(7),
- \fBgetrlimit\fR(2)\fBgetrlimit\fR(3p)
+ \fBgetrlimit\fR(2),
+ \fBgetrlimit\fR(3p)
.SH "AUTHOR"
- .PP
Index: pam/modules/pam_namespace/namespace.conf.5.xml
===================================================================
--- pam.orig/modules/pam_namespace/namespace.conf.5.xml
@@ -206,7 +206,7 @@ Index: pam/modules/pam_access/pam_access.8.xml
===================================================================
--- pam.orig/modules/pam_access/pam_access.8.xml
+++ pam/modules/pam_access/pam_access.8.xml
-@@ -238,7 +238,7 @@
+@@ -246,7 +246,7 @@
<refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
@@ -219,7 +219,7 @@ Index: pam/modules/pam_access/pam_access.8
===================================================================
--- pam.orig/modules/pam_access/pam_access.8
+++ pam/modules/pam_access/pam_access.8
-@@ -127,7 +127,7 @@
+@@ -133,7 +133,7 @@
.PP
\fBaccess.conf\fR(5),
\fBpam.d\fR(5),
@@ -713,7 +713,7 @@ Index: pam/modules/pam_motd/pam_motd.8.xml
===================================================================
--- pam.orig/modules/pam_motd/pam_motd.8.xml
+++ pam/modules/pam_motd/pam_motd.8.xml
-@@ -99,7 +99,7 @@
+@@ -129,7 +129,7 @@
<refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
@@ -726,7 +726,7 @@ Index: pam/modules/pam_motd/pam_motd.8
===================================================================
--- pam.orig/modules/pam_motd/pam_motd.8
+++ pam/modules/pam_motd/pam_motd.8
-@@ -78,7 +78,7 @@
+@@ -122,7 +122,7 @@
\fBmotd\fR(5),
\fBpam.conf\fR(5),
\fBpam.d\fR(5),
@@ -912,8 +912,8 @@ Index: pam/modules/pam_selinux/pam_selinux.8
.\" Source: Linux-PAM Manual
.\" Language: English
.\"
--.TH "PAM_SELINUX" "8" "04/01/2016" "Linux-PAM Manual" "Linux\-PAM Manual"
-+.TH "PAM_SELINUX" "7" "04/01/2016" "Linux-PAM Manual" "Linux\-PAM Manual"
+-.TH "PAM_SELINUX" "8" "05/18/2017" "Linux-PAM Manual" "Linux\-PAM Manual"
++.TH "PAM_SELINUX" "7" "05/18/2017" "Linux-PAM Manual" "Linux\-PAM Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -1612,8 +1612,8 @@ Index: pam/modules/pam_env/pam_env.8
.\" Source: Linux-PAM Manual
.\" Language: English
.\"
--.TH "PAM_ENV" "8" "04/01/2016" "Linux-PAM Manual" "Linux-PAM Manual"
-+.TH "PAM_ENV" "7" "04/01/2016" "Linux-PAM Manual" "Linux-PAM Manual"
+-.TH "PAM_ENV" "8" "05/18/2017" "Linux-PAM Manual" "Linux-PAM Manual"
++.TH "PAM_ENV" "7" "05/18/2017" "Linux-PAM Manual" "Linux-PAM Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -1751,7 +1751,7 @@ Index: pam/modules/pam_tty_audit/pam_tty_audit.8
===================================================================
--- pam.orig/modules/pam_tty_audit/pam_tty_audit.8
+++ pam/modules/pam_tty_audit/pam_tty_audit.8
-@@ -109,7 +109,7 @@
+@@ -125,7 +125,7 @@
\fBaureport\fR(8),
\fBpam.conf\fR(5),
\fBpam.d\fR(5),
@@ -1764,7 +1764,7 @@ Index: pam/modules/pam_tty_audit/pam_tty_audit.8.xml
===================================================================
--- pam.orig/modules/pam_tty_audit/pam_tty_audit.8.xml
+++ pam/modules/pam_tty_audit/pam_tty_audit.8.xml
-@@ -164,7 +164,7 @@
+@@ -174,7 +174,7 @@
<refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
diff --git a/debian/patches-applied/update-motd b/debian/patches-applied/update-motd
index e649a2f4..3d49d682 100644
--- a/debian/patches-applied/update-motd
+++ b/debian/patches-applied/update-motd
@@ -10,49 +10,19 @@ Index: pam/modules/pam_motd/pam_motd.c
===================================================================
--- pam.orig/modules/pam_motd/pam_motd.c
+++ pam/modules/pam_motd/pam_motd.c
-@@ -48,13 +48,38 @@
-
- static char default_motd[] = DEFAULT_MOTD;
-
-+static void display_file(pam_handle_t *pamh, const char *motd_path)
-+{
-+ int fd;
-+ char *mtmp = NULL;
-+ while ((fd = open(motd_path, O_RDONLY, 0)) >= 0) {
-+ struct stat st;
-+ /* fill in message buffer with contents of motd */
-+ if ((fstat(fd, &st) < 0) || !st.st_size || st.st_size > 0x10000)
-+ break;
-+ if (!(mtmp = malloc(st.st_size+1)))
-+ break;
-+ if (pam_modutil_read(fd, mtmp, st.st_size) != st.st_size)
-+ break;
-+ if (mtmp[st.st_size-1] == '\n')
-+ mtmp[st.st_size-1] = '\0';
-+ else
-+ mtmp[st.st_size] = '\0';
-+ pam_info (pamh, "%s", mtmp);
-+ break;
-+ }
-+ _pam_drop (mtmp);
-+ if (fd >= 0)
-+ close(fd);
-+}
-+
- int pam_sm_open_session(pam_handle_t *pamh, int flags,
+@@ -101,8 +101,10 @@
int argc, const char **argv)
{
int retval = PAM_IGNORE;
-- int fd;
+ int do_update = 1;
const char *motd_path = NULL;
-- char *mtmp = NULL;
+ const char *motd_dir_path = NULL;
+ struct stat st;
if (flags & PAM_SILENT) {
return retval;
-@@ -72,6 +97,9 @@
- "motd= specification missing argument - ignored");
+@@ -131,6 +133,9 @@
+ "motd_dir= specification missing argument - ignored");
}
}
+ else if (!strcmp(*argv,"noupdate")) {
@@ -61,30 +31,10 @@ Index: pam/modules/pam_motd/pam_motd.c
else
pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
}
-@@ -79,34 +107,23 @@
- if (motd_path == NULL)
- motd_path = default_motd;
+@@ -140,6 +145,19 @@
+ motd_dir_path = default_motd_dir;
+ }
-- while ((fd = open(motd_path, O_RDONLY, 0)) >= 0) {
-- struct stat st;
--
-- /* fill in message buffer with contents of motd */
-- if ((fstat(fd, &st) < 0) || !st.st_size || st.st_size > 0x10000)
-- break;
--
-- if (!(mtmp = malloc(st.st_size+1)))
-- break;
--
-- if (pam_modutil_read(fd, mtmp, st.st_size) != st.st_size)
-- break;
--
-- if (mtmp[st.st_size-1] == '\n')
-- mtmp[st.st_size-1] = '\0';
-- else
-- mtmp[st.st_size] = '\0';
--
-- pam_info (pamh, "%s", mtmp);
-- break;
+ /* Run the update-motd dynamic motd scripts, outputting to /run/motd.dynamic.
+ This will be displayed only when calling pam_motd with
+ motd=/run/motd.dynamic; current /etc/pam.d/login and /etc/pam.d/sshd
@@ -92,29 +42,20 @@ Index: pam/modules/pam_motd/pam_motd.c
+ if (do_update && (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 > /run/motd.dynamic.new"))
-+ rename("/run/motd.dynamic.new", "/run/motd.dynamic");
-+ umask(old_mask);
- }
-
-- _pam_drop (mtmp);
--
-- if (fd >= 0)
-- close(fd);
-+ /* Display the updated motd */
-+ display_file(pamh, motd_path);
-
-- return retval;
-+ return retval;
- }
++ 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 > /run/motd.dynamic.new"))
++ rename("/run/motd.dynamic.new", "/run/motd.dynamic");
++ umask(old_mask);
++ }
++
+ if (motd_path != NULL) {
+ int fd = open(motd_path, O_RDONLY, 0);
- /* end of module definition */
Index: pam/modules/pam_motd/pam_motd.8.xml
===================================================================
--- pam.orig/modules/pam_motd/pam_motd.8.xml
+++ pam/modules/pam_motd/pam_motd.8.xml
-@@ -52,6 +52,17 @@
+@@ -63,6 +63,17 @@
</para>
</listitem>
</varlistentry>
@@ -130,33 +71,33 @@ Index: pam/modules/pam_motd/pam_motd.8.xml
+ </listitem>
+ </varlistentry>
</variablelist>
- </refsect1>
-
+ <para>
+ When no options are given, the default is to display both
Index: pam/modules/pam_motd/pam_motd.8
===================================================================
--- pam.orig/modules/pam_motd/pam_motd.8
+++ pam/modules/pam_motd/pam_motd.8
-@@ -45,6 +45,13 @@
- /path/filename
- file is displayed as message of the day\&.
+@@ -53,6 +53,13 @@
+ directory is scanned and each file contained inside of it is displayed\&.
.RE
-+.PP
+ .PP
+\fBnoupdate\fR
+.RS 4
+Don\*(Aqt run the scripts in
+/etc/update\-motd\&.d
+to refresh the motd file\&.
+.RE
- .SH "MODULE TYPES PROVIDED"
- .PP
- Only the
++.PP
+ When no options are given, the default is to display both
+ /etc/motd
+ and the contents of
Index: pam/modules/pam_motd/README
===================================================================
--- pam.orig/modules/pam_motd/README
+++ pam/modules/pam_motd/README
-@@ -14,6 +14,10 @@
-
- The /path/filename file is displayed as message of the day.
+@@ -23,6 +23,10 @@
+ contents of /etc/motd.d. Specifying either option (or both) will disable this
+ default behavior.
+noupdate
+