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

Re: itp: static bins / resolving static debian issues



Craig Sanders <cas@taz.net.au> writes:

> 	lockfile-create /etc/passwd
> 	# optionally backup passwd file
> 	# cp /etc/passwd /etc/passwd.bak
> 	grep "^root:" /etc/passwd | sed -e 's/^root:/sashroot:/' >>/etc/passwd
> 	lockfile-remove /etc/passwd

Are you sure that all the system calls, shadowutils, pam-apps, etc
will all respect the lockfile?  I'm not trying to be a PITA here, I
genuinely want to know.  I looked in to this a little while ago, and I
thought I discovered that the source in some of these tools didn't
actually use lockfiles.  It looked like they used renaming tricks,
though I was in a hurry, so this could be FUD.

(This was when I was also dismayed to discover that there was no
 atomic way to add a user to a group without risking lossage.

 Since there's only a way to set "all" of a user's groups (adduser
 doesn't help since it calls "useradd -G ..." underneath which is the
 code I'm concerned about), there's a window of time between when you
 get the user's current groups, and when you set the user's new groups
 during which someone else could slip in a change, causing loss.  If
 all the binaries, system calls, etc. *do* respect your method above,
 then my concern can be resolved.  That would be great.)

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930


Reply to: