Re: Locale setup for non-shells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/22/2017 01:30 PM, Tomas Mraz wrote:
On Mon, 2017-05-22 at 12:46 +0300, Nikolai Kondrashov wrote:
Do you think the below could be done, from PoV of PAM/authconfig?

I do not have any problem with this if the locale.conf file is really
in format that is accepted by pam_env.

It seems that the current owner of /etc/locale.conf, systemd, describes the
format quite strictly, and it is suitable:

    https://www.freedesktop.org/software/systemd/man/locale.conf.html

I'll try to reach systemd folks about this. Perhaps they'll have a different
idea.

Nick

On 05/22/2017 01:30 PM, Tomas Mraz wrote:
On Mon, 2017-05-22 at 12:46 +0300, Nikolai Kondrashov wrote:
Hi Tomas,

Do you think the below could be done, from PoV of PAM/authconfig?

I do not have any problem with this if the locale.conf file is really
in format that is accepted by pam_env.

On 04/04/2017 06:06 PM, Nikolai Kondrashov wrote:
At the moment users logging into Fedora on a text terminal
(console, SSH,
etc.) get their locale environment variables (LANG, LC_ALL, etc.)
set up by
the shell they use. I.e. the shell ultimately sources the
/etc/locale.conf
file. This works fine in most cases.

However, if the user has his/her "shell" set to any program that is
not one of
the traditional shells, i.e. it doesn't source any shell profiles,
or even
doesn't understand any shell language at all, then that program
doesn't get
locale settings.

Theoretical examples can include captive portals on jump-hosts, or
special-purpose systems with dedicated TUI instead of a shell. A
practical
example that concerns me is a user session recording program [1]
which needs
to run before user shell, and intercept all I/O going to and from
the
terminal.

I would like to know if it is possible to change Fedora to provide
the locale
variables through the environment user "shell" inherits, instead of
expecting
it to read /etc/locale.conf, which is distro-specific.

This is done in Debian already. During session setup in
login/sshd/etc. they
use pam_env to read /etc/default/locale. Similar thing is possible
to do in
Fedora too. E.g. just put this into /etc/pam.d/system-auth:

    session     required      pam_env.so envfile=/etc/locale.conf

Nick

[1] Tlog - terminal I/O logger
    https://github.com/Scribery/tlog
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux