aa-mergeprof crash with global include if merging profile that doesn't exist in target directory

Bug #1398200 reported by Christian Boltz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
New
Undecided
Unassigned

Bug Description

# head `find -type f`
==> ./old/bin.false <==
#include <tunables/global>
/bin/false {
}

==> ./old/tunables/global <==

==> ./new/bin.true <==
/bin/true {
  /bin/true r,

}

==> ./new/tunables/global <==

# cd new
# aa-mergeprof -d . ../old/bin.false

Merging profile for /bin/false

File includes: Select the ones you wish to add

 [1 - #include <tunables/global>]
[(A)llow] / (I)gnore / Abo(r)t / (F)inish <---- press "a"
Adding #include <tunables/global> to the file.
Traceback (most recent call last):
  File "/home/cb/apparmor/HEAD-clean/utils/aa-mergeprof", line 795, in <module>
    main()
  File "/home/cb/apparmor/HEAD-clean/utils/aa-mergeprof", line 113, in main
    act([user_file, base_file, None], 2, profile_name)
  File "/home/cb/apparmor/HEAD-clean/utils/aa-mergeprof", line 146, in act
    program = programs[0]
IndexError: list index out of range

Tags: aa-tools
Christian Boltz (cboltz)
tags: added: aa-tools
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.