lateralblast/lunar

Problems with check_file_perms

lx-se opened this issue · 1 comments

lx-se commented

Hello! Looks like not great idea to combine 2 checks into 1 and here are why:

  1. No parameters checks at all
  2. Both perms and owner are checked and generated error for both even if 1 incorrect.

Scenario:
-rw-r--r-- 1 root sys 44 Aug 17 2018 /etc/motd

Lunar reports wrong permissions because of wrong owner, but perms are OK.
File permissions on /etc/motd
Warning: File /etc/motd has incorrect permissions [2 Warnings]

[ Fix ] chmod 0644 /etc/motd
[ Fix ] chown root:root /etc/motd

Security message in /etc/motd
Warning: No security message in /etc/motd [3 Warnings]

Thanks, I've added some code that I think should deal with this.