[Bug 195759] x11/slim fails to honour login.conf

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 18 04:30:46 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195759

--- Comment #9 from Henry Hu <henry.hu.sh at gmail.com> ---
Ok, I know why.

In app.cpp, slim creates child_env, and uses it as the environment of the
child.
If PAM is not used, the array child_env is manually created and filled with
predefined entries. Else, the array is obtained from the pam module.

So it seems hard to support all the environment variables that setusercontext()
supports. Which environment variables do you really need? LANG and PATH and
anything else?

setusercontext() supports these env vars:
                          path          PATH
                          manpath       MANPATH
                          lang          LANG
                          charset       MM_CHARSET
                          timezone      TZ
                          term          TERM
For PATH, because there is an option called default_path in slim's
configuration file, maybe we should just ignore the login.conf.
For LANG, we can get the entry "lang" from login database and set it.
For TERM, slim sets it from its own version. Anyway, we're using slim so it's
not that important.
For other variables(TZ, MM_CHARSET, MANPATH), we can do it in a similar way.

But it might be still better to use setusercontext() because it sets resource
limits, priorities, umask and other things.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list