mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Simplify profiles_names_list()
... which is used by aa-remove-unknown. apparmor_parser can read a whole directory, therefore we don't need to do the directory listing, excluding *.rpmnew etc. ourself. Related to https://gitlab.com/apparmor/apparmor/-/issues/148
This commit is contained in:
parent
9aa1a5b492
commit
d38376c9c4
1 changed files with 4 additions and 8 deletions
|
@ -215,14 +215,10 @@ profiles_names_list() {
|
|||
continue
|
||||
fi
|
||||
|
||||
for profile in "$profile_dir"/*; do
|
||||
if skip_profile "$profile" && [ -f "$profile" ] ; then
|
||||
LIST_ADD=$("$PARSER" -N "$profile" )
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$LIST_ADD"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
LIST_ADD=$("$PARSER" -N "$profile_dir" )
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$LIST_ADD"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue