tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getpwent and duplicate names in /etc/master.passwd



On Sun, Jun 24, 2012 at 09:03:27PM +0200, Jean-Yves Migeon wrote:
 > > Hi all,
 > > while looking at the code for getpwent, I stumbled across an
 > > inconsistency in the behavior of pwd_mkdb. If /etc/master.passwd
 > > contains a duplicate name (e.g. two lines for root), this is preserved
 > > in spwd.db, but not in /etc/passwd. Is there any reason for such
 > > behavior? Should pwd_mkdb reject installing the password file in first
 > > place?
 > 
 > I think it should reject the creation.
 > 
 > How can it happen in the first place unless by tweaking master.passwd by
 > hand anyway? This should be discouraged...

spl0its?

I think it should fail, yes.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index