[apparmor] [patch] libapparmor python binding - fix 32bit test failures
Steve Beattie
steve at nxnw.org
Mon Sep 16 16:42:23 UTC 2013
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 <steve at nxnw.org>
---
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
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130916/3e3b0c88/attachment.pgp>
More information about the AppArmor
mailing list