Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: sloane@ukans.edu (Bob Sloane)
Subject: Re: setpwfile under DU 4.0
Date: 1997/09/11	[thread overview]
Message-ID: <G0HDf6PNEAbv@kuhub.cc.ukans.edu> (raw)
In-Reply-To: 01bcbeeb$ad64fd00$2e325286@zoar



In article <01bcbeeb$ad64fd00$2e325286@zoar>,
 "J. D. Wilkins" <jwilkins@bucknell.edu> 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



      reply	other threads:[~1997-09-11  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-11  4:00 setpwfile under DU 4.0 J. D. Wilkins
1997-09-11  4:00 ` Bob Sloane [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox