Bug 233210 - Error parsing PAM i18n string
Error parsing PAM i18n string
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: usermode (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-20 17:39 EDT by Andreas Hasenack
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.92-0.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-21 18:04:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add 'Authenticating as "root"' messages (5.22 KB, patch)
2007-03-21 00:35 EDT, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Andreas Hasenack 2007-03-20 17:39:36 EDT
Description of problem:
Applications that use consolehelper can be configured to ask for the user
password or root password. userhelper would show a prompt like "Password for
userfoo" accordingly.
The problem is that PAM now uses i18n strings, and userhelper fails to find the
literal string "password" in the PAM prompt and chooses to use the string as is
instead of the "Password for %s" one. So, one cannot tell from the dialog box
which user's password is being requested.

Version-Release number of selected component (if applicable):
usermode-1.91-1

How reproducible:
Always

Steps to Reproduce:
1. Set a locale different from english
2. Use a consolehelper application which asks for the user password
3. See the dialog box: it will display a bare prompt like "Password" (in the
selected language) instead of "Password for <username>".
  
Actual results:
Confusing password prompt

Expected results:
Password prompt showing which password is being requested

Additional info:
userhelper.c:564
            case PAM_PROMPT_ECHO_OFF: {
                char *noecho_message;

                /* If the prompt is for the user's password,
                 * indicate the user's name if we can.
                 * Otherwise, just output the prompt as-is. */
                if ((strncasecmp(msg[count]->msg, <--- this fails
                         "password", <-- non i18n string
                         8) == 0)) {
                    noecho_message =
                        g_strdup_printf(_("Password for %s"),
                                user);
                } else {
                    noecho_message = g_strdup(msg[count]->msg); <- we get this
                }

Same also happens in line 848.
Comment 1 Miloslav Trmač 2007-03-21 00:35:57 EDT
Created attachment 150553 [details]
Add 'Authenticating as "root"' messages

Thanks for your report.

The attached patch removes the prompt replacing heuristics, and adds an
explicit 'Authenticating as "root"' prompt.

I'm afraid it is too late to fix this for FC7 because the string freeze is
already in effect.
Comment 2 Miloslav Trmač 2007-06-11 17:54:51 EDT
Fixed in rawhide usermode-1.92-1.
Comment 3 Fedora Update System 2007-06-16 09:22:37 EDT
usermode-1.92-0.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2007-06-21 18:04:09 EDT
usermode-1.92-0.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.