From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,35db9668ecdc42e2,start X-Google-Attributes: gidfee84,public From: sloane@ukans.edu (Bob Sloane) Subject: Re: setpwfile under DU 4.0 Date: 1997/09/11 Message-ID: #1/1 X-Deja-AN: 271686536 References: <01bcbeeb$ad64fd00$2e325286@zoar> Organization: University of Kansas Academic Computing Services Newsgroups: comp.unix.osf.osf1 In article <01bcbeeb$ad64fd00$2e325286@zoar>, "J. D. Wilkins" writes: > Does setpwfile() work? The function allows one to redirect functions like > getpwnam to use a file other than /etc/passwd. Works fine under OSF 2.1 > through 3.2d, but has no effect under DU 4.0a. Any ideas? There is a bug in the 4.0[ab] version of setpwfile. I receive the following answer when I asked about it: > There is an easy workaround to the problem. A direct quote from the > developer: > Simply add a call to endpwent() before the setpwfile() call. > That sets the initial state in the library which is missing if > the first getpw*-related call is setpwfile(). Adding the endpwent() call seemed to fix the problems I was seeing. -- USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045 E-mail: sloane@ukans.edu Phone: (913) 864-0444 Web: www.ukans.edu/home/sloane