Allow unprivileged users to run executables for privileged users
Go to file
Fierelier e4b73edfc5 Add unprivlx 2023-12-12 04:13:08 +01:00
src Add unprivlx 2023-12-12 04:13:08 +01:00
.gitignore Add unprivlx 2023-12-12 04:13:08 +01:00
LICENSE Initial commit 2023-12-11 13:12:57 +01:00
compile Add unprivlx 2023-12-12 04:13:08 +01:00
env Add unprivlx 2023-12-12 04:13:08 +01:00
install Add unprivlx 2023-12-12 04:13:08 +01:00
readme.txt Add unprivlx 2023-12-12 04:13:08 +01:00

readme.txt

privlx (Privilege List eXecute)
Allow unprivileged users to run executables for privileged users.

NOTE: Some features are still coming, until then expect the ABI to break.

* Syntax:
privlx <command> - Get privileges and run command
unprivlx <command> - Drop privileges and run command

* Config:
Add commands you want to allow users to run as root in /etc/privlx/commands.conf, one per line.

Example (/etc/privlx/commands.conf):
poweroff
reboot
pm-hibernate
pm-powersave
pm-suspend-hybrid
pm-suspend

Allow the user to access power management tools. Be warned, poweroff and reboot let the user break the system. It is best to make a wrapper script, to only allow defined behavior.

* BUILDING
* Configuration:
Before compiling or installing, you may set these environment variables, either in a shell, or inside of ./env:
- CC: Your C compiler (default: cc)
- CFLAGS: Compilation flags (default: none)
- APP_NAME: What the app is called. This is used for naming the binaries and outputting errors (default: privlx)
- APP_BIN: Where the app's binaries are stored (default: /usr/local/bin)
- APP_CONF: Where the app's configuration files are stored (default: /etc/$APP_NAME)

* Compilation:
Run ./compile
You need a C compiler, and standard libraries

* Installation:
Run ./install as root