Comment 8 for bug 411559

Revision history for this message
Marcus Carlson (0-launchpad-mejlamej-nu) wrote : Re: Policykit-GNOME : Unfriendly message upon typing incorrect password

I've been looking in to this and the problem isn't actually in policykit/-gnome but a pam one. Probably specific to each pam module as well. Changing the pam modules will change all password chats (login, ssh, etc).

Else we could hijack the pam error message and compare it to "Authentication Failure" (localization??) and provide our own...

Could to be hijacked is problably this in polkit-grant.c (line 334)
                id = "PAM_ERROR_MSG ";
                if (g_str_has_prefix (line, id)) {
                        id_len = strlen (id);
                        polkit_grant->func_error_message (polkit_grant,
                                                          line + id_len,
                                                          polkit_grant->user_data);
                        goto processed;
                }

or lower in grant-grant-helper-pam.c (line 217-229)
                case PAM_ERROR_MSG:
                        fprintf (stdout, "PAM_ERROR_MSG ");
                        goto conv2;

Both is super hackish so I'd suggest changing the pam modules.