TT#47113 Change check of /var/log/messages

The check of /var/log/messages was not strict enough, and it failed:

  22 - - Command: find /var/log/ -type f -name messages ! -group adm:
     stdout: patterns not found: [!/./]     0 ms
  34 - - Command: find /var/log/ -type f -name messages ! -perm 640:
     stdout: patterns not found: [!/./]     0 ms
  51 - - Command: find /var/log/ -type f -name messages ! -user root:
     stdout: patterns not found: [!/./]     0 ms

due to matches of /var/log/asterisk/messages which were not intended, and
doesn't follow the same ownership and permissions rules:

  root@spce:~# ls -l /var/log/asterisk/messages
  -rw-rw---- 1 asterisk asterisk 0 Dec 10  2019 /var/log/asterisk/messages

So convert /var/log/messages back to be a basic check of type "file", as it was
initially, because now it's guaranteed to be created (by systemd-tmpfiles).

Change-Id: Ibd392a0adef78d09e7b232ef3ccae7f9a7e83f56
mr9.1
Manuel Montecelo 5 years ago
parent 743e0d0edb
commit 4cd3d9bb9f

@ -1,5 +1,12 @@
file:
/var/log/messages:
exists: true
mode: "0640"
owner: root
group: adm
filetype: file
/var/log/syslog:
exists: true
mode: "0640"
@ -170,26 +177,3 @@ command:
- '!/./'
stderr:
- '!/./'
# /var/log/messages
"find /var/log/ -type f -name messages ! -user root":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name messages ! -group adm":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'
"find /var/log/ -type f -name messages ! -perm 640":
exit-status: 0
stdout:
- '!/./'
stderr:
- '!/./'

Loading…
Cancel
Save