can't call aa_change_hatv() from python

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

Bug Description

It seems to be impossible to call aa_change_hatv from python using the swig bindings - whatever array type I try, I get a TypeError.

# python3
Python 3.6.2 (default, Aug 03 2017, 16:34:42) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from LibAppArmor import aa_change_hat, aa_change_hatv

>>> hats = ['foo', 'bar']
>>> aa_change_hatv( hats, 1234)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: in method 'aa_change_hatv', argument 1 of type 'char const *[]'

>>> hats = ('foo', 'bar')
>>> aa_change_hatv( hats, 1234)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: in method 'aa_change_hatv', argument 1 of type 'char const *[]'

>>> hats = {'foo', 'bar'}
>>> aa_change_hatv( hats, 1234)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: in method 'aa_change_hatv', argument 1 of type 'char const *[]'

Am I doing something wrong, or are the bindings broken?

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.