SDP-627

C. Thomas Tyler
Closed
Add verify_sdp.sh check for p4*.services files w/o world read access.

For some back story, see:
https://swarm.workshop.perforce.com/reviews/27656#comments

Note: verify_sdp.sh needs to be able to run as perforce, so it cannot
do something like `ls` to check file permissions. Instead, we want
to look for the specific error we get when a service file with an
expected name exists, but we just can't see its contents.

Say for example we do a 'systemctl cat p4d_1' and it doesn't exist
at all, we get:

  $ systemctl cat p4d_N.service
  No files found for p4d_1.service.

However, if the *.service file does exist and we simply can't see
its contents, we get a different error message.

  $ systemctl cat p4d_1.service
  Failed to cat /etc/systemd/system/p4d_1.service: Permission denied

If we get the "No files found for p4d_1.service", then we know no
such service exists.  If we get the "Permission denied" error, than
we know we have an error condition: The *.service exists, but has
the wrong permissions.
Status
Closed
Project
perforce-software-sdp
Severity
C
Reported By
tom_tyler
Reported Date
Modified By
swarm-user
Modified Date
Owned By
tom_tyler
Component
core-unix
Type
Feature