diff options
author | mboelen <michael@cisofy.com> | 2015-04-27 20:43:04 +0300 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2015-04-27 20:43:04 +0300 |
commit | b5636db5878f0c65c4654a78f534eb122f9fc619 (patch) | |
tree | 1c531b0318bc5a6687ae4d5591758805a5afc92f /lynis | |
parent | 474d69dfd651fb157c757110cf2a7124f8f8f729 (diff) |
Change to permissions check
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -103,12 +103,17 @@ # Check if owner of both files is root user, or the same user which is running Lynis (for pentester mode) # Consts - if [ ! "${OWNER}" = "root" -a ! "${OWNERID}" = "0" ]; then ISSUE=1; SHOWPERMERROR=1; FILE="consts"; fi - if [ ! "${MYID}" = "${OWNER2ID}" ]; then ISSUE=1; SHOWPERMERROR=1; FILE="consts"; fi + if [ ! "${OWNER}" = "root" -a ! "${OWNERID}" = "0" ]; then + if [ ! "${MYID}" = "${OWNER2ID}" ]; then + ISSUE=1; SHOWPERMERROR=1; FILE="consts" + fi + fi # Functions - if [ ! "${OWNER2}" = "root" -a ! "${OWNER2ID}" = "0" ]; then ISSUE=1; SHOWPERMERROR=1; FILE="functions"; fi - if [ ! "${MYID}" = "${OWNER2ID}" ]; then ISSUE=1; SHOWPERMERROR=1; FILE="functions"; fi - + if [ ! "${OWNER2}" = "root" -a ! "${OWNER2ID}" = "0" ]; then + if [ ! "${MYID}" = "${OWNER2ID}" ]; then + ISSUE=1; SHOWPERMERROR=1; FILE="functions" + fi + fi if [ ${SHOWPERMERROR} -eq 1 ]; then echo "" echo "[!] Change ownership of ${INCLUDEDIR}/${FILE} to 'root' or similar (found: ${OWNER} with UID ${OWNERID})." |