Hi!
> > I see, that was caused by replacing the my_getpwnam() by
> > SAFE_GETPWNAM().
> > 
> > Anyway my_getpwnam() is wrong hackend interface, we should get rid of
> > it. For next time Garrett note that getpwnam() is one of these
> > non-reentrant interfaces and do it correctly ;).
> 
> Is reentrancy the problem, or the fact that it uses a global variable
> for the struct passwd array in the backend?
> 

The problem here is that my_getpwnam() allocates the structure and copy
data returned getpwnam(). That way uid and gid is preserved (the other
structure members are pointers (strings) and these are statically
allocated too so these gets rewritten anyway).

See lib/libtestsuite.c

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to