[systemd-devel] [PATCH] sysv-generator: Replace Provides: symlinks with real units
zbyszek at in.waw.pl
Wed Jan 28 06:06:35 PST 2015
On Wed, Jan 28, 2015 at 02:56:17PM +0100, Michael Biebl wrote:
> 2015-01-28 1:44 GMT+01:00 Lennart Poettering <lennart at poettering.net>:
> > I am not a fan of this stuff either. I really don't like the TOCTOU
> > behaviour I must say...
> > If this is really just about ".bak", then we can add it to the list of
> > suffixes in hidden_files()...
> Martin already committed an update  to at least ignore all the
> temporary files created by dpkg and dpkg-related helper tools.
> While adding .bak would probably not be wrong, I don't think it would
> solve this particular issue in a robust way.
> People are very inventive when it comes to such names. In the Debian
> bug report which triggered this patch, the user had a file named
> networking.save . Most likely, this had been created by himself and
> later on he forgot to remove it.
> > I think a much better fix for all of this would be to first read in
> > all sysv scripts, and only then start creating aliases.
> I guess with "read in", you actually mean read and parse all init
> scripts *and* generate all unit files. After that create the symlinks.
Actually this will not help for the TOCTOU race, IIUC.
systemd-sysv-generator does not race with itself, but with other
generators. But it seems fairly unlikely that a different generator
would create a symlink in generators.early, and if they do, that's
pretty much undefined behaviour who wins.
More information about the systemd-devel