mirror of https://github.com/CISOfy/lynis.git
Improve ID detection for Solaris
This commit is contained in:
parent
72ca2b926d
commit
b5b8861368
8
lynis
8
lynis
|
@ -107,9 +107,11 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
|
|||
MYID=""
|
||||
# Check user to determine file permissions later on. If we encounter Solaris, use related id binary instead
|
||||
if [ -x /usr/xpg4/bin/id ]; then
|
||||
MYID=`/usr/xpg4/bin/id -u 2> /dev/null`
|
||||
else
|
||||
MYID=`id -u 2> /dev/null`
|
||||
MYID=$(/usr/xpg4/bin/id -u 2> /dev/null)
|
||||
elif [ `uname` = "SunOS" ]; then
|
||||
MYID=$(id | tr '=' ' ' | tr '(' ' ' | awk '{ print $2 }' 2> /dev/null)
|
||||
else
|
||||
MYID=$(id -u 2> /dev/null)
|
||||
fi
|
||||
if [ "${MYID}" = "" ]; then Display "Could not find user ID with id command. Want to help improving Lynis? Raise a ticket at ${PROGRAM_SOURCE}"; ExitFatal; fi
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue