-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use setusercontext(3) where available #334
Conversation
This code comes from xdm. Change suggested by @DanielO in canonical#269
Hey! madpilot78 has not signed the Canonical CLA which is required to get this contribution merged on this project.
Please head over to https://ubuntu.com/legal/contributors to read more about it. |
Regarding the agreement, I only reworked an existing patch already sent by the user as a Pull Request, I cannot assert any copyright myself on this patch. So I cannot sign any agreement stating such assertion regarding this. I'm not sure what the policy should be in this case. |
It is also largely copied from xdm in any case, so perhaps that complicates it more... |
To any project developers, I'd really like to help including this in the official port. But I'm not able to complete the CLA form, since it asks me to fill a field If you give me this information I'll be at least able to sign the CLA. |
- Add patch to use setusercontext(3) to setup user environment, so it respects login.conf among other things [1] - Use autoreconf, since patch requires regenerating configure script to check for setusercontext(3) [2] - Explicitly disable libaudit support, not supported in FreeBSD [3] - Add QT5 options, disabled by default, to control linking against qt5 [4] - Import patch adding option to enable alternative location for .xsession-errors file [5] - Correctly define runtime dependencies - Forcibly disable installation of apparmor files - Install PAM configuration files as samples, so in the future they are not overwritten if customized - Pet portclippy/portfmt - Regenerate patches Upstreaming: [1] canonical/lightdm#334 [5] canonical/lightdm#335 Many thanks to all people involved! PR: 266532 [1] [2], 273720 [1], 275885 [3] [4] [5] Tested by: Ivan Rozhuk <[email protected]>, Daniel Tameling <[email protected]> (provided setusercontext patch), Anton Saietskii <[email protected]>
@madpilot78 you can set me as the contact in the form, thanks! This should be good to land after that's complete. |
Thanks! I just compiled and submitted the agreement online. I have found no easy way to rerun checks on this PR (and #335) but everything should be fine now. |
Hi,
I recreated the patch suggested by @DanielO in issue #269 as a pull request.
This patch adds checks in configure for setusercontext(3) and then uses it, if available, to switch user after forking int he session.
Using this method leverages existing FreeBSD code to se the user session that takes into account the login.conf values and also allows automated substitution of ~ (tilde) and $ (dollar) characters with their values.
This solves issues on FreeBSD and the patch is being discussed for inclusion in the FreeBSD port here: https://bugs.freebsd.org/266532
Manual page for setusercontext: setusercontext(3)