Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 233210 - Error parsing PAM i18n string
Summary: Error parsing PAM i18n string
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: usermode
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-20 21:39 UTC by Andreas Hasenack
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 1.92-0.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-21 22:04:17 UTC


Attachments (Terms of Use)
Add 'Authenticating as "root"' messages (deleted)
2007-03-21 04:35 UTC, Miloslav Trmač
no flags Details | Diff

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.


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