mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-09 22:57:53 +07:00
fix disablewhitelist feature
This commit is contained in:
parent
47ddcad0c0
commit
f8f2e6c704
@ -17,6 +17,8 @@
|
||||
# SUID disablewhitelist
|
||||
######################################################################
|
||||
|
||||
#/utempter/utempter disablewhitelist
|
||||
|
||||
######################################################################
|
||||
# SUID exact match whitelist
|
||||
######################################################################
|
||||
|
@ -170,7 +170,7 @@ add_nosuid_statoverride_entry() {
|
||||
local is_disable_whitelisted
|
||||
is_disable_whitelisted=""
|
||||
for disablematch_list_entry in $disable_white_list ; do
|
||||
if [ "$file_name" = "$disablematch_list_entry" ]; then
|
||||
if echo "$file_name" | grep -q "$disablematch_list_entry" ; then
|
||||
is_disable_whitelisted="true"
|
||||
## Stop looping through the disablewhitelist.
|
||||
break
|
||||
@ -179,7 +179,6 @@ add_nosuid_statoverride_entry() {
|
||||
|
||||
if [ "$is_disable_whitelisted" = "true" ]; then
|
||||
echo "INFO: white list disabled - $setuid_output $setsgid_output found - file_name: '$file_name' | existing_mode: '$existing_mode'"
|
||||
continue
|
||||
else
|
||||
if [ "$is_exact_whitelisted" = "true" ]; then
|
||||
echo "INFO: SKIP whitelisted - $setuid_output $setsgid_output found - file_name: '$file_name' | existing_mode: '$existing_mode'"
|
||||
|
Loading…
Reference in New Issue
Block a user