Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: setpwfile under DU 4.0
  1997-09-11  4:00 setpwfile under DU 4.0 J. D. Wilkins
@ 1997-09-11  4:00 ` Bob Sloane
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Sloane @ 1997-09-11  4:00 UTC (permalink / raw)




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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* setpwfile under DU 4.0
@ 1997-09-11  4:00 J. D. Wilkins
  1997-09-11  4:00 ` Bob Sloane
  0 siblings, 1 reply; 2+ messages in thread
From: J. D. Wilkins @ 1997-09-11  4:00 UTC (permalink / raw)



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?
-- 
J. D. Wilkins
Systems Integrator
Bucknell University



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-11  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-09-11  4:00 setpwfile under DU 4.0 J. D. Wilkins
1997-09-11  4:00 ` Bob Sloane

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