summaryrefslogtreecommitdiff
path: root/modules/pam_securetty
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2005-12-12 14:45:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2005-12-12 14:45:00 +0000
commitf71fbd4adb2c3aa2f0d3316a022783a7524c028a (patch)
treebfe13ab349fe72772b710e897c705bc659bda21d /modules/pam_securetty
parent9a63b6cfc9481a8276df5dd2e98f4d585a3d33ff (diff)
Relevant BUGIDs: none
Purpose of commit: cleanup Commit summary: --------------- 2005-12-12 Dmitry V. Levin <ldv@altlinux.org> 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_securetty')
-rw-r--r--modules/pam_securetty/pam_securetty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
index fd0af9b1..9dbe9bc4 100644
--- a/modules/pam_securetty/pam_securetty.c
+++ b/modules/pam_securetty/pam_securetty.c
@@ -52,7 +52,7 @@ _pam_parse (const pam_handle_t *pamh, int argc, const char **argv)
if (!strcmp(*argv,"debug"))
ctrl |= PAM_DEBUG_ARG;
else {
- pam_syslog(pamh,LOG_ERR,"pam_parse: unknown option; %s",*argv);
+ pam_syslog(pamh, LOG_ERR, "unknown option: %s", *argv);
}
}
@@ -107,7 +107,7 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl,
}
if (stat(SECURETTY_FILE, &ttyfileinfo)) {
- pam_syslog(pamh, LOG_NOTICE, "Couldn't open " SECURETTY_FILE);
+ pam_syslog(pamh, LOG_NOTICE, "Couldn't open %s: %m", SECURETTY_FILE);
return PAM_SUCCESS; /* for compatibility with old securetty handling,
this needs to succeed. But we still log the
error. */
@@ -116,15 +116,15 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl,
if ((ttyfileinfo.st_mode & S_IWOTH) || !S_ISREG(ttyfileinfo.st_mode)) {
/* If the file is world writable or is not a
normal file, return error */
- pam_syslog(pamh, LOG_ERR, SECURETTY_FILE
- " is either world writable or not a normal file");
+ pam_syslog(pamh, LOG_ERR,
+ "%s is either world writable or not a normal file",
+ SECURETTY_FILE);
return PAM_AUTH_ERR;
}
ttyfile = fopen(SECURETTY_FILE,"r");
if (ttyfile == NULL) { /* Check that we opened it successfully */
- pam_syslog(pamh, LOG_ERR,
- "Error opening " SECURETTY_FILE);
+ pam_syslog(pamh, LOG_ERR, "Error opening %s: %m", SECURETTY_FILE);
return PAM_SERVICE_ERR;
}