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

Set gid/uid for subprocess #5506

Closed
p8nut opened this issue May 16, 2020 · 2 comments · Fixed by #11586
Closed

Set gid/uid for subprocess #5506

p8nut opened this issue May 16, 2020 · 2 comments · Fixed by #11586
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)

Comments

@p8nut
Copy link

p8nut commented May 16, 2020

I am not sure that i should create a new Issue (may be linked with #5501)

I am working on a program that watch over some processes but i would like to limit the rights of the child process before execution.

it is possible with nodejs to set an uid and/or a gid so then, just before the process is execve the parent process call setuid and/or setgid to drop privileges of the child.

node way

@v6
Copy link

v6 commented May 16, 2020

I would like to limit the rights of the child process before execution.

This is a sentiment I can co-sign.

@bartlomieju
Copy link
Member

Should be possible to do using CommandExt API (for Unix of course):
https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html

@bartlomieju bartlomieju added cli related to cli/ dir suggestion suggestions for new features (yet to be agreed) labels May 21, 2020
@bartlomieju bartlomieju changed the title Drop subprocesses privileges in deno Set gid/uid for subprocess May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants