mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-26 20:09:22 -05:00
refactoring
This commit is contained in:
parent
20b8a407ac
commit
ecbba2fd61
@ -114,10 +114,12 @@ set_file_perms() {
|
||||
|
||||
## Use dpkg-statoverride so permissions are not reset during upgrades.
|
||||
|
||||
if dpkg-statoverride --list | grep -q "${fso%/}"; then
|
||||
fso_without_trailing_slash="${fso%/}"
|
||||
|
||||
if dpkg-statoverride --list | grep -q "$fso_without_trailing_slash"; then
|
||||
## If there is an entry for the fso, but the owner/group/mode do not
|
||||
## match, we remove and re-add the entry to update it.
|
||||
if ! dpkg-statoverride --list | grep -q "$owner $group $mode_from_config ${fso%/}"; then
|
||||
if ! dpkg-statoverride --list | grep -q "$owner $group $mode_from_config $fso_without_trailing_slash"; then
|
||||
echo_wrapper dpkg-statoverride --remove "${fso}"
|
||||
add_statoverride_entry
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user