mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Merge aa.py: drop unused function profile_exists()
I don't know when (or even: if) this function was in use. A quick look at the git history of aa.py shows that the function was (blindly?) updated a few times. However, I didn't find a commit that uses or stops using profile_exists(), so maybe it was never used at all. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1404 Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
commit
e36ef0ed43
1 changed files with 0 additions and 17 deletions
|
@ -601,23 +601,6 @@ def change_profile_flags(prof_filename, program, flag, set_flag):
|
|||
raise AppArmorException("%(file)s doesn't contain a valid profile for %(profile)s (syntax error?)" % {'file': prof_filename, 'profile': program})
|
||||
|
||||
|
||||
def profile_exists(program):
|
||||
"""Returns True if profile exists, False otherwise"""
|
||||
# Check cache of profiles
|
||||
|
||||
if active_profiles.filename_from_attachment(program):
|
||||
return True
|
||||
# Check the disk for profile
|
||||
prof_path = get_profile_filename_from_attachment(program, True)
|
||||
# print(prof_path)
|
||||
if os.path.isfile(prof_path):
|
||||
# Add to cache of profile
|
||||
raise AppArmorBug('Reached strange condition in profile_exists(), please open a bugreport!')
|
||||
# active_profiles[program] = prof_path
|
||||
# return True
|
||||
return False
|
||||
|
||||
|
||||
def build_x_functions(default, options, exec_toggle):
|
||||
ret_list = []
|
||||
fallback_toggle = False
|
||||
|
|
Loading…
Add table
Reference in a new issue