Crates.io | dosu |
lib.rs | dosu |
version | 0.0.2 |
source | src |
created_at | 2021-07-24 07:01:31.191676 |
updated_at | 2021-07-24 07:26:50.05613 |
description | Rust port of OpenBSD's doas |
homepage | |
repository | https://github.com/orvij/dosu |
max_upload_size | |
id | 426659 |
size | 52,889 |
Heavily work-in-progress rewrite of OpenBSD's doas
in Rust
Largely based on Ted Unangst's work.
dosu
is not an official OpenBSD project/port!
Even though I have done my due dilligence to ensure quality code, there are likely still things I've missed.
So far, this is a one-person development project with no peer review, in the earliest stages of development.
Please be careful when using dosu
.
To download and build dosu
:
:$ git clone https://github.com/orvij/dosu
:$ cd dosu
:$ cargo build --release
## If you want to play around with dosu before installing,
## you need to change ownership to root and setuid
:# chown root:bin target/release/dosu
:# chmod 4555 target/release/dosu
To install dosu
:
## Basic install script to make dosu setuid, and install to the correct path
## Proper "make install" script is WIP, and current script is non-portable
:$ ./install
:$ ./install /usr/local/bin
Running dosu
is should be very familiar to anyone using doas
:
:$ dosu ls
:$ dosu -s
:$ dosu -C /etc/doas.conf
:$ dosu du -a
:$ dosu -h
Much like the work in OpenDoas, the long-term goal of this project is to be portable across as many systems as possible.
Currently, only OpenBSD is supported. The next OS targets are (in no particular order):
If you have an operating system you would like dosu
to support, please file an issue or submit some code, and it will get added to the list.
dosu
needs to interact with the operating system, since it's basically just glue code around a few system calls.
There are a number of places where calling a C FFI is unavoidable, in the main code and dependencies.
It is a long-term goal to remove as much unsafe
as possible. Who knows, maybe one day all system calls will be in Rust 😉
A huge thank you to Ted Unangst and the OpenBSD devs for the high-quality code and documentation. Really helped in porting, and likely saved countless hours in debugging.
A similar sized gesture of gratitude to the Rust devs for making the coding experience so great, the libc and nix devs for their work on C FFI interfaces, the nom devs for their parser work, and Josh Triplett and Joshua Nelson for helping debug documentation builds.
dosu
is still very much a work-in-progress, and likely has bugs.
While I've done my best to ensure high-quality code, bugs are almost certainly present.
If you find something, please open an issue and/or submit a fix.