apparmor/libraries/libapparmor/swig
Steve Beattie 76a8923ce4 libapparmor: fix swig test_apparmor.py for zero length ptrace records
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 16:54:56 -07:00
..
java move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00
perl pass LDFLAGS fully into build 2017-01-19 23:04:34 +00:00
python libapparmor: fix swig test_apparmor.py for zero length ptrace records 2017-10-18 16:54:56 -07:00
ruby libapparmor: move public headers to separate directory 2014-01-06 14:08:55 -08:00
SWIG libapparmor: Implement aa_stack_profile and aa_stack_onexec 2016-03-18 17:28:50 -05:00
Makefile.am move libapparmor into the libraries directory 2008-05-19 22:48:31 +00:00