1 # OpenDoas: a portable version of OpenBSD's `doas` command
3 `doas` is a minimal replacement for the venerable `sudo`. It was
4 initially [written by Ted Unangst](http://www.tedunangst.com/flak/post/doas)
5 of the OpenBSD project to provide 95% of the features of `sudo` with a
6 fraction of the codebase.
8 At the moment only linux with GLIBC or musl libc is supported and tested.
10 ## Building and installing
20 This is not an official port/project from OpenBSD!
22 As much as possible I've attempted to stick to `doas` as tedu desired
23 it. As things stand it's essentially just code lifted from OpenBSD with
24 PAM or shadow based authentication glommed on to it.
26 Compatibility functions in libopenbsd come from openbsd directly
27 (`strtonum.c`, `reallocarray.c`, `strlcpy.c`, `strlcat.c`),
28 from openssh (`readpassphrase.c`) or from sudo (`closefrom.c`).
30 The PAM and shadow authentication code does not come from the OpenBSD project.
32 ### Perist/Timestamp/Timeout
34 The persist feature is disabled by default and can be enabled with the configure
35 flag `--with-timestamp`.
37 This feature is new and potentially dangerous, in the original doas, a kernel API
38 is used to set and clear timeouts. This API is openbsd specific and no similar API
39 is available on other operating systems.
41 As a workaround, the persist feature is implemented using timestamp files
44 See the comment block in `timestamp.c` for an in-depth description on how
45 timestamps are created and checked to be as safe as possible.