On Thursday 18 September 2008 09:08, Tito wrote: > > I just committed the version which uses getgrouplist() and thus should > > work even on glibc systems with LDAP-based user database etc. > > > > Implemented getgrouplist() in libpwdgrp, so CONFIG_USE_BB_PWD_GRP=y > > works. CONFIG_USE_BB_PWD_GRP=n + uclibc doesn't work yet, uclibc > > does not have getgrouplist(). > > > > Please take a look at current svn. > > thanks for adding getgrouplist to libpwdgrp. > I will resync my work (tonight?) with svn and apply yours > and Vladimir's hints and prepare a series (if possible) of patches to: > 1) move all the IFDEF's in bb_getgrouplist;
You mean that it will return zero-sized vector on libc'es which have no getgrouplist()? Or what will it do in this case? One possible thing is - if getgrouplist() is not available and if !ENABLE_USE_BB_PWD_GRP, have _another_ getgrouplist() implementation in id.c which uses getgrent() to iterate over all groups and find which groups this user is in (as opposed to one which opens "/etc/groups"). This way, it will work on any libc, even one which has user database not in "/etc/groups". > a) this could then eventually be moved to libbb > b) is it possible to use my /etc/group only version if we don't have > getgrouplist? But we have it now, in libpwdgrp. If you want to use /etc/* files, just select USE_BB_PWD_GRP. > c) I would like to use llist_t as return value as it makes parsing the > list easier and saves size. > 2) add euid egid handling (for full SuSv3 compliance) Yes! :) > 3) some minor size optimizations. Always welcome. -- vda _______________________________________________ busybox mailing list [email protected] http://busybox.net/cgi-bin/mailman/listinfo/busybox
