~ecs/d

Simple sudo replacement
Make signedness of `opt` explicit
2c25a4c0 — Eyal Sawady 7 months ago
Print usage to stderr
0a348681 — Eyal Sawady 7 months ago
Use perror on failure to exec

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~ecs/d
read/write
git@git.sr.ht:~ecs/d

You can also use your local clone with git send-email.

d

Tiny[^0] dependency-free ANSI C sudo replacement

[^0]: ~45 lines of code

Authentication

d only authorizes one user. That user is a compile-time constant.

Note: d will not ask you for your password, because that's non-trivial. There's also no way to specify multiple authorized users, or only authorize certain commands, because that's also non-trivial.

Errata

d needs to be SUID in order to work.

d preserves the current environment, except for $HOME.

License

AGPL.