The getent script shipped with uClibc does not work correctly with egetent/enewuser from eutilc eclass. To find out the next free uid egetent uses `getent passwd xxx` getent from uClibc uses `string="^\<$2\>:"` which only finds entries at the beginnig of /etc/passwd (usernames) and not uids! Reproducible: Always Steps to Reproduce: 1. getent passwd UID 2. 3. Actual Results: mentor root # getent passwd 101 mentor root # Expected Results: mentor root # getent passwd 101 tenshi:x:101:407:added by portage for tenshi:/var/lib/tenshi:/bin/false mentor root #
getent script was based on glibc 2.2.5, using same syntax, options where possible and return codes, due to lack of docu on syntax (man page says almost knowing, I didn't know about that syntax possibility) `string=":\<$2\>:"` has to be possible too than (along w/ the current implem, but this will have effect on the other options too, where maybe this is not desirable
the change is necessary for group too
any in the mood to code an update for this?
i looked at it a while back but it's not a quick fix and i gave up after some minutes of hacking on it
Created attachment 50203 [details, diff] corrects passwd/group behaviour to look for uid/gid too
Created attachment 50204 [details, diff] corrects also gid search
I've put this in cvs at uclibc.org
*** Bug 80550 has been marked as a duplicate of this bug. ***
I fixed this for myself temporarily by replacing | getent "$1" "$2" with | egrep "^(($2:)|([^:]*:[^:]*:$2:))" /etc/$1 in eutils.eclass, which is of course an extremely dirty solution :) I'm posting it just in case it might be of any help for anyone. Regards, Milan
merged getent patch from svn back into our current uclibc ebuild patchset