disable debugging

This commit is contained in:
Patrick Schleizer 2019-12-21 07:44:23 -05:00
parent 1fe83d683f
commit aef796a524
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -31,21 +31,15 @@ undo_all() {
fi
true "owner: '$owner' group: '$group' mode: '$mode' file_name: '$file_name'"
stat -c "%n %a %U %G" "$file_name" || true
chown "${owner}:${group}" "$file_name" || exit_code=202
## chmod need to be run after chown since chown removes suid.
## https://unix.stackexchange.com/questions/53665/chown-removes-setuid-bit-bug-or-feature
chmod "$mode" "$file_name" || exit_code=203
stat -c "%n %a %U %G" "$file_name" || true
dpkg-statoverride --remove "$file_name" &>/dev/null || true
dpkg-statoverride $dpkg_admindir_parameter_existing_mode --remove "$file_name" &>/dev/null || true
dpkg-statoverride $dpkg_admindir_parameter_new_mode --remove "$file_name" &>/dev/null || true
stat -c "%n %a %U %G" "$file_name" || true
done < "/var/lib/permission-hardening/existing_mode/statoverride"
}