[apparmor] [patch] libapparmor python binding - fix 32bit test failures

Seth Arnold seth.arnold at canonical.com
Mon Sep 16 17:14:40 UTC 2013


On Mon, Sep 16, 2013 at 09:42:23AM -0700, Steve Beattie wrote:
> 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>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  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),
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130916/52982e7c/attachment.pgp>


More information about the AppArmor mailing list