diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-12-18 14:51:41 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2006-12-18 14:51:41 +0000 |
commit | 52fc68099239cfff5802b0d0b1d4a5c8758f4b74 (patch) | |
tree | 5a3974bf80091d9d9e48784cb273645e5beaf856 /modules/pam_stress | |
parent | ca332123df433462ac5574840cc282bea901e140 (diff) | |
download | pam-52fc68099239cfff5802b0d0b1d4a5c8758f4b74.tar.gz pam-52fc68099239cfff5802b0d0b1d4a5c8758f4b74.tar.bz2 pam-52fc68099239cfff5802b0d0b1d4a5c8758f4b74.zip |
Relevant BUGIDs:
Purpose of commit: cleanup
Commit summary:
---------------
2006-12-18 Thorsten Kukuk <kukuk@thkukuk.de>
* modules/pam_stress/pam_stress.c (pam_sm_chauthtok): Fix
localisation of message printed to user.
* po/de.po: Adjust translation.
Diffstat (limited to 'modules/pam_stress')
-rw-r--r-- | modules/pam_stress/pam_stress.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/modules/pam_stress/pam_stress.c b/modules/pam_stress/pam_stress.c index c8b7ddf3..c254868f 100644 --- a/modules/pam_stress/pam_stress.c +++ b/modules/pam_stress/pam_stress.c @@ -1,6 +1,5 @@ -/* pam_stress module */ - -/* $Id$ +/* + * pam_stress module * * created by Andrew Morgan <morgan@linux.kernel.org> 1996/3/12 */ @@ -474,12 +473,12 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, } pmsg[0] = &msg[0]; msg[0].msg_style = PAM_TEXT_INFO; -#define _LOCAL_STRESS_COMMENT _("Changing STRESS password for ") - txt = (char *) malloc(strlen(_LOCAL_STRESS_COMMENT) - +strlen(username)+1); - strcpy(txt, _LOCAL_STRESS_COMMENT); -#undef _LOCAL_STRESS_COMMENT - strcat(txt, username); + if (asprintf(&txt, _("Changing STRESS password for %s."), + (const char *)username) < 0) { + pam_syslog(pamh, LOG_CRIT, "out of memory"); + return PAM_BUF_ERR; + } + msg[0].msg = txt; i = 1; } else { |