mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 18:17:09 +00:00
aa-mergeprof: don't ask for includes that are already there
Acked-by: Steve Beattie <steve@nxnw.org>
This commit is contained in:
parent
4f9183b23e
commit
4f4eded593
@ -239,7 +239,12 @@ class Merge(object):
|
||||
|
||||
#Add the file-wide includes from the other profile to the user profile
|
||||
done = False
|
||||
options = list(map(lambda inc: '#include <%s>' %inc, sorted(other.filelist[other.filename]['include'].keys())))
|
||||
|
||||
options = []
|
||||
for inc in other.filelist[other.filename]['include'].keys():
|
||||
if not inc in self.user.filelist[self.user.filename]['include'].keys():
|
||||
options.append('#include <%s>' %inc)
|
||||
|
||||
default_option = 1
|
||||
|
||||
q = aaui.PromptQuestion()
|
||||
@ -267,7 +272,12 @@ class Merge(object):
|
||||
for hat in sorted(other.aa[profile].keys()):
|
||||
#Add the includes from the other profile to the user profile
|
||||
done = False
|
||||
options = list(map(lambda inc: '#include <%s>' %inc, sorted(other.aa[profile][hat]['include'].keys())))
|
||||
|
||||
options = []
|
||||
for inc in other.aa[profile][hat]['include'].keys():
|
||||
if not inc in self.user.aa[profile][hat]['include'].keys():
|
||||
options.append('#include <%s>' %inc)
|
||||
|
||||
default_option = 1
|
||||
|
||||
q = aaui.PromptQuestion()
|
||||
|
Loading…
x
Reference in New Issue
Block a user