Bug 233210

Summary: Error parsing PAM i18n string
Product: [Fedora] Fedora Reporter: Andreas Hasenack <andreas>
Component: usermodeAssignee: Miloslav Trmač <mitr>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.92-0.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-06-21 22:04:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Add 'Authenticating as "root"' messages none

Description Andreas Hasenack 2007-03-20 21:39:36 UTC
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 04:35:57 UTC
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 21:54:51 UTC
Fixed in rawhide usermode-1.92-1.

Comment 3 Fedora Update System 2007-06-16 13:22:37 UTC
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 22:04:09 UTC
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.