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

sudo: running code that requires superuser priviliges #62

Open
harendra-kumar opened this issue Jul 9, 2022 · 0 comments
Open

sudo: running code that requires superuser priviliges #62

harendra-kumar opened this issue Jul 9, 2022 · 0 comments

Comments

@harendra-kumar
Copy link
Member

We may require super user privileges for some parts of the code, but we do not want to create an executable for that case and use sudo to execute it. Instead we can do the following for controlled execution of privileged code (to avoid accidental misuse):

  • Run the program executable with raised privileges using sudo or some other way
  • Provide a withSudo function that supplies a process handle to run code that requires higher privileges and it lowers itself to normal privilege user. It can fork a helper process to run privileged code. The sudo handle can be used to execute code in the privileged process and return results.
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

No branches or pull requests

1 participant