oss-sec mailing list archives

Re: systemd fails to parse user that should run service


From: Leonid Isaev <leonid.isaev () jila colorado edu>
Date: Thu, 6 Jul 2017 13:27:53 -0600

On Thu, Jul 06, 2017 at 03:02:07PM +0100, Simon McVittie wrote:
The problem is that my new and shiny
script won't work as intended on old systemD versions which silently ignore
User= directive.

I am not aware of any such version existing. The 2010 commit
"first attempt at proper service/socket logic", which was 6 months before
the release of systemd version 1 and was the first commit to introduce
ExecStart, also introduced User.

OK, but then there is no excuse to silently ignore any kind of error in
User=. If systemd can not start unit as a specified user, it must fail it, just
like ExecStart: if the command specified there is not found, it doesn't start
a random shell or a web server, right?.

I thought the current behavior of ignoring some syntax "mistakes" was put in
place by design because units have to be backwards copatible with older systemd
versions.

Cheers,
-- 
Leonid Isaev


Current thread: