From f71fbd4adb2c3aa2f0d3316a022783a7524c028a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 12 Dec 2005 14:45:00 +0000 Subject: 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. --- modules/pam_env/pam_env.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/pam_env/pam_env.c') diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c index 86207e49..bcbb1881 100644 --- a/modules/pam_env/pam_env.c +++ b/modules/pam_env/pam_env.c @@ -630,8 +630,8 @@ static int _expand_arg(pam_handle_t *pamh, char **value) free(*value); if ((*value = malloc(strlen(tmp) +1)) == NULL) { D(("Couldn't malloc %d bytes for expanded var", strlen(tmp)+1)); - pam_syslog (pamh, LOG_ERR,"Couldn't malloc %d bytes for expanded var", - strlen(tmp)+1); + pam_syslog (pamh, LOG_ERR, "Couldn't malloc %lu bytes for expanded var", + (unsigned long)strlen(tmp)+1); return PAM_BUF_ERR; } } -- cgit v1.2.3