-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't fail setting log file ACLs with broken NSS backends
Previously we would set POSIX ACL entries on log files by performing an early UID lookup and passing a stringified version of the UID to `exacl::AclEntry::allow_user`. The exacl documentation states that names and decimal strings are accepted. Apparently, exacl would try to look up the decimal string using `getpwnam()` before considering that it should be parsed into a numeric value. Unfortunately, this could cause a fatal error and terminate the Laurel process: fatal error 'Error writing to filter log: Custom { kind: Other, error: Custom { kind: Other, error: "Invalid ACL: entry 3: Connection refused (os errno 111)" } }' at src/bin/laurel/main.rs:300,38 We still do an early uid lookup but pass the original string to exacl instead of the decimal string. Steps to reproduce: System is configured with sssd for AD integration; /etc/nsswitch.conf contains the following lines: passwd: files systemd sss group: files systemd sss shadow: files sss gshadow: files If the machine es rebooted and sssd happens to come up after auditd, laurel fails to start and the error message above (or a similar one) is written to the auditd service's journal This can also be reproduced without rebooting by stopping sssd and restarting auditd (so laurel is restarted).
- Loading branch information
Showing
2 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters