You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-47Lines changed: 49 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,53 +17,6 @@ The gist is that `sudo` is hard to configure and does a lot more then the standa
17
17
The original utility only targeted *OpenBSD*, and lacked features that I felt were missing from it and `sudo` as well.
18
18
Furthermore, all ports I looked at weren't production read & poorly written.
19
19
20
-
## Changes compared to the original
21
-
22
-
### Security checks
23
-
24
-
The original `doas` doesn't check the owners & permissions of the binary and configuration file.
25
-
`sudo` checks those, but only warns the user.
26
-
27
-
This version ensures the binary and configuration file are owned by `root:root`.
28
-
It also ensures the binary has [setuid](https://en.wikipedia.org/wiki/Setuid), and that the configuration file has only read permissions.
29
-
30
-
Furthermore, only full paths of commands are allowed in the configuration file.
31
-
The idea is that privileged users (i.e: members of the *wheel* group) need to explicitly set the rule instead of depending on the running user's path.
32
-
33
-
### Edit mode
34
-
35
-
```bash
36
-
doas -E
37
-
```
38
-
39
-
`doas` allows any privileged user (i.e: members of the *wheel* group) to edit the configuration file safely.
40
-
Furthermore, if the configuration file is corrupted, privileged users can still access it and edit it.
41
-
42
-
The edit option is similar to `visudo`, it creates a copy of the configuration and updates the real configuration only when the copy is valid.
43
-
44
-
Non-privileged users are not allowed to edit the configuration.
45
-
46
-
### Verbose mode
47
-
48
-
```
49
-
doas -V
50
-
```
51
-
52
-
`doas` allows to show logging information to privileged users. That information shows which rules are being loaded & how they are processed.
53
-
54
-
Non-privileged users are not allowed to turn on verbose mode.
55
-
56
-
### Dump mode
57
-
58
-
```
59
-
doas -D
60
-
```
61
-
62
-
`doas` allows the user to dump the permissions it loaded to screen.
63
-
group permissions and command globs are expanded into individual rules as well.
64
-
65
-
privileged users see the permissions of all users instead of only their own.
66
-
67
20
## Project Goals
68
21
69
22
****Secure***. User's must not be able to abuse the utility, and it should protect the user from making stupid mistakes.
@@ -110,6 +63,10 @@ $ mkdir -p doas/build && cd doas/build && cmake .. && cd ..
110
63
111
64
**[!]** If you're familiar with [direnv](https://oded.blog/2016/12/29/direnv/) and use [fish shell](https://fishshell.com/) you'll enjoy a pre-baked environment.
112
65
66
+
## Project Status
67
+
68
+
Version `0.2.0` is out and has complete feature parity with the original `doas`.
69
+
113
70
## Authors
114
71
115
72
The main author is [Oded Lazar](https://oded.blog/whoami/)
@@ -122,7 +79,52 @@ If you are interested in contributing but not sure where to start, feel free to
122
79
123
80
Once I feel this method is not effective anymore, I'll probably create a slack channel or IRC channel.
124
81
82
+
## Changes compared to the original
83
+
84
+
### Security checks
85
+
86
+
The original `doas` doesn't check the owners & permissions of the binary and configuration file.
87
+
`sudo` checks those, but only warns the user.
88
+
89
+
This version ensures the binary and configuration file are owned by `root:root`.
90
+
It also ensures the binary has [setuid](https://en.wikipedia.org/wiki/Setuid), and that the configuration file has only read permissions.
91
+
92
+
Furthermore, only full paths of commands are allowed in the configuration file.
93
+
The idea is that privileged users (i.e: members of the *wheel* group) need to explicitly set the rule instead of depending on the running user's path.
94
+
95
+
### Edit mode
96
+
97
+
```bash
98
+
doas -E
99
+
```
100
+
101
+
`doas` allows any privileged user (i.e: members of the *wheel* group) to edit the configuration file safely.
102
+
Furthermore, if the configuration file is corrupted, privileged users can still access it and edit it.
125
103
104
+
The edit option is similar to `visudo`, it creates a copy of the configuration and updates the real configuration only when the copy is valid.
105
+
106
+
Non-privileged users are not allowed to edit the configuration.
107
+
108
+
### Verbose mode
109
+
110
+
```
111
+
doas -V
112
+
```
113
+
114
+
`doas` allows to show logging information to privileged users. That information shows which rules are being loaded & how they are processed.
115
+
116
+
Non-privileged users are not allowed to turn on verbose mode.
117
+
118
+
### Dump mode
119
+
120
+
```
121
+
doas -D
122
+
```
123
+
124
+
`doas` allows the user to dump the permissions it loaded to screen.
125
+
group permissions and command globs are expanded into individual rules as well.
126
+
127
+
privileged users see the permissions of all users instead of only their own.
126
128
## Examples
127
129
128
130
Ted Unagst's wrote a great blog post called [doas mastery](https://www.tedunangst.com/flak/post/doas-mastery). Because the project has *complete feature parity* with the OpenBSD version, the mentioned post should be a good starting point.
0 commit comments