mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00: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:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user