opnsense-src/usr.bin/env
Andrew Gierth 872ec7e5b6 service(8): use an environment more consistent with init(8)
init(8) sets the "daemon" login class without specifying a pw
entry (so no substitutions are done on the variables). service(8)'s
use of env -L had the effect of specifying root's pw entry, with two
effects: getpwnam and getpwuid are being called, which may not be
entirely safe depending on what nsswitch is up to and what stage of
boot we are at, and substitutions would have been done.

Fix by teaching env(8) to allow -L -/classname to set the class
environment with no pw entry at all specified, and use it in
service(8).

PR:		253959

(cherry picked from commit 55deb0a5f0)
(cherry picked from commit 0c1a5eaae8)
2021-03-07 15:39:30 -06:00
..
env.1 service(8): use an environment more consistent with init(8) 2021-03-07 15:39:30 -06:00
env.c service(8): use an environment more consistent with init(8) 2021-03-07 15:39:30 -06:00
envopts.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
envopts.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
Makefile env(1): grow -L user/class and -U user/class options 2020-02-05 04:29:55 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00