RootDO, a simple doas/sudo alternative.
 
 
 
 
Go to file
sw1tchbl4d3 81a2ea4414 lock tty ioctl to openbsd 2023-02-05 12:43:21 +01:00
benchmark Implement benchmark on a Dockerfile 2022-12-27 11:21:01 -03:00
.gitignore First Commit 2021-07-13 21:33:12 +02:00
LICENSE First Commit 2021-07-13 21:33:12 +02:00
Makefile Move binary file to /usr/local/bin 2023-02-02 20:19:42 +01:00
README.md Implement benchmark on a Dockerfile 2022-12-27 11:21:01 -03:00
rdo.c clean up bsd compatibility functions 2023-02-05 10:21:01 +01:00
rdo_sample.conf Add groups support 2022-03-08 17:32:53 +01:00
readpassphrase.h Don't search for tty, open it directly. 2022-12-20 22:51:14 +01:00
sessions.h lock tty ioctl to openbsd 2023-02-05 12:43:21 +01:00

README.md

RootDO AUR

This project aims to be a very slim alternative to both sudo and doas.

Installation

If you are on Arch Linux, you can download the package via the AUR.

You can clone and build rdo with the following set of commands:

git clone https://codeberg.org/sw1tchbl4d3/rdo
cd rdo
make
sudo make install

After that, you'll have to configure rdo to allow you to use it. To do this, edit /etc/rdo.conf, and set the group variable to the admin group you are in.

Then you're good to go!

To uninstall:

sudo make uninstall

Usage

rdo [command]

Or, to get the password from stdin:

rdo - [command]

The configuration file has the following variables:

group=wheel
wrong_pw_sleep=1000
session_ttl=5
  • group: The group of users that is allowed to execute rdo.
  • wrong_pw_sleep: The amount of milliseconds to sleep at a wrong password attempt. Must be a positive integer. Set to 0 to disable.
  • session_ttl: The amount of minutes a session lasts. Must be a positive integer. Set to 0 to disable.

Benchmarks

The benchmark: Execute whoami (GNU coreutils 9.1) 10000 times.

Yes, this is a silly benchmark. Yes, the performance gain in real world application is close to nothing.

But it's fun!

Program Time
sudo 1.19.11 46.85s
doas 6.8.2 32.57s
rdo 1.4.2 13.37s
Baseline 7.95s

Baseline here is how long it took without any wrapper to make it root.

These benchmarks were done on a Intel i5 7200U processor, on a Debian 12 Docker container.

sudo and doas were pulled from the Debian repos, rdo was compiled locally.

All configs were kept as default, except allow the wheel group on both + enable persist on doas.

The benchmark can be executed through a Docker container by running:

make bench-build bench-run