[systemd-devel] [PATCH] Patches for lockfile code
zbyszek at in.waw.pl
Tue May 5 21:16:10 PDT 2015
On Tue, May 05, 2015 at 11:28:26PM -0400, Colin Walters wrote:
> On Tue, May 5, 2015, at 11:15 PM, Zbigniew Jędrzejewski-Szmek wrote:
> > On Mon, May 04, 2015 at 08:57:56PM -0400, Colin Walters wrote:
> > > I'm planning to use the code in ostree (via libglnx), here's a few minor patches for systemd's lockfile code.
> > 1/3 is useful, applied.
> > 2/3 is OK, but is useless on it's own.
> > 3/3 makes the code uglier, without other benefits ;) It doesn't
> > actually simplify anything, right? We don't want to apply patches to
> > make it easier to export code, unless they have some positive impact
> > on their own.
> There are security/speed benefits to using the `*at()` family of functions;
> the patch doesn't currently change any of the codepaths that use lockfiles in
> systemd today to use it, but I could imagine some in the future.
> Not a big deal though either way, if someone wants it later maybe they'll
> find it in the archives, or retype it.
We almost always use absolute paths. So the patch just changes
*("/some/path") to *at(AT_FDCWD, "/some/path"). I don't think this gives any benefits.
More information about the systemd-devel