This change aims to open up a discussion about proper utmp handling,
originally started by cylgom/ly#133. Since I don't know how to handle
Wayland and shell in this particular case.
The original approach didn't work for me, tools such as `w` or
`utmpdump` gave me false information about the TTY and even policykit
didn't see the session as local. I used this command to check the
policy:
pkcheck --action-id org.freedesktop.login1.suspend --process $$ && echo yes
This code is heavily inspired by:
810f9b171f/src/session-child.c (L207)https://gitlab.gnome.org/GNOME/gdm/blob/master/daemon/gdm-session-record.c
This commit aims to fix the use case of setting multiple environment
variables in locale settings. As described in manpages, consider the
following content of `/etc/locale.conf`:
LANG=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8
The previous behavior caused only `LANG` to be set, leaving the other
variables intact. I am not familiar how exactly shell interprets setting
values on these values, but the value of `LC_MESSAGES` in the example
was never applied to the environment. The only way how to make it
working was to execute `unset LANG` before the `locale.conf` variables
were set.
This code snippet is heavily inspired by
810f9b171f/src/session-child.c
Clang generates more warning messages, such as pointing out a lack
of newline at end of file and issues with the size of a strncopy.
Moving -Wno-unused-parameter to the end of the flags avoids it being
overwritten by -Wextra.
Removing -Werror avoids compilation errors that may arise from new
compiler warnings that might come from newer versions of compilers.
Implements utmp audit required by policykit.
This commit also flattens the pidtree for the DM by starting the
display environment directly in the first fork which already should
have the environment ready for this purpose. This is with the
exception of xorg environments where this can't be done that easily.
This allows disabling the feature if PATH was already set (e.g. by the systemd session
slice) and the user wishes to honor that.
Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
This allows the user to specify a different directory to store static files, such as
translations and other resources.
Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
* remove trailing whitespace
* always submit password on enter
Moves the keypress logic for keypresses from if-else statements
to switches, adds non-contextual behavior on pressing enter
* wrap pam actions and handle errors at on spot
* init all of text struct in input_text()
This gets rid off valgrind warning on unitialized variables