Username combo has 3 commas appended

Bug #211805 reported by Bruce Cowan
4
Affects Status Importance Assigned to Milestone
policykit-gnome (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: policykit

For some reason, the PolicyKit "authenticate" dialogue's username combo box has 3 commas appended to the text. For instance, it says "Bruce Cowan,,, (bruce)" here.

Tags: iso-testing
Revision history for this message
Emil Sit (emilsit) wrote :

This can be reproduced by going to System > Administration > Users and Groups and then clicking Unlock. Probably something is getting the gecos field out of the passwd file and failing to parse it properly.

Changed in policykit:
status: New → Confirmed
Revision history for this message
Emil Sit (emilsit) wrote :

Source appears to be the following and should probably be fixed upstream?

tools/polkit-gnome-authorization.c
357- for_uid = polkit_authorization_get_uid (auth);
358- pw = getpwuid (for_uid);
359- if (pw != NULL)
360: if (pw->pw_gecos != NULL && strlen (pw->pw_gecos) > 0)
361: for_user = g_strdup_printf ("%s (%s)", pw->pw_gecos, pw->pw_name);
362- else
363- for_user = g_strdup_printf ("%s", pw->pw_name);
364- else
--
649- continue;
650-
651- /* Real name */
652: if (pw->pw_gecos != NULL && strlen (pw->pw_gecos) > 0)
653: real_name = g_strdup_printf (_("%s (%s)"), pw->pw_gecos, pw->pw_name);
654- else
655- real_name = g_strdup (pw->pw_name);
656-

src/polkit-gnome-auth-dialog.c
207- }
208-
209- /* Real name */
210: if (passwd->pw_gecos != NULL && strlen (passwd->pw_gecos) > 0)
211: real_name = g_strdup_printf (_("%s (%s)"), passwd->pw_gecos, admin_users[n]);
212- else
213- real_name = g_strdup (admin_users[n]);
214-

Iulian Udrea (iulian)
Changed in policykit-gnome:
importance: Undecided → Low
Revision history for this message
Daniel Holbach (dholbach) wrote :

Found in hardy-alternate amd64 20080421 too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.