mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
skip files suffixed with .dpkg-old, based on a patch from Mathias Gug
<mathiaz@ubuntu.com> [Message-ID: <20070813201254.GD11381@mathias.mathiaz.net>] Added comments to both file-skipping locations referencing the other location that needs to be modified. (The ideal solution would be for this information to be stored in one commonly referenced location, configurable by distributors and administratrors.)
This commit is contained in:
parent
b608f2643b
commit
6123467433
2 changed files with 5 additions and 0 deletions
|
@ -101,6 +101,8 @@ fi
|
|||
# keep exit status from parser during profile load. 0 is good, 1 is bad
|
||||
STATUS=0
|
||||
|
||||
# This set of patterns to skip needs to be kept in sync with
|
||||
# SubDomain.pm::isSkippableFile()
|
||||
skip_profile() {
|
||||
local profile=$1
|
||||
if [ "${profile%.rpmnew}" != "${profile}" -o \
|
||||
|
|
|
@ -3695,11 +3695,14 @@ sub contains ($$) {
|
|||
|
||||
# isSkippableFile - return true if filename matches something that
|
||||
# should be skipped (rpm backup files, dotfiles, emacs backup files
|
||||
# Annoyingly, this needs to be kept in sync with the skipped files
|
||||
# in the apparmor initscript.
|
||||
sub isSkippableFile($) {
|
||||
my $path = shift;
|
||||
|
||||
return ($path =~ /(^|\/)\.[^\/]*$/
|
||||
|| $path =~ /\.rpm(save|new)$/
|
||||
|| $path =~ /\.dpkg-(old|new)$/
|
||||
|| $path =~ /\~$/);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue