Skip to content

Commit

Permalink
systemd service: Only enable MemoryDenyWriteExecute for ixfrdist
Browse files Browse the repository at this point in the history
Because it does not play well with LuaJIT, which all other products
use.
  • Loading branch information
rgacogne committed Dec 7, 2022
1 parent a4e4a9d commit 3b78486
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
3 changes: 0 additions & 3 deletions pdns/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1793,9 +1793,6 @@ endif
if !HAVE_SYSTEMD_SYSTEM_CALL_FILTER
$(AM_V_GEN)perl -ni -e 'print unless /^SystemCallFilter/' $@
endif
if !HAVE_SYSTEMD_MEMORY_DENY_WRITE_EXECUTE
$(AM_V_GEN)perl -ni -e 'print unless /^MemoryDenyWriteExecute/' $@
endif
if !HAVE_SYSTEMD_PROTECT_PROC
$(AM_V_GEN)perl -ni -e 'print unless /^ProtectProc/' $@
endif
Expand Down
3 changes: 0 additions & 3 deletions pdns/dnsdistdist/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,6 @@ endif
if !HAVE_SYSTEMD_PROTECT_PROC
$(AM_V_GEN)perl -ni -e 'print unless /^ProtectProc/' $@
endif
if !HAVE_SYSTEMD_MEMORY_DENY_WRITE_EXECUTE
$(AM_V_GEN)perl -ni -e 'print unless /^MemoryDenyWriteExecute/' $@
endif
if !HAVE_SYSTEMD_PRIVATE_IPC
$(AM_V_GEN)perl -ni -e 'print unless /^PrivateIPC/' $@
endif
Expand Down
3 changes: 2 additions & 1 deletion pdns/dnsdistdist/dnsdist.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~ @clock @debug @module @mount @raw-io @reboot @swap @cpu-emulation @obsolete
ProtectProc=invisible
MemoryDenyWriteExecute=true
PrivateIPC=true
RemoveIPC=true
DevicePolicy=closed
# Not enabled by default because it does not play well with LuaJIT
# MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion pdns/ixfrdist.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~ @clock @debug @module @mount @raw-io @reboot @swap @cpu-emulation @obsolete
ProtectProc=invisible
MemoryDenyWriteExecute=true
PrivateIPC=true
RemoveIPC=true
DevicePolicy=closed
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target
3 changes: 2 additions & 1 deletion pdns/pdns.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~ @clock @debug @module @mount @raw-io @reboot @swap @cpu-emulation @obsolete
ProtectProc=invisible
MemoryDenyWriteExecute=true
PrivateIPC=true
RemoveIPC=true
DevicePolicy=closed
# Not enabled by default because it does not play well with LuaJIT
# MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target
3 changes: 0 additions & 3 deletions pdns/recursordist/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,6 @@ endif
if !HAVE_SYSTEMD_PROTECT_PROC
$(AM_V_GEN)perl -ni -e 'print unless /^ProtectProc/' $@
endif
if !HAVE_SYSTEMD_MEMORY_DENY_WRITE_EXECUTE
$(AM_V_GEN)perl -ni -e 'print unless /^MemoryDenyWriteExecute/' $@
endif
if !HAVE_SYSTEMD_PRIVATE_IPC
$(AM_V_GEN)perl -ni -e 'print unless /^PrivateIPC/' $@
endif
Expand Down
3 changes: 2 additions & 1 deletion pdns/recursordist/pdns-recursor.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~ @clock @debug @module @mount @raw-io @reboot @swap @cpu-emulation @obsolete
ProtectProc=invisible
MemoryDenyWriteExecute=true
PrivateIPC=true
RemoveIPC=true
DevicePolicy=closed
# Not enabled by default because it does not play well with LuaJIT
# MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.target

0 comments on commit 3b78486

Please sign in to comment.