diff options
author | Tomas Mraz <tm@t8m.info> | 2006-12-18 13:23:58 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2006-12-18 13:23:58 +0000 |
commit | ca332123df433462ac5574840cc282bea901e140 (patch) | |
tree | e895b1099a83eac96174d4777d51dca3ef0dc8ac | |
parent | e21c7e7fea8541afde5665fbc5643ad218f1d247 (diff) | |
download | pam-ca332123df433462ac5574840cc282bea901e140.tar.gz pam-ca332123df433462ac5574840cc282bea901e140.tar.bz2 pam-ca332123df433462ac5574840cc282bea901e140.zip |
Relevant BUGIDs:
Purpose of commit: bugfix
Commit summary:
---------------
2006-12-18 Tomas Mraz <t8m@centrum.cz>
* modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Localize
message printed to user.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_passwd.c | 9 |
2 files changed, 7 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2006-12-18 Tomas Mraz <t8m@centrum.cz> + + * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Localize + message printed to user. + 2006-12-13 Thorsten Kukuk <kukuk@suse.de> * modules/pam_localuser/pam_localuser.c: Add support for session diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index dcd123c8..c7ee28c9 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -1105,18 +1105,13 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags, if (_unix_blankpasswd(pamh, ctrl, user)) { return PAM_SUCCESS; } else if (off(UNIX__IAMROOT, ctrl)) { - /* instruct user what is happening */ -#define greeting "Changing password for " - Announce = (char *) malloc(sizeof(greeting) + strlen(user)); - if (Announce == NULL) { + if (asprintf(&Announce, _("Changing password for %s."), + user) < 0) { pam_syslog(pamh, LOG_CRIT, "password - out of memory"); return PAM_BUF_ERR; } - (void) strcpy(Announce, greeting); - (void) strcpy(Announce + sizeof(greeting) - 1, user); -#undef greeting lctrl = ctrl; set(UNIX__OLD_PASSWD, lctrl); |