-
Notifications
You must be signed in to change notification settings - Fork 254
Fixes related to use of forked PID #1305
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
Fixes related to use of forked PID #1305
Conversation
|
@alejandro-colomar Modified and added in separate PR as requested. |
|
Please use one space after period in the commit message. That would help readability of it. |
16 hours ago you asked to correct commit messages to use two spaces after period.
Please choose one of the two. |
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Oops, I meant to write here "two" too. My brain was probably thinking of "don't use one" and ended up writing something with a one. :)
Please use two spaces after period. |
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
The correct utmp update functionality was broken mainly by commit 91fc513, which moved update of utmp after forking (when PAM is used). It was also misinterpretation of GNU/Linux utmp specifications, where is specified that ut_pid must be the PID of the **login** process (not a PID of any forked process). Wrong ut_pid also prevents utmp cleanup, which performed by init process and should clean entry with the same ut_pid as started login process. GNU/Linux description of utmp updates can be found at the next url: https://man7.org/linux/man-pages/man5/utmp.5.html Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
When PAM is not used, login does not fork itself so its own PID should be checked instead of parent PID. Fixes: b44a6c3 (26-12-2007; "If started as init, login and sulogin need to start a new session.") Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
bd38b29 to
8bfe1c9
Compare
|
Updated as requested (except this comment). |
alejandro-colomar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Reviewed-by: Alejandro Colomar <alx@kernel.org>
I'll merge now, but CC: @hallyn in case he has any comments.
Number of fixes around using PID of forked or parent process.
A subset of commits from #1292, as requested here.