+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
/* 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
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)
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");
}
case EINTR:
break;
default:
- D(("problem writing to agent: %s", strerror(errno)));
+ D(("problem writing to agent: %m"));
goto pamc_unknown_prompt;
}
} else {
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) {
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) {
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;
}
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;
}
/* 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;
}
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);
}
}
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;
}
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;
}
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 );
}
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;
}
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;
}
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;
}
}
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;
}
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;
}
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);
}
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;
}
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;
}
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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