path: root/modules/pam_shells
diff options
authorDmitry V. Levin <>2005-12-12 14:45:00 +0000
committerDmitry V. Levin <>2005-12-12 14:45:00 +0000
commitf71fbd4adb2c3aa2f0d3316a022783a7524c028a (patch)
treebfe13ab349fe72772b710e897c705bc659bda21d /modules/pam_shells
parent9a63b6cfc9481a8276df5dd2e98f4d585a3d33ff (diff)
Relevant BUGIDs: none
Purpose of commit: cleanup Commit summary: --------------- 2005-12-12 Dmitry V. Levin <> Cleanup pam_syslog messages. * modules/pam_env/pam_env.c (_expand_arg): Fix compiler warning. * modules/pam_filter/pam_filter.c (set_filter): Append %m specifier to pam_syslog messages where appropriate. * modules/pam_group/pam_group.c (read_field): Likewise. * modules/pam_mkhomedir/pam_mkhomedir.c (make_remark): Remove. (create_homedir): Do not use make_remark() wrapper, call pam_info() directly. Call pam_syslog() right after failed operation and append %m specifier to pam_syslog messages where appropriate. * modules/pam_rhosts/pam_rhosts_auth.c (pam_iruserok): Replace sequence of malloc(), strcpy() and strcat() calls with asprintf(). Append %m specifier to pam_syslog messages where appropriate. * modules/pam_securetty/pam_securetty.c (securetty_perform_check): Append %m specifier to pam_syslog messages where appropriate. * modules/pam_shells/pam_shells.c (perform_check): Likewise.
Diffstat (limited to 'modules/pam_shells')
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c
index be4aeb18..89fc297e 100644
--- a/modules/pam_shells/pam_shells.c
+++ b/modules/pam_shells/pam_shells.c
@@ -68,9 +68,7 @@ static int perform_check(pam_handle_t *pamh)
userShell = pw->pw_shell;
if (stat(SHELL_FILE,&sb)) {
- pam_syslog(pamh, LOG_ERR,
- "%s cannot be stat'd (it probably does not exist)",
+ pam_syslog(pamh, LOG_ERR, "Cannot stat %s: %m", SHELL_FILE);
return PAM_AUTH_ERR; /* must have /etc/shells */
@@ -83,7 +81,7 @@ static int perform_check(pam_handle_t *pamh)
shellFile = fopen(SHELL_FILE,"r");
if (shellFile == NULL) { /* Check that we opened it successfully */
- pam_syslog(pamh, LOG_ERR, "Error opening %s", SHELL_FILE);
+ pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SHELL_FILE);