Commit Graph

674 Commits

Author SHA1 Message Date
Chris PeBenito
982b3f893d Minor revisions to Xen code.
* Remove unnecessary namedtuple classes
* Simplify __str__ functions on XenContext subclasses
* Rename mem_addr to addr in Iomemcon and IomemconQuery
* Minor logging tweaks in Xen queries
* Remove type checking in DevicetreeconQuery
2016-03-25 11:01:33 -04:00
Chris PeBenito
bda9803773 Update Travis-CI build to use the 2.5 userspace release. 2016-03-22 12:28:15 -04:00
Chris PeBenito
21c594de70 Update README for new libsepol dependence.
Related to #73.
2016-03-22 11:14:25 -04:00
Chris PeBenito
c3a9d45e33 Update sesearch for TERuleQuery extended permission changes.
The -A option will now search allowxperm rules in addition to allow rules.

Related to #73.
2016-03-22 11:12:23 -04:00
Chris PeBenito
a9cd2248e9 Complete TERuleQuery changes for extended permission rules.
Related to #73.
2016-03-22 11:07:25 -04:00
Chris PeBenito
c56e01bc8c Complete policy representation classes for extended permissions rules.
Related to #73.
2016-03-22 10:26:43 -04:00
Chris PeBenito
5fec77088a seinfo: move Xen options to a separate option grouping 2016-03-21 10:58:05 -04:00
Chris PeBenito
56965ae9b3 Fix PEP8 and lint issues in Xen code. 2016-03-21 10:58:05 -04:00
Chris PeBenito
8dcb6eccc7 Update Xen queries for logging initialization change.
Apply changes from c017bd7.
2016-03-21 10:57:21 -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
3532ed2fff setools-V4: Add updates for testing V30 xen and xperms
Add updates to seinfo and sesearch to test libqpol updates
added via [1].

Also include extra tests for Xen and xperms. Note, xperms
cannot yet test the extended perms as needs more work on
libqpol.

[1] 0001-setools-V4-libqpol-policy-V30-updates-xen-xperm-stat.patch

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2016-03-21 10:56:37 -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
faeccd0360 libqpol: stop processing types when building type attribute map
Fix originally from Richard Haines.
2016-03-21 10:56:37 -04:00
Chris PeBenito
60ac053ce3 PortconQuery: move protocol type checking into PortconProtocol.
Also import useful policyrep classes in its __init__.py
2016-03-21 10:55:13 -04:00
Chris PeBenito
99ea9b6c02 seinfo: add missing source/target indirect options to MLS rule query.
Closes #111
2016-03-16 14:12:37 -04:00
Chris PeBenito
bb5cffd44e Extend indirect handling for rule queries.
Range_transitions are expanded in the qpol representation, but attributes
can still be used as criteria.

Hard code default role to indirect to handle role attributes in the
criteria.  Role attributes don't survive in the qpol
representation yet, so this is a forward-looking change.

Similarly hard code the default type matching to indirect so attributes can
be used for default type criteria in type_* rules.  Adjust default criteria
lookup function accordingly.

Related to #111
2016-03-16 14:06:49 -04:00
Chris PeBenito
5063edd111 Role/UserModel: revise strings. 2016-03-16 09:06:54 -04:00
Chris PeBenito
fbee99a747 Implement TypeQueryTab.
Closes #51
2016-03-16 08:47:55 -04:00
Chris PeBenito
ac4f84693b Implement indirection in queries for criteria that is an attribute.
Related to #111.
2016-03-16 08:20:11 -04:00
Chris PeBenito
425e4f735b setoolsgui: remove exceptions from models
Occasionally Qt calls these methods with column -1 and this exception
otherwise goes unhandled.  The default None return from Python functions
should be sufficient.
2016-03-15 10:41:40 -04:00
Chris PeBenito
fcabb2f0e6 Move generic GUI classes up to the setoolsgui package. 2016-03-14 15:25:07 -04:00
Chris PeBenito
8e5b4bc604 Implement RoleQueryTab
Closes #87
2016-03-14 12:38:30 -04:00
Chris PeBenito
15b2c275e0 user_detail: sort role list and add count. 2016-03-14 12:38:30 -04:00
Chris PeBenito
4c0162ffba DetailsPopup: move text box to the top prior to show(). 2016-03-14 12:38:30 -04:00
Chris PeBenito
a7232507a8 Rename UserList to GetDetailsListView for reuse. 2016-03-14 12:38:19 -04:00
Chris PeBenito
c697009f24 (DomainTransition|InfoFlow)AnalysisTab: add busy indicator when GUI could be unresponsive
Bring in line with other tabs.
2016-03-14 09:33:45 -04:00
Chris PeBenito
56b436fde6 ChooseAnalysis: show MLS-only tabs on MLS policies only. 2016-03-11 09:57:27 -05:00
Chris PeBenito
46808c9d7a qpol.i: remove unused labels 2016-03-11 09:46:54 -05:00
Chris PeBenito
b092e94903 CommonTest/ObjClassTest: fix deprecated assertEquals usage
There still is assertRegexpMatches usage, which is deprecated in Python
3.2+, but the replacement, assertRegex, does not exist in Python 2.7.
2016-03-11 09:23:18 -05:00
Chris PeBenito
00807f846d TERuleListModel: Add conditional block column. 2016-03-11 09:16:59 -05:00
Chris PeBenito
fcfba569cc qpol.i: throw exceptions when getting the conditional block on unconditional rules
Standardize on AttributeError for the exception type.
2016-03-11 09:14:32 -05:00
Chris PeBenito
3434618aef LogHandlerToSignal: set default formatter and INFO level in __init__. 2016-03-11 09:00:20 -05:00
Chris PeBenito
6c2acc3fdd Rename LogToSignalHandler to LogHandlerToSignal. 2016-03-07 13:40:37 -05:00
Chris PeBenito
faaf1a5b64 LogToSignalHandler: rename local emit() variable to prevent confusion 2016-03-07 13:25:44 -05:00
Chris PeBenito
d268e7e7f7 apol: more logging for the status bar 2016-03-07 13:21:36 -05:00
Chris PeBenito
3f4630c6f9 apol: use INFO logs to update status displays
Connect all setools and setoolsgui INFO+ messages and display them on
the statusbar.

Use each tab's analysis/query INFO+ messages and display them on the
"busy" status dialog box.
2016-03-07 12:04:08 -05:00
Chris PeBenito
85caea05e3 setoolsgui: add missing LogToSignalHandler class 2016-03-05 11:34:41 -05:00
Chris PeBenito
99c257f936 DTA/InfoflowTab: set errors for empty source/target types 2016-03-05 11:04:05 -05:00
Chris PeBenito
c3425b3656 Improve analysis INFO level logging.
Make it more informative for GUI use.
2016-03-04 14:29:33 -05:00
Chris PeBenito
6a4cbf20d5 apol: log INFO messages to the status bar
Still keep the CLI messaging controlled by -v or --debug switches. For some
reason, the root logging had to be DEBUG for this to work, and
only as initialized by basicConfig.  Setting a NullHandler to DEBUG level
didn't work either.
2016-03-04 14:05:20 -05:00
Chris PeBenito
7d88a1424e cli: switch to logging.exception for debug reporting of unrecoverable exception. 2016-03-04 13:59:21 -05:00
Chris PeBenito
c017bd7cfa Apply logging best practices.
* Use __name__ for the logger name
* Add top-level library NullHandlers
2016-03-04 13:49:03 -05:00
Chris PeBenito
d7e8cf0701 apol: connect copy/paste menu options 2016-03-02 08:19:07 -05:00
Chris PeBenito
5cfab15fd7 apol: Add ctrl+w keyboard shortcut to close the current tab.
Also move the action definitions to apol.ui.
2016-03-01 13:41:29 -05:00
Chris PeBenito
ef9f315aa0 apol: fix class names in .ui 2016-03-01 11:39:41 -05:00
Chris PeBenito
41579ede04 apol: revise sizing policies so results vertically stretch more than other frames (e.g. notes) 2016-03-01 10:17:50 -05:00
Chris PeBenito
7e8fcba695 apol: switch tabs to (more discoverable) check boxes for hiding UI elements
Also drop the results expander.
2016-02-29 10:51:24 -05:00
Chris PeBenito
6976964290 Add patch for explicitly using Python 3 2016-02-26 09:33:52 -05:00
Chris PeBenito
89a96a422a Change #! to use standard Python form 2016-02-26 09:12:34 -05:00
Chris PeBenito
c3759ec164 UserQuery: add missing user name field. 2016-02-26 09:05:43 -05:00