Skip to content

Commit

Permalink
Sane default file permissions
Browse files Browse the repository at this point in the history
doas.conf(5) is not an executable format, so `a+x` makes no sense.
It contains privileged commands/information by design, so `o+r` is questionable.

Use `u=rw,g=,o=` to match OpenBSD's /etc/examples/doas.conf suggestion.
  • Loading branch information
klemensn committed Jun 6, 2023
1 parent 3ac2939 commit 12bb5b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Data type: `String`

mode of $configfile

Default value: `'0555'`
Default value: `'0600'`

## Defined types

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Hash $entries = {},
String $owner = 'root',
String $group = 'wheel',
String $mode = '0555',
String $mode = '0600',
) {
concat { $configfile:
owner => $owner,
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/doas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
is_expected.to contain_concat('/etc/doas.conf')
.with_owner('root')
.with_group('wheel')
.with_mode('0555')
.with_mode('0600')
}
it {
is_expected.to contain_concat__fragment('doas header')
Expand Down

0 comments on commit 12bb5b7

Please sign in to comment.