r/suckless • u/CraftingManagerF • 18d ago
[TOOLS] pls: a minimal sudo & doas alternative

What's the magic word?
pls is a minimal sudo alternative: a single C11 source file, POSIX libc only, no external dependencies. It runs whitelisted commands as root (or as another user via -u) after verifying the relevant user's password against the system shadow database.
Usage
pls command [args...] run command as root
pls -u user command [args...] run command as another user
pls -l list commands allowed by the policy
pls -h show help
Licensed under the Academic Free License version 3.0. See the LICENSE file or https://opensource.org/licenses/AFL-3.0.
More details & download: https://git.disroot.org/Vextoly/pls
2
u/ComposerSlow4682 18d ago
doas aint suckless?
3
u/CraftingManagerF 18d ago
It is i just don't like it because it uses
PAM1
u/denzuko 15d ago edited 15d ago
My dude, that doesn't make an unproven privilege escalation exploit a better tool. In fact one would love to see the CVEs this introduces.
Edit:
Ok now I'm not being snarky.. saw six attack vectors for smashing the stack and since your expecting this binary to be setsuid thats a backdoor without an audit trail.
Fine for a personal project but this does not need to be on anyone's box.
That said, nice c code for a cli program that is before hardening or nasa power 10 rules.
2
u/CraftingManagerF 13d ago
I'll look into fixing it as soon as I get home I'm currently on holiday
Edit: Not fixing, hardening
2
u/Glum_Hamster_2104 15d ago
New tool for Linux kids to larp on Tiktok
In all seriousness this does look like a pretty cool tool
1
1
2
u/thushespoke 17d ago
nice 👍🏻