-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
[enchancement] Fork into SWHKS when not detected #251
Comments
This is an interesting case to tackle, but I reason that it would need privilege de-escalation before launching swhks since we are bound to launch |
That is exactly the problem I am tackling right now 😄 However, I am looking into ways that we can launch |
This looks like a good idea but I'm not entirely sure if it is the best idea with the privilege model atm. Afaik this needs to be immediately after we are done with getting a hold of the file descriptors and then immediately after we call |
I think we can simply let swhks be the "main" binary, the one started by a non-privileged user. From there, we can detect whether swhkd is running. If not, we do pkexec swhkd or equivalent to launch the daemon, for which the user will be prompted for authentication by polkit? i can work on it if this if it is an acceptable solution |
Currently, the
SWHKD
model functions on a client server architecture. Hence, the server (swhks) would have to be active through out the life span of the mainswhkd
daemon. However, this creates a user experience barrier, along with complications on the side of handling the code itself.Hence, this is a proposal to add mechanisms to start / fork the swhks server automagically during the execution of
swhkd
, if it doesn't detect the server already running. This can be easily achieved by checking theswhks.pid
file in the runtime dir.This would significantly improve the UX and the need to mention
./swhks & pkexec ./swhkd -d
would not be necessary. Moreover, this can also help the transition to a more newer privilege model.The text was updated successfully, but these errors were encountered: