]> err.no Git - util-linux/commitdiff
chfn, chsh, login: collapsing three similar messages into a single one
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 15 Apr 2008 11:56:28 +0000 (13:56 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Apr 2008 22:29:30 +0000 (00:29 +0200)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
login-utils/chfn.c
login-utils/chsh.c
login-utils/login.c

index a08713b29f6efda0620ee5466e0fde74db670611..ee0dc312c3fb39950d0e8a4d1cc866ed909af090 100644 (file)
@@ -186,8 +186,8 @@ int main (int argc, char **argv) {
 
        retcode = pam_start("chfn", oldf.username, &conv, &pamh);
        if(retcode != PAM_SUCCESS) {
-           fprintf(stderr, _("chfn: PAM Failure, aborting: %s\n"),
-                       pam_strerror(pamh, retcode));
+           fprintf(stderr, _("%s: PAM failure, aborting: %s\n"),
+                   whoami, pam_strerror(pamh, retcode));
            exit(1);
        }
 
index 58cbbb068adade8f29c9366c6e8e20219f7e3407..d4cc5267000314a1473ecde3460004ef9a665a01 100644 (file)
@@ -185,8 +185,8 @@ main (int argc, char *argv[]) {
 
        retcode = pam_start("chsh", pw->pw_name, &conv, &pamh);
        if(retcode != PAM_SUCCESS) {
-           fprintf(stderr, _("chsh: PAM Failure, aborting: %s\n"),
-                       pam_strerror(pamh, retcode));
+           fprintf(stderr, _("%s: PAM failure, aborting: %s\n"),
+                   whoami, pam_strerror(pamh, retcode));
            exit(1);
        }
 
index 0e6db2b5ad886d966a8a6abcbc549b6b5c9782ea..aad27794327c60391b5148b367d2c79338fc6ee4 100644 (file)
@@ -548,8 +548,8 @@ main(int argc, char **argv)
 
     retcode = pam_start("login",username, &conv, &pamh);
     if(retcode != PAM_SUCCESS) {
-       fprintf(stderr, _("login: PAM Failure, aborting: %s\n"),
-               pam_strerror(pamh, retcode));
+       fprintf(stderr, _("%s: PAM failure, aborting: %s\n"),
+               "login", pam_strerror(pamh, retcode));
        syslog(LOG_ERR, _("Couldn't initialize PAM: %s"),
               pam_strerror(pamh, retcode));
        exit(99);