This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)


On 02/11/2014 05:06 PM, Warren Young wrote:
> On 2/11/2014 16:25, David Stacey wrote:
>> getpwent() is called in three different places.
> 
> To those of you who have investigated these code paths: do any of them
> look like they couldn't be replaced by getpwnam() or other calls that
> would let cygwin1.dll do single-record AD/SAM lookups, rather than
> whole-table/tree scans?
> 
> That is, do any of these programs really need to visit every record in
> /etc/passwd?

libreadline wants to know how to tab-complete ~foo; to do that, it has
to find all usernames beginning with foo.  How would you do that without
visiting every single record?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]