Added checks to wrapper scripts for selinux utils. Before running
commands, verify enviromental variables are set and that required files
exists. Return an error code in the event of failure.
Test: Verify audit2allow, audit2why, sediff, seinfo commands still run.
Test: Verify failure if prerequisites are not satisfied.
Change-Id: I3705a90e0a81704829aa5a5feedbfe22aec5fa55
Signed-off-by: Brian Murray <Brian@Clover.com>
Allow PYTHONPATH to be specified through the environment, this handy
for having the networkx dependency in a non-standard location for
when the user doesn't have admin rights.
Test: Uninstall networkx and run sesearch so it throws an exception on
not being able to resolve networkx. export PYTHONPATH to point
to a local download of networkx. Run sesearch and ensure the
exception on networkx goes away.
Change-Id: I490ffe28e872af4a6d94103e49d487b06147f3f3
Signed-off-by: William Roberts <william.c.roberts@intel.com>
Use the libselinux.so library that's already compiled for the host
rather than relying on a prebuilt library. Add functions needed by
the prebuilt python wrappers.
While I'm here, delete -DDARWIN. This define is no longer used as of
commit bedef7d124
Bug: 33170640
Test: code compiles
Test: audit2allow, audit2why, sediff, and search work
Change-Id: I4c8d9eef6149339744e9b3ef823683289d25551c
The mac build is broken. Reverting while I figure out an appropriate solution.
external/selinux/libselinux/src/avc_internal.c:21:10: fatal error: 'linux/types.h' file not found
#include <linux/types.h>
This reverts commit 85457a374f.
Bug: 33170640
Change-Id: I285d0b4d138897725f54180812a6c816755d4db5
Use the libselinux.so library that's already compiled for the host
rather than relying on a prebuilt library. Add functions needed by the
prebuilt python wrappers.
Bug: 33170640
Test: code compiles
Test: audit2allow, audit2why, sediff, and search work
Change-Id: Ibcd26f3cbb10fe5576d77b8b7715dd769205c9d0
Commit 48dc2326 (Move
policycoreutils/{sepolicy,audit2allow,semanage,scripts/chcat*} and
sepolgen to python.) broke our audit2allow and audit2why wrappers. Fix
them.
Test: audit2allow and audit2why work from the command line
Change-Id: I07a37279677773c3d2b86e21257f75bbeb58a2e2
Fix the following error:
$ audit2allow external/selinux/prebuilts/bin/audit2allow: 4: /external/selinux/prebuilts/bin/audit2allow: [[: not found
audit2allow is only supported on linux
Bug: 21894097
Change-Id: Ic7df339daa3a8db891fd8de3584da10c8bb2f4d5
Instead of moving audit2allow into out directory, run directly from
selinux/prebuilts. Include path in build/envsetup.sh
Includes some general cleanup of the file structure.
Bug: 21724977
Change-Id: Ide320a56b9cdbfa426b978443f6df07fa2a38fbc