-
Notifications
You must be signed in to change notification settings - Fork 34
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 option to allow disabling root password check for halt, reboot and suspend. #3
base: master
Are you sure you want to change the base?
Conversation
@@ -421,7 +421,7 @@ void App::Run() | |||
} | |||
|
|||
#ifdef USE_PAM | |||
bool App::AuthenticateUser(bool focuspass) | |||
bool App::AuthenticateUser(bool focuspass, bool hrsauth) |
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.
You need to add the , bool hrsauth
passing to the non-PAM version of the function too at #448
if(hrsauth) | ||
pw = getpwnam("root"); | ||
else | ||
return true |
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.
if(hrsauth) | |
pw = getpwnam("root"); | |
else | |
return true | |
if(!hrsauth) return true; | |
pw = getpwnam("root"); |
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.
I don't think this change is quite right. The function should return true in the "if (!focuspass)" clause just above, where the "This is simply fake!" comment is. I believe that comment is misleading - it's actually the mechanism by which the Exit and Console actions are accepted without requesting a password.
Hi, I proposed this a lot of time ago, but have not been using slim for years now. So you can consider this PR abandoned by me. But feel free to work on it and grab these patches if they are useful to you. |
This is more an hack than a real implementation, but I'd like some feedback and maybe this can be made in something that can be included in the official sources.
Thanks!