From b3a154da2130f03f86973eaee90434f99fa2ab7a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 24 Nov 2005 17:15:31 +0000 Subject: Relevant BUGIDs: none Purpose of commit: cleanup Commit summary: --------------- 2005-11-24 Dmitry V. Levin * configure.in: Do not check for strerror. * libpam_misc/misc_conv.c (read_string): Replace strerror() call with %m specifier. * libpamc/pamc_converse.c (pamc_converse): Likewise. * modules/pam_echo/pam_echo.c (pam_echo): Likewise. * modules/pam_localuser/pam_localuser.c (pam_sm_authenticate): Likewise. * modules/pam_selinux/pam_selinux.c (security_label_tty): Likewise. (security_restorelabel_tty, security_label_tty): Append %m specifier where appropriate. * modules/pam_selinux/pam_selinux_check.c (main): Replace strerror() call with %m specifier. * modules/pam_unix/pam_unix_passwd.c (save_old_password, _update_passwd, _update_shadow): Likewise. * modules/pam_unix/support.c (_unix_run_helper_binary): Likewise. * modules/pam_unix/unix_chkpwd.c (_update_shadow): Likewise. * po/Linux-PAM.pot: Update strings from pam_selinux. * po/cs.po: Likewise. * po/de.po: Likewise. * po/es.po: Likewise. * po/fi.po: Likewise. * po/fr.po: Likewise. * po/hu.po: Likewise. * po/it.po: Likewise. * po/ja.po: Likewise. * po/nb.po: Likewise. * po/pa.po: Likewise. * po/pl.po: Likewise. * po/pt.po: Likewise. * po/pt_BR.po: Likewise. * po/zh_CN.po: Likewise. * po/zh_TW.po: Likewise. --- modules/pam_unix/pam_unix_passwd.c | 11 +++++------ modules/pam_unix/support.c | 2 +- modules/pam_unix/unix_chkpwd.c | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'modules/pam_unix') diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 09988816..fb96063e 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -481,8 +481,7 @@ static int save_old_password(pam_handle_t *pamh, } if (fclose(pwfile)) { - D(("error writing entries to old passwords file: %s\n", - strerror(errno))); + D(("error writing entries to old passwords file: %m")); err = 1; } @@ -585,7 +584,7 @@ static int _update_passwd(pam_handle_t *pamh, err = 0; } if (putpwent(tmpent, pwfile)) { - D(("error writing entry to password file: %s\n", strerror(errno))); + D(("error writing entry to password file: %m")); err = 1; break; } @@ -594,7 +593,7 @@ static int _update_passwd(pam_handle_t *pamh, fclose(opwfile); if (fclose(pwfile)) { - D(("error writing entries to password file: %s\n", strerror(errno))); + D(("error writing entries to password file: %m")); err = 1; } @@ -700,7 +699,7 @@ static int _update_shadow(pam_handle_t *pamh, const char *forwho, char *towhat) } if (putspent(stmpent, pwfile)) { - D(("error writing entry to shadow file: %s\n", strerror(errno))); + D(("error writing entry to shadow file: %m")); err = 1; break; } @@ -710,7 +709,7 @@ static int _update_shadow(pam_handle_t *pamh, const char *forwho, char *towhat) fclose(opwfile); if (fclose(pwfile)) { - D(("error writing entries to shadow file: %s\n", strerror(errno))); + D(("error writing entries to shadow file: %m")); err = 1; } diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index ad949aab..733c25c2 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -556,7 +556,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd, close(fds[1]); rc=waitpid(child, &retval, 0); /* wait for helper to complete */ if (rc<0) { - pam_syslog(pamh, LOG_ERR, "unix_chkpwd waitpid returned %d: %s", rc, strerror(errno)); + pam_syslog(pamh, LOG_ERR, "unix_chkpwd waitpid returned %d: %m", rc); retval = PAM_AUTH_ERR; } else { retval = WEXITSTATUS(retval); diff --git a/modules/pam_unix/unix_chkpwd.c b/modules/pam_unix/unix_chkpwd.c index b817f658..d63387b6 100644 --- a/modules/pam_unix/unix_chkpwd.c +++ b/modules/pam_unix/unix_chkpwd.c @@ -383,7 +383,7 @@ static int _update_shadow(const char *forwho) } if (putspent(stmpent, pwfile)) { - D(("error writing entry to shadow file: %s\n", strerror(errno))); + D(("error writing entry to shadow file: %m")); err = 1; break; } @@ -393,7 +393,7 @@ static int _update_shadow(const char *forwho) fclose(opwfile); if (fclose(pwfile)) { - D(("error writing entries to shadow file: %s\n", strerror(errno))); + D(("error writing entries to shadow file: %m")); err = 1; } -- cgit v1.2.3