From d41b1d9c5fc265c327c65fc85d01a2430216f5c1 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Wed, 10 Jul 2019 19:28:26 +0200 Subject: [PATCH] Check if setuid bit is set --- lynis | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lynis b/lynis index e5faf06f..d486520a 100755 --- a/lynis +++ b/lynis @@ -67,6 +67,9 @@ # ################################################################################# # + # Check setuid bit + if [ -u "$0" ]; then echo "The called binary has the set-user-id bit - As this is unusual, execution will be stopped."; exit 1; fi + # Work directory WORKDIR=$(pwd)