Skip to content

Commit 558dbdf

Browse files
committed
auditd.service: set LogsDirectory and RuntimeDirectory
This ensures systemd will create these directories ahead of starting the auditd service. It also ensures the auditd service has write permissions, even if someone might add additional hardening options to the systemd service in the future. Directory permission bits were copied from the systemd tmpfiles config for the log directory, and `make_audit_run_dir()` for the runtime directory.
1 parent 8ed522a commit 558dbdf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

init.d/auditd.service.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ ExecStart=@sbindir@/auditd
3535
Restart=on-failure
3636
## Do not restart for intentional exits. See EXIT CODES section in auditd(8).
3737
RestartPreventExitStatus=2 4 6
38+
## Create Log and Runtime directory
39+
LogsDirectory=audit
40+
LogsDirectoryMode=0700
41+
RuntimeDirectory=audit
42+
RuntimeDirectoryMode=0755
3843

3944
### Security Settings ###
4045
MemoryDenyWriteExecute=true

0 commit comments

Comments
 (0)