]> git.armaanb.net Git - opendoas.git/blob - README.md
104cf7d9f122f2f0c5c71b55a88f3da0853f45b9
[opendoas.git] / README.md
1 # OpenDoas
2
3 > a portable version of OpenBSD's `doas` command
4
5 `doas` is a minimal replacement for the venerable `sudo`. It was
6 initially [written by Ted Unangst](http://www.tedunangst.com/flak/post/doas)
7 of the OpenBSD project to provide 95% of the features of `sudo` with a
8 fraction of the codebase.
9
10 This fork insults you, similar to `sudo`. To enable, add the "insult" option
11 to your `doas.conf`
12
13 ## Building and installation discouragements
14
15 There are a few steps you have to carefully consider before building and installing
16 opendoas:
17
18 * There are less eyes on random doas ports, just because sudo had a vulnerability
19   does not mean random doas ports are more secure if they are not reviewed.
20 * Use the configure script.
21 * Use the default make target.
22
23 ## About the port
24
25 This is not an official port/project from OpenBSD!
26
27 As much as possible I've attempted to stick to `doas` as tedu desired
28 it. As things stand it's essentially just code lifted from OpenBSD with
29 shadow based authentication glommed on to it.
30
31 Compatibility functions in libopenbsd come from openbsd directly
32 (`strtonum.c`, `reallocarray.c`, `strlcpy.c`, `strlcat.c`),
33 from openssh (`readpassphrase.c`) or from sudo (`closefrom.c`).
34
35 The shadow authentication code does not come from the OpenBSD project.
36
37 ### Persist/Timestamp/Timeout
38
39 The persist feature is disabled by default and can be enabled with the configure
40 flag `--with-timestamp`.
41
42 This feature is new and potentially dangerous, in the original doas, a kernel API
43 is used to set and clear timeouts. This API is openbsd specific and no similar API
44 is available on other operating systems.
45
46 As a workaround, the persist feature is implemented using timestamp files
47 similar to sudo.
48
49 See the comment block in `timestamp.c` for an in-depth description on how
50 timestamps are created and checked to be as safe as possible.