mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 23:05:11 +00:00
utils: test: test-aa-notify: Ensure aanotify_bin is always a list
os.environ returns a string, but the default value is a list, and the concatenation of __AA_CONFDIR assumes a list. Thus, if APPARMOR_NOTIFY and __AA_CONFDIR were both specified, this would error out. Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
@@ -602,7 +602,7 @@ setup_aa(aa) # Wrapper for aa.init_aa()
|
|||||||
setup_all_loops(__name__)
|
setup_all_loops(__name__)
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if 'APPARMOR_NOTIFY' in os.environ:
|
if 'APPARMOR_NOTIFY' in os.environ:
|
||||||
aanotify_bin = os.environ['APPARMOR_NOTIFY']
|
aanotify_bin = [os.environ['APPARMOR_NOTIFY']]
|
||||||
|
|
||||||
if '__AA_CONFDIR' in os.environ:
|
if '__AA_CONFDIR' in os.environ:
|
||||||
aanotify_bin = aanotify_bin + ['--configdir', os.getenv('__AA_CONFDIR')]
|
aanotify_bin = aanotify_bin + ['--configdir', os.getenv('__AA_CONFDIR')]
|
||||||
|
Reference in New Issue
Block a user