Skip to content
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

Add the login-unknown configuration option #246

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wolneykien
Copy link

If the option is set to True, LightDM proceeds to start the new session even if the username is not known. Intended to be used with pam_mkuser.so PAM module.

If the option is set to True, LightDM proceeds to start the new
session even if the username is unknown. Tend to be used with
pam_mkuser.so PAM module.

Signed-off-by: Paul Wolneykien <[email protected]>
@@ -998,8 +998,15 @@ create_user_session (Seat *seat, const gchar *username, gboolean autostart)
l_debug (seat, "Creating user session");

/* Load user preferences */
gboolean login_unknown = FALSE;

if (seat_get_string_property (seat, "login-unknown"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this into data/lightdm.conf with the default value and some documentation.

@@ -998,8 +998,15 @@ create_user_session (Seat *seat, const gchar *username, gboolean autostart)
l_debug (seat, "Creating user session");

/* Load user preferences */
gboolean login_unknown = FALSE;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove empty line.

@robert-ancell
Copy link
Collaborator

This should also have a test, see tests/scripts/login-long-username.conf for one to copy. (I appreciate the tests are a bit hard to write, so please have a go but if not I'll add them when I get time).

@robert-ancell
Copy link
Collaborator

Actually should really add two tests (empty username, one with config option and one without), as we weren't testing an empty username.

@robert-ancell
Copy link
Collaborator

robert-ancell commented Jun 29, 2022

Now I look at this a second time, I think the correct solution is to always allow this. I can't see a reason for us to fail at this point - it should fail in the PAM layer if the username is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants