aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_motd/pam_motd.c
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@canonical.com>2019-12-17 16:48:13 +0100
committerTomáš Mráz <t8m@users.noreply.github.com>2019-12-17 16:48:13 +0100
commit73118592885eb3554eddb360d5f6ab65ee6e1c03 (patch)
tree9dfa3980ca7f152721f4e0e7237caa239113dcf6 /modules/pam_motd/pam_motd.c
parente40b1f72adf06793b8b9ef94d8bef46f7aba0f04 (diff)
downloadpam-73118592885eb3554eddb360d5f6ab65ee6e1c03.tar.gz
pam-73118592885eb3554eddb360d5f6ab65ee6e1c03.tar.bz2
pam-73118592885eb3554eddb360d5f6ab65ee6e1c03.zip
Return only PAM_IGNORE or error from pam_motd
Follow-up for c81280b16e1831ab0bdd0383486c7e2d1eaf1b5e. * modules/pam_motd/pam_motd.c: Return PAM_IGNORE if pam_putenv succeeds. * modules/pam_motd/pam_motd.8.xml: Document additional possible return values of the module.
Diffstat (limited to 'modules/pam_motd/pam_motd.c')
-rw-r--r--modules/pam_motd/pam_motd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c
index 51b0168b..f22cea3a 100644
--- a/modules/pam_motd/pam_motd.c
+++ b/modules/pam_motd/pam_motd.c
@@ -398,7 +398,7 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
retval = pam_putenv(pamh, "MOTD_SHOWN=pam");
- return retval;
+ return retval == PAM_SUCCESS ? PAM_IGNORE : retval;
}
/* end of module definition */