diff options
Diffstat (limited to 'debian/patches/update-motd')
-rw-r--r-- | debian/patches/update-motd | 51 |
1 files changed, 8 insertions, 43 deletions
diff --git a/debian/patches/update-motd b/debian/patches/update-motd index fc9c9d8d..fa515cea 100644 --- a/debian/patches/update-motd +++ b/debian/patches/update-motd @@ -10,45 +10,10 @@ Last-Update: 2019-02-12 Forwarded: no Bug-Ubuntu: https://bugs.launchpad.net/bugs/399071 --- - modules/pam_motd/README | 4 ++++ - modules/pam_motd/pam_motd.8 | 7 +++++++ modules/pam_motd/pam_motd.8.xml | 11 +++++++++++ modules/pam_motd/pam_motd.c | 18 ++++++++++++++++++ - 4 files changed, 40 insertions(+) + 2 files changed, 29 insertions(+) -diff --git a/modules/pam_motd/README b/modules/pam_motd/README -index 01bc64e..375ec80 100644 ---- a/modules/pam_motd/README -+++ b/modules/pam_motd/README -@@ -52,6 +52,10 @@ motd_dir=/path/dirname.d - colon-separated list. By default this option is set to /etc/motd.d:/run/ - motd.d:/usr/lib/motd.d. - -+noupdate -+ -+ Don't run the scripts in /etc/update-motd.d to refresh the motd file. -+ - When no options are given, the default behavior applies for both options. - Specifying either option (or both) will disable the default behavior for both - options. -diff --git a/modules/pam_motd/pam_motd.8 b/modules/pam_motd/pam_motd.8 -index 3f65bb5..6a6ab4e 100644 ---- a/modules/pam_motd/pam_motd.8 -+++ b/modules/pam_motd/pam_motd.8 -@@ -109,6 +109,13 @@ directory is scanned and each file contained inside of it is displayed\&. Multip - /etc/motd\&.d:/run/motd\&.d:/usr/lib/motd\&.d\&. - .RE - .PP -+\fBnoupdate\fR -+.RS 4 -+Don\*(Aqt run the scripts in -+/etc/update\-motd\&.d -+to refresh the motd file\&. -+.RE -+.PP - When no options are given, the default behavior applies for both options\&. Specifying either option (or both) will disable the default behavior for both options\&. - .SH "MODULE TYPES PROVIDED" - .PP diff --git a/modules/pam_motd/pam_motd.8.xml b/modules/pam_motd/pam_motd.8.xml index 2fc5310..8369779 100644 --- a/modules/pam_motd/pam_motd.8.xml @@ -72,26 +37,26 @@ index 2fc5310..8369779 100644 <para> When no options are given, the default behavior applies for both diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c -index 5ca486e..8472dd6 100644 +index 89b2595..e6ce874 100644 --- a/modules/pam_motd/pam_motd.c +++ b/modules/pam_motd/pam_motd.c -@@ -383,6 +383,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, +@@ -387,6 +387,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { int retval = PAM_IGNORE; + int do_update = 1; const char *motd_path = NULL; char *motd_path_copy = NULL; - unsigned int num_motd_paths = 0; -@@ -392,6 +393,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, - unsigned int num_motd_dir_paths = 0; + size_t num_motd_paths = 0; +@@ -396,6 +397,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, + size_t num_motd_dir_paths = 0; char **motd_dir_path_split = NULL; int report_missing; + struct stat st; if (flags & PAM_SILENT) { return retval; -@@ -421,6 +423,9 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, +@@ -425,6 +427,9 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, "motd_dir= specification missing argument - ignored"); } } @@ -101,7 +66,7 @@ index 5ca486e..8472dd6 100644 else pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv); } -@@ -433,6 +438,19 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, +@@ -437,6 +442,19 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, report_missing = 1; } |