[Bug 266532] x11/lightdm: Login sessions do not respect login.conf

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 24 Dec 2023 15:50:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266532

--- Comment #22 from Daniel Tameling <tamelingdaniel@gmail.com> ---
There is one minor issue left: you didn't remove the original execve call, so
that the new one with environ is never reached. When I delete the first execve,
it works as expected.

Another thing to think about is that files/patch-src_session-child.c patches
the PATH:
-            pam_putenv (pam_handle, "PATH=/usr/local/bin:/usr/bin:/bin");
+            pam_putenv (pam_handle,
"PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:~/bin");
This doesn't have any effect since we call setusercontext later, so one could
completely drop it. At the very least I would do something about the ~/bin,
since this won't get expanded and is a literal ~. If one wants to keep the
line, one could just delete the last component of the PATH or expand the ~
manually with the HOME directory we get a few lines later.

There are also some trailing whitespaces in the patch:
patch_v2:122: trailing whitespace.

patch_v2:132: trailing whitespace.
@@ -48,7 +48,7 @@ AC_CHECK_HEADERS(gcrypt.h, [], AC_MSG_ERROR(libgcrypt
patch_v2:133: trailing whitespace.

patch_v2:135: trailing whitespace.

patch_v2:138: trailing whitespace.

warning: squelched 8 whitespace errors
warning: 13 lines add whitespace errors.

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