When performing a login (-S flag) the target user's language settings are

applied from login.conf. Otherwise the original user's language is carried over.
This commit is contained in:
Jesse Smith 2021-06-01 20:47:12 -03:00
parent 2299d4967d
commit c70338eefd

3
doas.c
View file

@ -520,7 +520,8 @@ main(int argc, char **argv)
#if defined(HAVE_LOGIN_CAP_H)
if (setusercontext(NULL, target_pw, target, LOGIN_SETLOGINCLASS | LOGIN_SETGROUP |
if (setusercontext(NULL, target_pw, target, LOGIN_SETENV |
LOGIN_SETGROUP | LOGIN_SETLOGINCLASS |
LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK |
LOGIN_SETUSER) != 0)
errx(1, "failed to set user context for target");