Date: Sun, 17 Feb 2019 01:40:30 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 235791] service(8) does not respect login.conf Message-ID: <bug-235791-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235791 Bug ID: 235791 Summary: service(8) does not respect login.conf Product: Base System Version: 11.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: andrew@tao11.riddles.org.uk service(8) sets an empty environment via env -i when invoking rc.d files. This is wrong, because it's not the same environment that init provides, wh= ich comes from the "daemon" login class in login.conf. The practical upshot of this is that there is no way (short of modifying the scripts) to set environment variables that rc.d scripts might need, such as= an HTTP_PROXY setting to allow "service ntpd onefetch" to work on a system beh= ind a proxy. Related but possibly less serious: when rc.subr invokes a command under a specified login class, it sets only the resource limits and not the environment. To reproduce: add HTTP_PROXY=3Dhttp\c//yourproxyhost\cport/ to the setenv=3D property of "default" or "daemon" in login.conf then observe (from a host with no public connectivity) # service ntpd onefetch fetch: https://www.ietf.org/timezones/data/leap-seconds.list: Network is unreachable --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235791-227>