On Thu, Oct 01, 2009 at 09:31:55PM -0500, richardvo...@gmail.com wrote:
> On Wed, Sep 30, 2009 at 5:54 PM, Colin Watson <cjwat...@ubuntu.com> wrote:
> > If grub-editenv create is interrupted, it's theoretically possible for
> > it to create an incomplete block that future grub-editenv calls won't
> > recognise. It would be better for it to atomically create either a
> > complete block or nothing. Any objections?
> 
> Be aware that this may lose security settings.  Write-in-place is also
> different wrt hard links, but it would be pretty odd for that file to
> have additional hard links.

While this would be true for writing files in general, this is
explicitly a "create" operation and so I don't think that matters. We
use different code paths when writing to an existing environment block
file.

> You might also need to check for the alternate name, in case the
> operation failed after writing the new content and unlinking the old
> file, but before renaming the new file.

There is no old file here, or if there is then the user has already
explicitly indicated that they don't care about it. There is no unlink
call in my code (and wouldn't be even if this weren't a create
operation; no need to bother when you're renaming over the top anyway).

-- 
Colin Watson                                       [cjwat...@ubuntu.com]


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to