| Summary: | ls -l (long listing format) prints UID and GID instead of names | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | mytkalyk1990 |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | major | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.12.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
mytkalyk1990
2013-03-02 13:47:02 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).
|