History log of /external/selinux/libsemanage/src/pywrap-test.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d5bcc2285f7a4a739f1b38eeb66d345c3427b1b3 14-Oct-2011 Steve Lawrence <slawrence@tresys.com> libsemanage: update install functions to support CIL

With CIL, the filename and language extension are no longer stored in
the modules themselves like with pp files. So parse this information
from the filename when given a file to install, and require the
information be passed when just data. Symbolic versioning is used to
maintain ABI compatability with the old install functions. API
compatability is not maintained.

Also, remove version from the module info struct and the
semanage_module_info_{get,set}_version functions. These functions have
not been part of an official release, so removing them without providing
ABI/API compatability should not break anything.

Because versioning is removed, semanage_module_upgrade can no longer
perform the necessary checks to ensure an old module is not overriding
a newer module. So, this just remove the upgrade functions from the API.
Functions are added to maintain ABI compatability, which call the
install functions.

Also, CIL has no concept of a base module, so remove the notion of a
base module, including the API functions semanage_module_base_install
and related functions. To maintain ABI compatability, functions are
added which call the new install functions, thus treating base modules
as if they are normal modules.

Signed-off-by: Steve Lawrence <slawrence@tresys.com>
Signed-off-by: Yuli Khodorkovskiy <ykhodorkovskiy@tresys.com>
/external/selinux/libsemanage/src/pywrap-test.py
2eba8aa1f57bda20cbfe435844b400d2deccba37 14-Jun-2014 Nicolas Iooss <nicolas.iooss@m4x.org> libsemanage: use semanage_bool_get_value to print a boolean

... and not semanage_bool_set_value.

This fixes "python2 pywrap-test.py -v -B -C"
/external/selinux/libsemanage/src/pywrap-test.py
49c738fc93ad917ed6e363f0c357074402ae1b60 14-Jun-2014 Nicolas Iooss <nicolas.iooss@m4x.org> libsemanage: fix src/pywrap-test.py -v -F

Running "libsemanage/src/pywrap-test.py -v -F" gives following error:

Traceback (most recent call last):
File "pywrap-test.py", line 1139, in <module>
sys.exit(main())
File "pywrap-test.py", line 1121, in main
tests.run(sh)
File "pywrap-test.py", line 107, in run
self.test_writefcontext(handle)
File "pywrap-test.py", line 622, in test_writefcontext
if self.verbose: print "SEFContext type set: ", semanage.semanage_fcontext_get_type_str(fcon)
TypeError: in method 'semanage_fcontext_get_type_str', argument 1 of type 'int'

The argument of semanage_fcontext_get_type_str is the type recorded in
fcon and not fcon itself. This type can be retrieved with
semanage_fcontext_get_type.
/external/selinux/libsemanage/src/pywrap-test.py
13cd4c8960688af11ad23b4c946149015c80d549 19-Aug-2008 Joshua Brindle <method@manicmethod.com> initial import from svn trunk revision 2950
/external/selinux/libsemanage/src/pywrap-test.py