1
0
Fork
You've already forked grpexec
0
Execute command in different group.
  • Rust 100%
Find a file
2020年05月27日 15:59:20 +00:00
src Handle error returned by strerror_r() 2020年05月27日 15:59:20 +00:00
.gitignore initial commit 2017年11月05日 16:37:29 +01:00
Cargo.lock Update dependencies 2018年04月08日 13:50:25 +02:00
Cargo.toml Update dependencies 2018年04月08日 13:50:25 +02:00
LICENSE initial commit 2017年11月05日 16:37:29 +01:00
README.md initial commit 2017年11月05日 16:37:29 +01:00

grpexec: Switch Group and Execute Command

WARNING: This project solely exists because I wanted to test Rust's FFI binding. There are better ways to implement this. For instance by using existing, well tested, libraries. Do not use in production.

Setup

Install the grpexec binary in your $PATH. Also, either a) set the user to root and set the SUID bit or b) set the file capability CAP_SETGID. This is needed because a regular, unprivileged, users can't change the GID of processes, not even those of its own processes.

Usage

Syntax

grpexec GROUP COMMAND [ARG]...

Example:

Execute firefox -P in group torify.

grpexec torify firefox -P

Troubleshooting

  • ERROR: Failed to change group to "torify": failed to set new GID: Operation not permitted

    Check your SUID / file capability setup