The python bindings were using the wrong data type cast (long long
instead of just long) on the value '-1' that is used to indicate no
value for the 'fsuid' and 'ouid' fields in the returned data structure.
Thus a bunch of the tests were failing in 32bit environments.

This patch corrects the issue.

Signed-off-by: Steve Beattie <[email protected]>
---
 libraries/libapparmor/swig/python/test/test_python.py.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/libraries/libapparmor/swig/python/test/test_python.py.in
===================================================================
--- a/libraries/libapparmor/swig/python/test/test_python.py.in
+++ b/libraries/libapparmor/swig/python/test/test_python.py.in
@@ -50,8 +50,8 @@ EVENT_MAP = {
 
 # default is None if not in this table
 NO_VALUE_MAP = {
-    'fsuid': int(ctypes.c_ulonglong(-1).value),
-    'ouid':  int(ctypes.c_ulonglong(-1).value),
+    'fsuid': int(ctypes.c_ulong(-1).value),
+    'ouid':  int(ctypes.c_ulong(-1).value),
 }
 
 
-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to