[PATCH] Make dbus-uuidgen atomic
Ray Strode
halfline at gmail.com
Fri Sep 3 19:32:10 PDT 2010
Hi,
On Fri, Sep 3, 2010 at 2:37 PM, Colin Walters <walters at verbum.org> wrote:
> I can't think of a real world scenario where this would happen,
> though. If it's filesystem corruption, we're screwed anyways. If
> it's a stray administrator chmod -R -h, we're screwed anyways. etc.
> Honestly I'd rather spend time here fixing Fedora so that we install a
> UUID file along with the OS, and just symlink the dbus one to it.
>
> I went ahead and pushed a patch which adds the fchmod(). Thanks a lot
> for the review!
Well, there's a window between the open and the fchmod(), if you get a
crash there and umask is hosed, that'd cause problems.
Also, the admin could accidentally run chmod after machine-id is
generated and be confused next boot when the system doesn't work.
Anyway, both are corner cases, obviously, so maybe not worth
prioritizing time for.
--Ray
More information about the dbus
mailing list