]> git.armaanb.net Git - opendoas.git/blob - README.md
simplify makefile
[opendoas.git] / README.md
1 # OpenDoas: a portable version of OpenBSD's `doas` command
2
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.
7
8 At the moment only linux with GLIBC or musl libc is supported and tested.
9
10 ## Building and installing
11
12 ```
13 $ ./configure
14 $ make
15 # make install
16 ```
17
18 ## About the port
19
20 This is not an official port/project from OpenBSD!
21
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.
25
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`).
29
30 The PAM and shadow authentication code does not come from the OpenBSD project.
31
32 ### Perist/Timestamp/Timeout
33
34 The persist feature is disabled by default and can be enabled with the configure
35 flag `--with-timestamp`.
36
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.
40
41 As a workaround, the persist feature is implemented using timestamp files
42 similar to sudo.
43
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.