mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 08:14:10 +02:00
Change to permissions check
This commit is contained in:
parent
474d69dfd6
commit
b5636db587
15
lynis
15
lynis
@ -103,12 +103,17 @@
|
|||||||
# Check if owner of both files is root user, or the same user which is running Lynis (for pentester mode)
|
# Check if owner of both files is root user, or the same user which is running Lynis (for pentester mode)
|
||||||
|
|
||||||
# Consts
|
# Consts
|
||||||
if [ ! "${OWNER}" = "root" -a ! "${OWNERID}" = "0" ]; 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
|
if [ ! "${MYID}" = "${OWNER2ID}" ]; then
|
||||||
|
ISSUE=1; SHOWPERMERROR=1; FILE="consts"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
# Functions
|
# Functions
|
||||||
if [ ! "${OWNER2}" = "root" -a ! "${OWNER2ID}" = "0" ]; 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
|
if [ ! "${MYID}" = "${OWNER2ID}" ]; then
|
||||||
|
ISSUE=1; SHOWPERMERROR=1; FILE="functions"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [ ${SHOWPERMERROR} -eq 1 ]; then
|
if [ ${SHOWPERMERROR} -eq 1 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "[!] Change ownership of ${INCLUDEDIR}/${FILE} to 'root' or similar (found: ${OWNER} with UID ${OWNERID})."
|
echo "[!] Change ownership of ${INCLUDEDIR}/${FILE} to 'root' or similar (found: ${OWNER} with UID ${OWNERID})."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user