Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!att!cbnewsh!jgy From: jgy@cbnewsh.ATT.COM (john.g.young) Newsgroups: comp.bugs.sys5 Subject: Re: 'ls -n' opens password file for reading Summary: speaking of ls Message-ID: <638@cbnewsh.ATT.COM> Date: 16 May 89 13:31:19 GMT References: <1326@rivm05.UUCP> <128@softop.UUCP> <1622@auspex.auspex.com> <1245@aplcen.apl.jhu.edu> Distribution: na Organization: AT&T Bell Laboratories Lines: 18 Another problem with 'ls' is with nameless userids. Try creating a few files with userids which don't have entries in the password file. Use the same userid for each, if your password file is of a reasonable length you will be treated to a considerable delay between each line of output as ls parses the entire file for each output line. Two possible improvements: 1) ls currently (svr3) remembers the last uid & gid searched for an SUCCESFULLY found in the /etc/(passwd|group) file. This "buffer :)" should be enlarged and also include unfound ids. 2) This would elliviate the need for a larger buffer; use some kind of database system to speed up access to the password file (I belive some BSD systems may do this) and/or keep it in a shared memory segment (locked in core).