[systemd-devel] [PATCH] sysv-generator: Handle .sh suffixes when translating Provides:

Lennart Poettering lennart at poettering.net
Wed Jan 28 06:19:50 PST 2015

On Wed, 28.01.15 14:25, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hello Lennart,
> Lennart Poettering [2015-01-28 14:19 +0100]:
> > I really don't follow. Why do we need the add_alias() equality check
> > now? I mean, if sysv_translate_facility() now detects if we translate
> > facilities listed in Provides: as pointing to the script itself, and
> > handles .sh properly, why do we need to check in add_alias() a second
> > time if we try to create a symlink to oursevlves?
> > 
> > The latter can go no, can't it?
> This should indeed not happen now with the recent fixes. This was
> merely a defensive check if this situation happens with some other
> corner case after committing 29e0e6d8c. But the later commit 77354c is
> a stronger hammer for this, so this check is now indeed not that
> important any more.
> Chances are that the TOCTOU unlink will be rewritten at some point to
> what you suggested (collecting the aliases in memory and writing them
> after synthesizing all the units), at which point the defensiveness
> might be a tad more important again, but at least now we have a rather
> comprehensive test suite which ought to catch all this (like the
> regression in 4e48855534 ☺ ).
> So in short: if you don't like it, I'm happy to remove this.

OK, removed it now. Tried to be more careful this time, and "make
check" still works.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list