mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-14 03:39:29 -05:00
refactoring
This commit is contained in:
parent
9e493a9f48
commit
55933f8876
@ -127,17 +127,19 @@ set_file_perms() {
|
|||||||
add_statoverride_entry
|
add_statoverride_entry
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [ "$capability" = "" ]; then
|
if [ "$capability" = "" ]; then
|
||||||
if [ "$capability" = "none" ]; then
|
continue
|
||||||
echo_wrapper setcap -r "$fso"
|
fi
|
||||||
else
|
|
||||||
if ! capsh --print | grep "Bounding set" | grep -q "$capability"; then
|
|
||||||
echo "ERROR: Capability '$capability' does not exist!" >&2
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo_wrapper setcap "${capability}+ep" "$fso"
|
if [ "$capability" = "none" ]; then
|
||||||
|
echo_wrapper setcap -r "$fso"
|
||||||
|
else
|
||||||
|
if ! capsh --print | grep "Bounding set" | grep -q "$capability"; then
|
||||||
|
echo "ERROR: Capability '$capability' does not exist!" >&2
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo_wrapper setcap "${capability}+ep" "$fso"
|
||||||
fi
|
fi
|
||||||
done < "${config_file}"
|
done < "${config_file}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user