Commit Graph

61 Commits

Author SHA1 Message Date
Chris PeBenito
270a094a1e SELinuxPolicy: Initial switch over to exported sepol library functions.
Also switch over to libselinux C use.
2018-06-15 20:26:49 -04:00
Chris PeBenito
5cba00bcdf FileNameTERule: Convert to direct sepol data structure access. Add iterator. 2018-06-15 20:26:49 -04:00
Chris PeBenito
23d42f162f MLSRule: Convert to direct sepol structure access. Add iterator. 2018-06-15 20:26:49 -04:00
Chris PeBenito
3d4b03691d Context: Convert to direct sepol structure access. 2018-06-15 20:26:49 -04:00
Chris PeBenito
32d67a4c9a Default: Convert to direct sepol structure access. 2018-06-15 20:26:49 -04:00
Chris PeBenito
42ec9f751a User: Convert to direct sepol structure access. Add iterator 2018-06-15 20:26:49 -04:00
Chris PeBenito
d2896d6a53 Role: Convert to direct sepol structure access. Add iterators. 2018-06-15 20:26:49 -04:00
Chris PeBenito
c45205c5b0 policyrep: Convert type and typeattrs to direct sepol structure access.
Add iterators.
2018-06-15 20:26:49 -04:00
Chris PeBenito
d476f22055 policyrep: Convert MLS symbols and levels/ranges to direct sepol structure access.
Add iterators.
2018-06-15 20:26:49 -04:00
Chris PeBenito
8260b9b166 Boolean: Convert to direct sepol structure access. Add iterator. 2018-06-15 20:26:49 -04:00
Chris PeBenito
680664ba66 PolicyCapability: Convert to direct sepol structure access. Add iterator. 2018-06-15 20:26:49 -04:00
Chris PeBenito
a06d4a9476 Genfscon: Revise to directly use sepol data structures. 2018-06-15 20:26:49 -04:00
Chris PeBenito
80a95bd414 FSUse: Revise to directly use sepol data structures. 2018-06-15 20:26:49 -04:00
Chris PeBenito
bb5004df2d policyrep: Revise initial SIDs to directly use sepol data structures. 2018-06-15 20:26:49 -04:00
Chris PeBenito
2dd1e9366a policyrep: Revise network contexts to directly use sepol data structures. 2018-06-15 20:26:49 -04:00
Chris PeBenito
9c053cc5fe policyrep: Revise Xen contexts to directly use sepol data structures. 2018-06-15 20:26:49 -04:00
Chris PeBenito
c5b0348357 policyrep: Create a libsepol cython definition. 2018-06-15 20:26:49 -04:00
Chris PeBenito
8b0e93c0d6 Remove source policy loading support and module loading support. 2018-06-15 20:26:49 -04:00
Chris PeBenito
8c9c06e678 .travis.yml: Update for Cython use. 2018-06-15 20:26:49 -04:00
Chris PeBenito
51b53eb4a5 setup.py: Update for cython extension. 2018-06-15 20:26:49 -04:00
Chris PeBenito
cc313f9791 __future__ print functions no longer need importing. 2017-09-24 20:40:29 -04:00
Chris PeBenito
576268eeca Use the suppress context manager where possible to improve readability. 2017-09-17 09:43:13 -04:00
Chris PeBenito
e292a77c52 Drop support for Python < 3.4. 2017-09-17 09:43:13 -04:00
Chris PeBenito
58f62bf627 Start 4.2 development. 2017-09-17 09:43:13 -04:00
Chris PeBenito
f8eaafc53f setup.py: Update for travis-ci. 2017-08-05 15:55:35 -04:00
Nicolas Iooss
3868613c8f
Generate Apol compressed help file with "setup.py build_qhc"
"setup.py build_qhc" invokes qcollectiongenerator on qhc/apol.qhcp,
which produces two files:
- apol.qhc, a Qt Help Collection file
- apol.qch, a Qt Compressed Help file

As apol.qhc is merely a set of metadata with a relative link to
apol.qch, Qt Assistant requires both files in order to display Apol
help.

Make "setup.py build_qhc" build both files in setoolsgui/apol/.

Moreover '*.qch' needs to be added to package_data in order to install
apol.qch.

Fixes: https://github.com/TresysTechnology/setools/issues/165
2017-02-15 21:37:45 +01:00
Karl MacMillan
e743d2a0ea Ftrules hashtab ()
* Search for libsepol in /usr/local

* Support filename transition and range transitions rules in the new hashtable storage of libsepol

* Fix off-by-one bug in traversing hashtables and minor compile fixes under Fedora 25.

* Remove debugging.

* The policy_define.c that uses hashtables was not setting the otype for filetrans_rules. This
appears intentional (the hashtable is just being filled out to detect duplicates based on the comments),
but for qpol was causing problems.
2017-01-23 18:27:22 -05:00
Chris PeBenito
42c2bbd606 Move data in as package data.
Closes .
2016-11-12 11:13:21 -05:00
Chris PeBenito
60e8b9d7fb setup.py: Support locally-built libsepol.
Set the SEPOL_SRC env. variable to the path to the compiled libsepol
source tree.

Closes 
2016-11-11 18:21:48 -05:00
Chris PeBenito
6eaf7a26f5 libqpol: Remove unused syntactic rule functions. 2016-05-20 10:31:18 -04:00
Jake Valletta
1655fb7e56 Add error check for missing libsepol.so
The setup.py script attempts to locate the 'libsepol.so' library
if the SEPOL environment variable is not set, but does not fail
safely if the find fails. This commit adds error checking if the
'libsepol.so' is not located.
2016-05-10 14:16:53 -04:00
Chris PeBenito
a87015d4b5 Merge pull request from jbrindle/master
bison generates unreachable code
2016-05-09 12:42:04 -04:00
Joshua Brindle
f6ed116a81 bison generates unreachable code 2016-05-09 11:02:21 -04:00
Chris PeBenito
d6f94d53c7 apol: Replace icons with icons from the current theme.
Koloria license may be problematic for some distributions.
2016-05-05 09:47:51 -04:00
Chris PeBenito
fa13413eec Move linux_types.h to libqpol directory. 2016-04-25 11:09:51 -04:00
Chris PeBenito
d5589ecd43 setup.py: change version to 4.1-dev. 2016-04-22 14:32:43 -04:00
Chris PeBenito
a7fe3639ec Remove bzip2 dependency.
This was needed for bzipped .pp files, but loading modules is no longer
supported.
2016-04-22 13:48:39 -04:00
Joshua Brindle
495a7973d8 Darwin define, remove libselinux and libsepol shared lib, remove libqpol map, and add local include dir 2016-04-22 09:33:14 -04:00
Chris PeBenito
f6cecd407f Add a copy of apol.qhc so users don't need to install Qt dev tools.
Distros are encouraged to rebuild this using the build_help setup.py
target.

Renamed setup target to build_qhc to bring in line with other help
references.
2016-04-20 09:50:23 -04:00
Chris PeBenito
2828db4a64 apol: Implement help menu
Populate with some help text from setools3.

Related to 
2016-04-19 16:03:15 -04:00
Steve Lawrence
21864a7ea6 Change extended avrules to be more similar to normal avrules
- Add an iterator to extract the extended permissions rather than
  returning only a string
- Add queries for determining if an avrule is extended, and what its
  type the extended avrule is (e.g. ioctl)
- Removed tests, but should probably revert that change and make sure
  they still work
- Fixed some warnings about unsigned/signed comparisons with ebitmaps
- Updates seinfo and sesearch to support new extended avrule changes

Signed-off-by: Steve Lawrence <slawrence@tresys.com>
2016-03-21 10:57:21 -04:00
Richard Haines
dd29dc9c43 setools-V4: libqpol policy V30 updates (xen/xperm statements)
Updated libqpol services to use the latest checkpolicy 2.4 source
files to support Xen and extended permissions (allowxperm etc.).

TODO: Add support for querying the xperm values.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2016-03-21 10:56:37 -04:00
Chris PeBenito
f0cdd68afc Fix man page install location. 2016-02-22 08:12:19 -05:00
Chris PeBenito
1bd80d6356 Add man pages.
Closes 
2016-02-21 16:27:44 -05:00
Chris PeBenito
403da9aee5 Bump version for release. 2016-02-18 09:46:09 -05:00
Chris PeBenito
668ad8e66a setup.py: add sediff 2016-01-07 14:48:50 -05:00
Laurent Bigonville
5d04579d13 Fix build when SEPOL environment variable is set
Closes: 
2015-12-16 15:40:49 +01:00
Chris PeBenito
a93682f5f7 Bump version for release. 2015-12-15 13:02:06 -05:00
Chris PeBenito
9b28cbe3c7 setup.py: fix apol icons installation. 2015-06-26 14:14:01 -04:00
Chris PeBenito
febc2af594 setup.py: locate libsepol.a
Use distutils' features to find libsepol.a.  Also sensitive to SEPOL env
variable for specifying the full path to libsepol.a.
2015-06-15 10:31:12 -04:00