oss-sec mailing list archives

Re: systemd fails to parse user that should run service


From: Casper.Dik () oracle com
Date: Wed, 05 Jul 2017 14:02:23 +0200



2) If user name specified in systemd unit file is syntactically correct
(according to systemd check) but user name does not exist then systemd
refuse to start that unit.


Should systemd really valid usernames?  I would think that you would 
either use getpwnam(username) and if that fails you may then parse it as a 
numeric value.  If "0day" isn't a valid username according to getpwnam(), 
when converting it to a numeric uid should *also* fail because "0day" 
isn't a properly numeric value.

Casper




Current thread: