FreeBSD Bugzilla – Attachment 211692 Details for
Bug 241519
[patch] x11/sddm: use the login class capability database (/etc/login.conf, setusercontext)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
new patch for Backend.cpp which should include ~/.login_conf
patch-src_helper_Backend.cpp (text/plain), 1.46 KB, created by
Martin Birgmeier
on 2020-02-16 15:46:51 UTC
(
hide
)
Description:
new patch for Backend.cpp which should include ~/.login_conf
Filename:
MIME Type:
Creator:
Martin Birgmeier
Created:
2020-02-16 15:46:51 UTC
Size:
1.46 KB
patch
obsolete
>--- src/helper/Backend.cpp.orig 2019-03-13 10:22:35.000000000 +0100 >+++ src/helper/Backend.cpp 2020-02-16 16:39:53.134892000 +0100 >@@ -29,6 +29,10 @@ > #include <QtCore/QProcessEnvironment> > > #include <pwd.h> >+#if defined(Q_OS_FREEBSD) >+#include <sys/types.h> >+#include <login_cap.h> >+#endif /* defined(Q_OS_FREEBSD) */ > > namespace SDDM { > Backend::Backend(HelperApp* parent) >@@ -70,6 +74,26 @@ > .arg(mainConfig.X11.UserAuthFile.get()); > env.insert(QStringLiteral("XAUTHORITY"), value); > } >+#if defined(Q_OS_FREEBSD) >+ /* get additional environment variables via setclassenvironment(); >+ this needs to be done here instead of in UserSession::setupChildProcess >+ as the environment for execve() is prepared here */ >+ login_cap_t *lc; >+ >+ if ((lc = login_getpwclass(pw)) != 0) { >+ setclassenvironment(lc, pw, 1); /* path variables */ >+ setclassenvironment(lc, pw, 0); /* non-path variables */ >+ login_close(lc); >+ if ((lc = login_getuserclass(pw)) != NULL) { >+ setclassenvironment(lc, pw, 1); >+ setclassenvironment(lc, pw, 0); >+ } >+ if (lc != NULL) >+ login_close(lc); >+ /* copy all environment variables that are now set */ >+ env.insert(QProcessEnvironment::systemEnvironment()); >+ } >+#endif /* defined(Q_OS_FREEBSD) */ > // TODO: I'm fairly sure this shouldn't be done for PAM sessions, investigate! > m_app->session()->setProcessEnvironment(env); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 241519
:
208628
|
211450
| 211692