[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: add user ?



On Fri, 21 Feb 1997, Sasha Sobol wrote:
> > 
> > How does this help? You still have a window of opportunity between the
> > check and the creation of the file. 
> I always thought that link is atomic even on NFS ...

Ahh, you mean 
	ln /etc/passwd /etc/.pwd.lock
	if [ $? == 1 ]; then echo lock exists; exit; fi

Hmmm, it may be, I don't know to be honest. It does seem better than test
and set though even if it isn't atomic (doens't help wrt pam of course).

> 
> > > How is /etc/group file locked ?
> > 
> > Where, in adduser? Using the same /etc/.pwd.lock file.
> Do other programs that read /etc/group support this locking convetion ?

There really are no standard programs that write to /etc/group, at least
none that I can think of right now, reading really isn't a problem. 

cheers (and good night ;-), kinch




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []