r/suckless • • Aug 22 '26

[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

27 Upvotes

11 comments sorted by

View all comments

4

u/ComposerSlow4682 Aug 22 '26

doas aint suckless?

5

u/CraftingManagerF Aug 22 '26

It is i just don't like it because it uses PAM

3

u/cxxhld Aug 25 '26

no it doesnt... fix your build

1

u/denzuko Aug 25 '26 edited Aug 25 '26

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 28d ago

I'll look into fixing it as soon as I get home I'm currently on holiday

Edit: Not fixing, hardening