[Bug 6020] ls -l (long listing format) prints UID and GID instead of names

bugzilla at busybox.net bugzilla at busybox.net
Sun Mar 17 22:17:31 UTC 2013


https://bugs.busybox.net/show_bug.cgi?id=6020

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> 2013-03-17 22:18:15 UTC ---
I need your help with debugging it further.

In ls.c, the usernames are printed by this code:

                        column += printf("%-8.8s %-8.8s ",
                                get_cached_username(dn->dn_uid),
                                get_cached_groupname(dn->dn_gid));

get_cached_username(uid), through several layers, calls getpwuid(uid).
Only if that fails (returns NULL) get_cached_username uses numeric uid.

If you have CONFIG_USE_BB_PWD_GRP=y, then it may be the reason, since IIRC
android doesn't use standard /etc/passwd file, and BB_PWD_GRP code assumes they
are in use. Turn CONFIG_USE_BB_PWD_GRP off.

If you _don_t_ have CONFIG_USE_BB_PWD_GRP=y, then please investigate with small
test program why getpwuid(uid) fails. (Say, why getpwuid(0) doesn't return
root's pw structure).

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list