canonical / lightdm

Display Manager
GNU General Public License v3.0
813 stars 137 forks source link

Use setusercontext(3) where available #334

Closed madpilot78 closed 5 months ago

madpilot78 commented 6 months ago

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)

github-actions[bot] commented 6 months ago
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.
madpilot78 commented 6 months ago

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.

DanielO commented 6 months ago

It is also largely copied from xdm in any case, so perhaps that complicates it more...

madpilot78 commented 6 months ago

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 Canonical Project Manager or contact, where I don't know what to write into.

If you give me this information I'll be at least able to sign the CLA.

robert-ancell commented 5 months ago

@madpilot78 you can set me as the contact in the form, thanks! This should be good to land after that's complete.

madpilot78 commented 5 months ago

@robert-ancell

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.