apparmor/libraries/libapparmor/swig
Steve Beattie 2e1d4f5b67 libapparmor: fix swig test_apparmor.py for zero length ptrace records
Merge from trunk revision 3715

The added testcase for a ptrace target with an empty string
(ptrace_garbage_lp1689667_1.in) was causing the swig python test script
to fail. The generated python swig record for libapparmor ends up
setting a number of fields to None or other values that indicate the
value is unset, and the test script was checking if the value in the
field didn't evaluate to False in a python 'if' test.

Unfortunately, python evaluates the empty string '' as False in 'if'
tests, resulting in the specific field that contained the empty string
to be dropped from the returned record. This commit fixes that by
special case checking for the empty string.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2017-10-18 17:09:42 -07:00
..
java move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
perl libapparmor: move public headers to separate directory 2014-01-06 14:08:55 -08:00
python libapparmor: fix swig test_apparmor.py for zero length ptrace records 2017-10-18 17:09:42 -07:00
ruby libapparmor: move public headers to separate directory 2014-01-06 14:08:55 -08:00
SWIG libapparmor: Don't apply special SWIG %exception to some functions 2015-06-16 15:51:19 -05:00
Makefile.am move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00