On Wed, 21.01.15 10:46, Martin Pitt (martin.p...@ubuntu.com) wrote:

> A similar case can also happen if
> one init.d script Provides: the name of another init.d script
> (arguably this is at least questionable, but it might happen in
> practice -- e. g. /etc/init.d/mariad might very well "Provides: mysql"
> as it's kind of a drop-in replacement).
> 
> I wrote some more tests which reproduce these failures, and a proposed
> patch. It's not exactly nice due to the TOCTOU (which shouldn't cause
> any practical problem though, it's just a bit unclean), but I can't
> think of a better solution which covers all corner cases.

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()...

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. So far we read
everything in, and while doing so already create symlinks, while
defering creation of the unit files to the end. If we moevd the
symlink creation part to the end too we could easily check in the sysv
script hashtable if we have a real script for a name before writing
out an alias symlink for this.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to