Skip to content

Commit

Permalink
Fixes #30962 - fix dhcpd.conf acl
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher committed Oct 5, 2020
1 parent 3838f92 commit d6b64ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manifests/proxydhcp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@

ensure_packages(['grep', 'acl'])

[$dhcp::dhcp_dir, dirname($foreman_proxy::dhcp_leases)].each |$path| {
[$dhcp::dhcp_dir, "${dhcp::dhcp_dir}/dhcpd.conf", dirname($foreman_proxy::dhcp_leases)].each |$path| {
exec { "Allow ${foreman_proxy::user} to read ${path}":
command => "setfacl -R -m u:${foreman_proxy::user}:rx ${path}",
path => ['/bin', '/usr/bin'],
unless => "getfacl -p ${path} | grep user:${foreman_proxy::user}:r-x",
require => Package['acl'],
require => [
Package['acl'],
Class['dhcp'],
],
}
}

Expand Down

0 comments on commit d6b64ef

Please sign in to comment.