]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: none
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 24 Nov 2005 17:15:31 +0000 (17:15 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 24 Nov 2005 17:15:31 +0000 (17:15 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
2005-11-24  Dmitry V. Levin  <ldv@altlinux.org>

* 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.

28 files changed:
ChangeLog
config.h.in
configure.in
libpam_misc/misc_conv.c
libpamc/pamc_converse.c
modules/pam_echo/pam_echo.c
modules/pam_localuser/pam_localuser.c
modules/pam_selinux/pam_selinux.c
modules/pam_selinux/pam_selinux_check.c
modules/pam_unix/pam_unix_passwd.c
modules/pam_unix/support.c
modules/pam_unix/unix_chkpwd.c
po/Linux-PAM.pot
po/cs.po
po/de.po
po/es.po
po/fi.po
po/fr.po
po/hu.po
po/it.po
po/ja.po
po/nb.po
po/pa.po
po/pl.po
po/pt.po
po/pt_BR.po
po/zh_CN.po
po/zh_TW.po

index 9c38b0653f2fc213b61c1d84de7b70577ce6b9b7..84a469f57d8a710fc4722c56b70e9b1ed2c7c330 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2005-11-24  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * 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.
+
 2005-11-23  Thorsten Kukuk  <kukuk@suse.de>
 
        * modules/pam_xauth/pam_xauth.c (pam_sm_open_session): Introduce
index edb637ff439551d7035cafe9f0191137c6cd5c19..95d8b4f7e72bd25a6133e9bd88bfee76d5e7599f 100644 (file)
 /* Define to 1 if you have the `strdup' function. */
 #undef HAVE_STRDUP
 
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
index 288a286a0e4666000e494406c9976d12a2fd4470..e950a65e6544ff5af89afd1e817f994934229f4f 100644 (file)
@@ -350,7 +350,7 @@ AC_TYPE_GETGROUPS
 AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(gethostname gettimeofday lckpwdf mkdir select strcspn strdup strerror strspn strstr strtol uname)
+AC_CHECK_FUNCS(gethostname gettimeofday lckpwdf mkdir select strcspn strdup strspn strstr strtol uname)
 
 AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r getgrouplist)
 
index 52d647abf0d6f6e5efaa2bbb0cdd67b43b17f2b8..e5095d91217a145ddd7092787382edf15dacf3ce 100644 (file)
@@ -228,7 +228,7 @@ static int read_string(int echo, const char *prompt, char **retstr)
                goto cleanexit;                /* return malloc()ed "" */
            } else if (nc == -1) {
                /* Don't loop forever if read() returns -1. */
-               D(("error reading input from the user: %s", strerror(errno)));
+               D(("error reading input from the user: %m"));
                if (echo) {
                    fprintf(stderr, "\n");
                }
index f334c5b9f52404ef536011e02ed5f274a4a9dacd..bb9c6dfd4ccd76cffa6207e7b218493b19271bbd 100644 (file)
@@ -117,7 +117,7 @@ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p)
            case EINTR:
                break;
            default:
-               D(("problem writing to agent: %s", strerror(errno)));
+               D(("problem writing to agent: %m"));
                goto pamc_unknown_prompt;
            }
        } else {
@@ -142,7 +142,7 @@ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p)
            case EINTR:
                break;
            default:
-               D(("problem reading from agent: %s", strerror(errno)));
+               D(("problem reading from agent: %m"));
                goto pamc_unknown_prompt;
            }
        } else if (rval) {
@@ -180,7 +180,7 @@ int pamc_converse(pamc_handle_t pch, pamc_bp_t *prompt_p)
            case EINTR:
                break;
            default:
-               D(("problem reading from agent: %s", strerror(errno)));
+               D(("problem reading from agent: %m"));
                goto pamc_unknown_prompt;
            }
        } else if (rval) {
index e13b8f9449013c1ebeaec50478675564563d3198..d378f917ff0d9711f48d676e8ede898dfc67c8ce 100644 (file)
@@ -179,8 +179,7 @@ pam_echo (pam_handle_t *pamh, int flags, int argc, const char **argv)
 
       if (read (fd, mtmp, st.st_size) == -1)
        {
-         pam_syslog (pamh, LOG_ERR, "Error while reading %s: %s",
-                     file, strerror (errno));
+         pam_syslog (pamh, LOG_ERR, "Error while reading %s: %m", file);
          free (mtmp);
          return PAM_IGNORE;
        }
@@ -195,8 +194,7 @@ pam_echo (pam_handle_t *pamh, int flags, int argc, const char **argv)
       free (mtmp);
     }
   else
-    pam_syslog (pamh, LOG_ERR, "Cannot open %s: %s",
-               file, strerror (errno));
+    pam_syslog (pamh, LOG_ERR, "Cannot open %s: %m", file);
 
   return PAM_IGNORE;
 }
index df1c22bfed6eb57596fbd82785aae6188310eaf6..f99f442101554e2579af1bf87b9ac7e5022ef03b 100644 (file)
@@ -86,8 +86,8 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
        /* open the file */
        fp = fopen(filename, "r");
        if(fp == NULL) {
-               pam_syslog (pamh, LOG_ERR, "error opening \"%s\": %s",
-                           filename, strerror(errno));
+               pam_syslog (pamh, LOG_ERR, "error opening \"%s\": %m",
+                           filename);
                return PAM_SYSTEM_ERR;
        }
 
index 373a38f37390bc6ec843abdbf0a65bcd170e638b..a6ea3e1df77173e58e43d655638c87f52c8a838d 100644 (file)
@@ -231,7 +231,7 @@ security_restorelabel_tty(const pam_handle_t *pamh,
   if (setfilecon(ptr, context) && errno != ENOENT)
   {
     pam_syslog(pamh, LOG_NOTICE,
-              "Warning!  Could not relabel %s with %s, not relabeling.\n",
+              "Warning!  Could not relabel %s with %s, not relabeling: %m",
               ptr, context);
   }
 }
@@ -257,18 +257,18 @@ security_label_tty(pam_handle_t *pamh, char *tty,
   if (getfilecon(ptr, &prev_context) < 0)
   {
     pam_syslog(pamh, LOG_NOTICE,
-            "Warning!  Could not get current context for %s, not relabeling.",
+            "Warning!  Could not get current context for %s, not relabeling: %m",
             ptr);
       return NULL;
   }
   if( security_compute_relabel(usercon,prev_context,SECCLASS_CHR_FILE,
                                &newdev_context)!=0)
   {
-    pam_syslog(pamh,LOG_NOTICE,
-           "Warning!  Could not get new context for %s, not relabeling.",
+    pam_syslog(pamh, LOG_NOTICE,
+           "Warning!  Could not get new context for %s, not relabeling: %m",
            ptr);
     pam_syslog(pamh, LOG_NOTICE,
-              "usercon=%s, prev_context=%s\n", usercon, prev_context);
+              "usercon=%s, prev_context=%s", usercon, prev_context);
     freecon(prev_context);
     return NULL;
   }
@@ -276,8 +276,8 @@ security_label_tty(pam_handle_t *pamh, char *tty,
   if (status)
   {
       pam_syslog(pamh, LOG_NOTICE,
-                "Warning!  Could not relabel %s with %s, not relabeling.%s",
-                ptr,newdev_context,strerror(errno));
+                "Warning!  Could not relabel %s with %s, not relabeling: %m",
+                ptr,newdev_context);
       freecon(prev_context);
       prev_context=NULL;
   }
index 73c77fa0797fcc3a4e2ad117c295b485717e7e2c..30526d370e5272c0fe560bf0d8d74b49b36f4a08 100644 (file)
@@ -129,10 +129,8 @@ main (int argc, char **argv)
 
   childPid = fork();
   if (childPid < 0) {
-    int errsv = errno;
-
     /* error in fork() */
-    fprintf(stderr, _("login: failure forking: %s"), strerror(errsv));
+    fprintf(stderr, _("login: failure forking: %m"));
     pam_close_session(pamh, 0);
     /* We're done with PAM.  Free `pam_handle'. */
     pam_end( pamh, PAM_SUCCESS );
index 099888166fafab74e7314cb7c66e3a5098e93bbd..fb96063e0f14df143b1f99c252f296403879e0a6 100644 (file)
@@ -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;
     }
 
index ad949aab91136f850b4e04c2e927c017d41eb8b6..733c25c239469fdccd7c1236031de0daa82ef5cb 100644 (file)
@@ -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);
index b817f6583b7cd142b5624365b7e83b62b5a3b9a6..d63387b631de33b22cb3f03e1e40b5f677279a02 100644 (file)
@@ -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;
     }
 
index 1cf8872ca6a9cc936d1fa5bea4c037192ab253ed..d003f3fe55f983d29b30af1a0ea1c725fc8ebd7d 100644 (file)
@@ -92,7 +92,7 @@ msgstr ""
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr ""
 
 #: modules/pam_selinux/pam_selinux.c:102
index 3a6c0727e303f161a2813d26227093c2834802df..f4360d98fa671d259241b262ec4a9429c65c64f9 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -95,7 +95,7 @@ msgstr "chyba pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login: chyba forku: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index aade5f0678214a7344aa4da2d219688ddcb7996c..26226d41b9c01a7585e53c32e5e7e3eb72b95c26 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -93,7 +93,7 @@ msgstr "Fehler bei pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "Anmeldung: Fehler bei Abspaltung: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 6ac7f869c8efeac31ca95affe892d6a0d8dba8f4..0716300fdc5cc0d0c92d5f47da0ea3e7513786f8 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -95,7 +95,7 @@ msgstr "error en pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "inicio de sesión: error en horquilla: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 81db9cf48d1d09bb0aab8e8f4e218b88bdd73317..b29c1622fd1f748d8788388d32d043113effba25 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -94,7 +94,7 @@ msgstr "pam_set_item() kutsu epäonnistui\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "sisäänkirjautuminen: virhe haarautumisessa: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 8d8e58522f25712d3e30b2deeeb3571b7cff5a15..6d52eec2554993bcc96040f37444874a3c07c809 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -92,7 +92,7 @@ msgstr "échec de pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login : échec d'autoclonage : %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index a1fd931f7395307981057eab94bdf7b192476eb0..680cdc2258358b4924441f931006569325531819 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -92,7 +92,7 @@ msgstr "pam_set_item() meghiúsult\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "bejelentkezés: hiba az elágazás közben: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 0f1320e2bb79aa7471dbd47c9396870dbbbc6f19..5dcf78571e998acad5088d49b187eb1556e1a074 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -93,7 +93,7 @@ msgstr "impossibile pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login: errore forking: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index b5a878d2059d9a11721373def18d1259753db453..ea6a5e104d9fbb2d133e4bdf36e2da19e6a537e8 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -92,7 +92,7 @@ msgstr "pam_set_item()に失敗しました\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "ログイン: いまいましい失敗: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index ea8bf80240ff50001c3dd1bf6474e13912478a9d..1644676ca92049e24a663db916edf459b7dcedda 100644 (file)
--- a/po/nb.po
+++ b/po/nb.po
@@ -93,7 +93,7 @@ msgstr "kunne ikke pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login: feil under forgrening: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index bbcb32250691ebeaeea39a751675060bb72c2bec..2ed99fd964ca94c4ef15b9ce9b8533dea7c3acd4 100644 (file)
--- a/po/pa.po
+++ b/po/pa.po
@@ -95,7 +95,7 @@ msgstr "pam_set_item() ਲਈ ਫੇਲ\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr ""
 
 #: modules/pam_selinux/pam_selinux.c:102
index c86358a9ace5de2898df93b70df7a10d28a94cd2..f9b362405822467a4d77c969f647dc463add34cb 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -92,7 +92,7 @@ msgstr "nieudane pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login: nieudany fork: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 2d3a9fff7146bcbeee7ccbf8cb43f8ed99308346..731705d42de76c33d33f5ecefebc1ac7e90582b5 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -93,7 +93,7 @@ msgstr "falha em pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "sessão: falha ao executar o forking: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 765cf1d948af5b9f2565b60b7f745f37140dc911..5dba76a66d6eb73b76647f3d1eee8b4c0a76c578 100644 (file)
@@ -92,7 +92,7 @@ msgstr "falha em pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "login: falha na bifurcação: %s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index 7e3e8fa6ef490bd44e998dcd16d60ae38436a548..317a480a8224c93711d8f3b09eede8fc0c0f61ac 100644 (file)
@@ -91,7 +91,7 @@ msgstr "未能 pam_set_item()\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "登录:故障派生:%s"
 
 #: modules/pam_selinux/pam_selinux.c:102
index d2f864814b340fce0cc77ead004fca490f565a57..5d5fce7a068fb5cadefe69c6ee12e8c33e20d384 100644 (file)
@@ -92,7 +92,7 @@ msgstr "pam_set_item() 失敗\n"
 
 #: modules/pam_selinux/pam_selinux_check.c:135
 #, c-format
-msgid "login: failure forking: %s"
+msgid "login: failure forking: %m"
 msgstr "登入:失敗的分叉:%s"
 
 #: modules/pam_selinux/pam_selinux.c:102