[systemd-devel] [PATCH] man: Add a note about what environment variables are available by default.
lennart at poettering.net
Fri Jul 26 10:44:45 PDT 2013
On Fri, 26.07.13 19:00, Kay Sievers (kay at vrfy.org) wrote:
> On Fri, Jul 26, 2013 at 12:42 PM, Kay Sievers <kay at vrfy.org> wrote:
> >> cat /proc/$(pidof systemd-logind)/environ
> >> SYSFONT=latarcyrheb-sun16PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/binbiosdevname=0LANG=de_DE.UTF-8divider=20KEYTABLE=de-latin1-nodeadkeysBOOT_IMAGE=/vmlinuz-3.9.10-100.fc17.x86_64
> > What's currently done for environment variables and the rules how they
> > are passed-on is not obvious and quite a mess that needs fixing. I'll
> > look into it now ...
> This made a couple of things less magic:
> For --system we export the following to the forked children:
> - do not pass _any_ of the original env
> - always statically set: PATH= to the usual suspects
> - add the stuff from DefaultEnvironment=
> - add the stuff from the kernel cmdline systemd.setenv=
> For --user we inherit _everything_ from the parent and pass everything
> to the children.
> In both cases:
> - if we have a user UID, we add LOGNAME=, USER=, HOME=
> - if we have a terminal connected we add TERM=
And one more thing: the environment returned by PAM is also added.
Oh, and for socket actviated stuff there might be LISTEN_FDS and
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel