Commit graph

106 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek a2a5291b3f Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.

Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.

_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.

Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.

mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS  $RootDir $MountPoint
mbiebl_> which is pretty weird
2014-07-31 04:00:31 -04:00
Lukas Nykryn 805b573fad sysv: order initscripts which provide $network before network.target
Due to recent changes where $network "maps" to network-online.target
it is not guaranteed that initscript which provides networking will
be terminated after network.target during shutdown which is against LSB.
2014-07-30 09:55:35 +02:00
Thomas Hindoe Paaboel Andersen 260ad50f5b sysv-generator: fix incorect ordering of Wants 2014-06-26 00:37:26 +02:00
Thomas Hindoe Paaboel Andersen d171ed1c50 sysv-generator: rename PidFile to PIDFile
Spotted by Alexey Shabalin
2014-06-24 23:07:48 +02:00
Colin Ian King 855d111304 Fix spelling mistake, scirpt --> script 2014-06-13 23:00:48 +02:00
Thomas Hindoe Paaboel Andersen 95ed3294c6 Move handling of sysv initscripts to a generator
Reuses logic from service.c and the rc-local generator.

Note that this drops reading of chkconfig entirely. It also drops reading
runlevels from the LSB headers. The runlevels were only used to check for
runlevels outside of the normal 1-5 range and then add special dependencies
and settings. Special runlevels were dropped in the past so it seemed to be
unused code.

The generator does not know about non-generated units with a value set with
SysVStartPriority=. These are therefor not taken into account when converting
start priority to before/after.
2014-06-07 00:59:32 +02:00