Am Montag, 14. August 2006 02:44 schrieb Steve Langasek:
> However, there are cases in which we cannot reliably edit a user's smb.conf
> file, if it makes use of certain features.  There is already a debconf
> question for this; I'm going to move this code for removing 'guest' into
> the corresponding block of the postinst.

Good point.  I missed that.

> Yes, there is: sed -i is not an atomic file replacement, so there is a
> window during which a failure (kernel panic, power outage, filesystem
> error...) would cause the user's smb.conf to be lost.

I can't follow that.  I traced the sed source code, and it seems that sed -i 
always writes to a temp file and then renames the temp file to the original 
file name.  It is also careful to create the temporary file in the same 
directory as the file to be edited, so the rename should be atomic and there 
is no window for losing the original file.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to