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

Login failure and a new release #216

Open
cinerea0 opened this issue Jul 1, 2020 · 3 comments
Open

Login failure and a new release #216

cinerea0 opened this issue Jul 1, 2020 · 3 comments
Labels
bug This issue or pull request discusses a bug ok This issue or pull request was confirmed/reviewed

Comments

@cinerea0
Copy link

cinerea0 commented Jul 1, 2020

First, I wanted to report that I'm experiencing the same problems listed in #36 : Attempting to log on to any profile (shell, .xinitrc, Plasma), simply causes ly to display "Logged out" in the box. The closest thing to a log of this I can find is the following (note the timestamps):

2020-07-01T15:06:44.20217 authpriv.info: Jul  1 11:06:44 ly: pam_unix(login:session): session opened for user erebus by LOGIN(uid=0)
2020-07-01T15:06:44.24093 authpriv.info: Jul  1 11:06:44 ly: pam_unix(login:session): session closed for user erebus

As an aside, I think the improvements made in #189 are significant enough to warrant at least a new minor release, since they fix a lot of PAM issues.

@cinerea0
Copy link
Author

cinerea0 commented Aug 1, 2020

Wanted to give an update, this same problem occurs on the 0.5.2 tagged release:

2020-08-01T14:26:40.11819 authpriv.info: Aug  1 10:26:40 ly: pam_unix(ly:session): session opened for user erebus by LOGIN(uid=0)
2020-08-01T14:26:40.17513 authpriv.info: Aug  1 10:26:40 ly: pam_unix(ly:session): session closed for user erebus

@ericonr
Copy link
Contributor

ericonr commented Aug 6, 2020

This is caused by env_init in src/login.c, https://github.com/nullgemm/ly/blob/master/src/login.c#L208-L242

LANG isn't guaranteed to be set, so it segfaults when trying to access lang, which in our case was set to NULL. That said, I'm not sure I see the purpose of the setenv("TERM", term, 1); and setenv("LANG", lang, 1); lines. I see it resets the environment.

@negativeExponent
Copy link

This is caused by env_init in src/login.c, https://github.com/nullgemm/ly/blob/master/src/login.c#L208-L242

LANG isn't guaranteed to be set, so it segfaults when trying to access lang, which in our case was set to NULL. That said, I'm not sure I see the purpose of the setenv("TERM", term, 1); and setenv("LANG", lang, 1); lines. I see it resets the environment.

wow thanks for this tip. In my case (Obarun S6/66), LANG is null during init so hence i get login problems (immediately shows logged out once username/pass has been entered regardless of session to start).

SInce TERM has an override in env_init, might as well add a fallback for LANG which worked in my case:

https://gist.github.com/negativeExponent/a7c3181a2c736fecf76410989f412adc

Breaeth added a commit to Breaeth/ly-void-2022 that referenced this issue Jan 9, 2022
@nullgemm nullgemm added bug This issue or pull request discusses a bug ok This issue or pull request was confirmed/reviewed labels Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request discusses a bug ok This issue or pull request was confirmed/reviewed
Projects
None yet
Development

No branches or pull requests

4 participants