mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-26 23:27:01 -05:00
output
This commit is contained in:
parent
10c73b326f
commit
4cc1289e89
@ -160,6 +160,7 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
setuid_or_setsgid=true
|
setuid_or_setsgid=true
|
||||||
fi
|
fi
|
||||||
if test -z "${setuid_or_setsgid}"; then
|
if test -z "${setuid_or_setsgid}"; then
|
||||||
|
log info "Neither setuid nor setsgid. Skipping. file_name: '${file_name}'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -177,10 +178,12 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
is_exact_whitelisted=""
|
is_exact_whitelisted=""
|
||||||
for white_list_entry in "${exact_white_list[@]:-}"; do
|
for white_list_entry in "${exact_white_list[@]:-}"; do
|
||||||
if test -z "${white_list_entry}"; then
|
if test -z "${white_list_entry}"; then
|
||||||
|
log info "white_list_entry unset. Skipping. file_name: '${file_name}'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if test "${file_name}" = "${white_list_entry}"; then
|
if test "${file_name}" = "${white_list_entry}"; then
|
||||||
is_exact_whitelisted="true"
|
is_exact_whitelisted="true"
|
||||||
|
log info "is_exact_whitelisted=true. Skipping. file_name: '${file_name}'"
|
||||||
## Stop looping through the whitelist.
|
## Stop looping through the whitelist.
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -190,10 +193,12 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
is_match_whitelisted=""
|
is_match_whitelisted=""
|
||||||
for matchwhite_list_entry in "${match_white_list[@]:-}"; do
|
for matchwhite_list_entry in "${match_white_list[@]:-}"; do
|
||||||
if test -z "${matchwhite_list_entry}"; then
|
if test -z "${matchwhite_list_entry}"; then
|
||||||
|
log info "matchwhite_list_entry unset. Skipping. file_name: '${file_name}'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if echo "${file_name}" | grep --quiet --fixed-strings "${matchwhite_list_entry}"; then
|
if echo "${file_name}" | grep --quiet --fixed-strings "${matchwhite_list_entry}"; then
|
||||||
is_match_whitelisted="true"
|
is_match_whitelisted="true"
|
||||||
|
log info "is_match_whitelisted=true. Skipping. file_name: '${file_name}'"
|
||||||
## Stop looping through the match_white_list.
|
## Stop looping through the match_white_list.
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -203,10 +208,12 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
is_disable_whitelisted=""
|
is_disable_whitelisted=""
|
||||||
for disablematch_list_entry in "${disable_white_list[@]:-}"; do
|
for disablematch_list_entry in "${disable_white_list[@]:-}"; do
|
||||||
if test -z "${disablematch_list_entry}"; then
|
if test -z "${disablematch_list_entry}"; then
|
||||||
|
log info "disablematch_list_entry unset. Skipping. file_name: '${file_name}'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if echo "${file_name}" | grep --quiet --fixed-strings "${disablematch_list_entry}"; then
|
if echo "${file_name}" | grep --quiet --fixed-strings "${disablematch_list_entry}"; then
|
||||||
is_disable_whitelisted="true"
|
is_disable_whitelisted="true"
|
||||||
|
log info "is_disable_whitelisted=true. Skipping. file_name: '${file_name}'"
|
||||||
## Stop looping through the disablewhitelist.
|
## Stop looping through the disablewhitelist.
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -230,6 +237,8 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
log notice "${clean_output_prefix} ${clean_output}"
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
if dpkg-statoverride ${dpkg_admindir_parameter_existing_mode} --list "${file_name}" >/dev/null; then
|
if dpkg-statoverride ${dpkg_admindir_parameter_existing_mode} --list "${file_name}" >/dev/null; then
|
||||||
log info "Existing mode already saved previously. Not saving again."
|
log info "Existing mode already saved previously. Not saving again."
|
||||||
@ -277,6 +286,7 @@ set_file_perms() {
|
|||||||
local line
|
local line
|
||||||
while read -r line || test -n "${line}"; do
|
while read -r line || test -n "${line}"; do
|
||||||
if test -z "${line}"; then
|
if test -z "${line}"; then
|
||||||
|
true "DEBUG: line is empty. Skipping."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -498,6 +508,7 @@ file_name_from_stat: '${file_name_from_stat}'" >&2
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test -z "${capability_from_config}"; then
|
if test -z "${capability_from_config}"; then
|
||||||
|
log info "capability_from_config is empty. Skipping. file_name: '${file_name}'"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user