2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Drop profile_ filename prefix for named profiles

Historically, if you create a `profile foo /bin/foo` with aa-logprof (by
choosing "named exec"), it will be saved as `/etc/apparmor.d/profile_foo`

This patch drops the `profile_` filename prefix so that the filename
will be `/etc/apparmor.d/foo`
This commit is contained in:
Christian Boltz
2023-04-23 19:21:31 +02:00
parent 5bb867dbc0
commit d4bcd50c5a

View File

@@ -237,7 +237,7 @@ def get_new_profile_filename(profile):
# Remove leading /
filename = profile[1:]
else:
filename = "profile_" + profile
filename = profile
filename = filename.replace('/', '.')
filename = os.path.join(profile_dir, filename)
return filename