Commit Graph

383 Commits

Author SHA1 Message Date
Chris PeBenito
0caa0de8a4 ChooseAnalysis: only display implemented analyses as options.
Make it clear for early users of the tool that only some analyses are
implemented in the GUI so far.
2015-06-24 14:24:39 -04:00
Chris PeBenito
80e47d7bf6 TERuleQueryTab: implement invert class/perms functions 2015-06-23 09:59:38 -04:00
Chris PeBenito
7a5850e423 terulequery.ui: fix tab stops 2015-06-17 09:45:40 -04:00
Chris PeBenito
0ebdaa6304 rulemodels: cleanup imports 2015-06-17 08:46:05 -04:00
Chris PeBenito
25168b11ff TERuleQueryTab: the parent is not the tab
The parent is a top-level widget (from the tab's perspective) which has
no parent.
2015-06-17 08:40:35 -04:00
Chris PeBenito
124cdd32df TERuleQueryTab: change result table column to resize only once
Only resize columns to content once, when results are generated.  This will
generally provide a reasonable column width, while still allowing the user
to resize the columns, such as when the permission list is very long.
2015-06-17 08:37:58 -04:00
Chris PeBenito
72530ff531 ApolMainWindow: Implement renamable tabs.
Tab renaming methods:
* double click the tab
* context menu on tab bar

Also:
* change initial tab name to include a number based on the total number
of tabs that have been opened.
* add tool tip to tab of the analysis type.
* add explicit close tab function to ensure analysis widgets are deleted.
2015-06-16 16:02:11 -04:00
Chris PeBenito
be92a0a11e qpol.i: include filename info on policy file opening errors
Changes errors from this:

$ ./seinfo eggs
[Errno 2] No such file or directory

to this:

$ ./seinfo eggs
[Errno 2] No such file or directory: 'eggs'
2015-06-15 15:11:12 -04:00
Chris PeBenito
f3617938a7 Change loading retry to work on Python 2 consistently
In Python 2, ENOENT was an IOError exception.  In Python 3, IOError was
merged into OSError.
2015-06-15 14:14:26 -04:00
Chris PeBenito
0c3b238498 Add patch for using libsepol-2.3.
This is not officially supported.
2015-06-15 10:33:10 -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
Chris PeBenito
c271d94c5d policyrep: explicit str conversion for string parameters for SWIG
Qt always returns unicode text, which causes problems for Python 2.
2015-06-15 09:31:46 -04:00
Chris PeBenito
ccf2646963 TERuleQueryTab: connect ruletype clear and "select all" buttons 2015-06-10 10:57:05 -04:00
Chris PeBenito
0f4b70ded4 TERuleQueryTab: change item list selection behavior to the common behavior. 2015-06-10 10:31:40 -04:00
Chris PeBenito
308ce26872 TERuleQueryTab: switch expanders to use toggled signals
Directly connect expander toggled signal to relevant setVisible slots in
the .ui.
2015-06-10 10:22:24 -04:00
Chris PeBenito
c6eacfc781 TERuleQueryTab: fix QCompleter for default to only complete types.
Attributes are not valid for the default type.
2015-06-09 08:50:40 -04:00
Chris PeBenito
9df420ad70 ApolMainWindow: misc enhancements
1. add icons for opening policy and new analysis
2. add shortcuts for copy, cut, paste
3. add filename to apol main window title
4. fix file chooser bug for selecting a policy.
5. improved handling where new analysis is started w/o open policy
2015-06-08 10:58:12 -04:00
Chris PeBenito
e9c48d6b5b TERuleQueryTab: further layout adjustments
Better make use of expanded criteria box.
2015-06-07 10:54:33 -04:00
Chris PeBenito
13d6531947 TERuleQueryTab: convert radio buttons to checkboxes.
Keep UI consistent.
2015-06-07 10:22:43 -04:00
Chris PeBenito
ce70c48c28 SEToolsWidget: change ui path to use sys.prefix. 2015-06-07 10:02:53 -04:00
Chris PeBenito
911e44d5d8 TERuleQueryTab: remove unnecessary outer widget
Make the scroll area the top level widget for the tab.
2015-06-06 11:36:49 -04:00
Chris PeBenito
d26101d041 Squeeze margins so the tab widgets have more room.
The tabs have deeply nested container widgets, so a lot of room is lost
on margins.
2015-06-05 15:05:18 -04:00
Chris PeBenito
ee6a619113 TERuleQueryTab: move clear button connections into the .ui 2015-06-05 10:51:00 -04:00
Chris PeBenito
b1b721aea1 TERuleQueryTab: connect radio buttons 2015-06-05 10:40:14 -04:00
Chris PeBenito
5476535659 ChooseAnalysis: simplify exception handler on input 2015-06-05 09:00:38 -04:00
Chris PeBenito
c8419393fb TERuleQueryTab: add default type and boolean criteria 2015-06-05 08:59:29 -04:00
Chris PeBenito
765039621e TERuleQueryTab: change tooltip setting on setupUi
Make sure the normal tooltip is consistent after an error.
2015-06-05 08:54:55 -04:00
Chris PeBenito
ff5c2dfde1 TERuleQueryTab: only set column sizing once (on setupUi) 2015-06-04 12:50:55 -04:00
Chris PeBenito
7af8c276cf Create collapsible sections in TERuleQueryTab.
Source icons from Koloria Icon Set,
http://www.graphicrating.com/2012/06/14/koloria-free-icons-set/
2015-06-04 12:46:41 -04:00
Chris PeBenito
b619166ba0 Initial apol commit. 2015-06-03 13:33:11 -04:00
Chris PeBenito
4ce47e4e30 Fix swig commenting. 2015-05-29 13:29:01 -04:00
Chris PeBenito
4bea20b522 Misc docstring cleanups. 2015-05-16 22:01:03 -04:00
Chris PeBenito
e6f59d04e5 Refactor SETools queries/analyses to use descriptors instead of get/setters
This is Pythonic.
2015-05-16 21:59:10 -04:00
Chris PeBenito
ab3772843e Make libselinux bindings optional. 2015-05-10 12:15:16 -04:00
Chris PeBenito
20ee139f3b SELinuxPolicy: add support for finding the policy to load.
Restore legacy CLI tool behavior for not having to specify a policy to load
2015-05-08 15:21:00 -04:00
Chris PeBenito
ff1fb21012 Boolean: change state to a property. 2015-04-30 19:03:28 -04:00
Chris PeBenito
82b021a5a4 Portcon: implement port ranges using a namedtuple
Has the benefit of unifying the object attributes for port range and MLS
range objects, making the PolicyQuery._match_range() function work
naturally for both object types.
2015-04-27 14:15:31 -04:00
Chris PeBenito
da8b151d5c InfoFlowAnalysis: convert output to namedtuples 2015-04-26 10:41:03 -04:00
Chris PeBenito
d23bdd4895 DomainTransitionAnalysis: convert to named tuples for output
Makes output compact and easier to use for callers. Also it is backwards
compatible.
2015-04-26 10:19:42 -04:00
Chris PeBenito
43f7c19114 qpol.i: remove unneeded classes and functions. 2015-04-24 20:47:07 -04:00
Chris PeBenito
1406eb30c3 Implement InitialSIDTest. 2015-04-24 08:56:56 -04:00
Chris PeBenito
6de35b81f7 Implement CommonTest and ObjClassTest.
Also fix bugs uncovered by testing.
2015-04-23 11:04:37 -04:00
Chris PeBenito
7cb5762b4f TypeAttribute: add __contains__ 2015-04-23 09:00:07 -04:00
Chris PeBenito
970a905867 PolCapTest: add lookup test. 2015-04-23 08:53:19 -04:00
Chris PeBenito
df493bbb4a Fix PolCapTest. 2015-04-23 08:38:39 -04:00
Chris PeBenito
ae0e116567 Implement PolCapTest. 2015-04-22 18:01:22 -04:00
Chris PeBenito
f8a2023391 DomainTransitionAnalysis: implement Edge class and descriptors for graph access
Includes policyrep changes to handle the deepcopy needed by NetworkX. The
SWIG objects are treated as immutable, since they are proxies of C pointers
to immutable objects (raw policydb).

Also fixes PolicySymbol.__hash__(), as returning NotImplemented would
raise a TypeError.
2015-04-22 09:55:21 -04:00
Chris PeBenito
43b8fb5214 InfoFlowAnalysis: undo API change. 2015-04-22 08:54:59 -04:00
Chris PeBenito
3aaf8fa25e EdgeAttrIntMax: fix __set__ references. 2015-04-21 10:22:25 -04:00
Chris PeBenito
6904619197 InfoFlowAnalysis: implement Edge class and descriptors for graph access 2015-04-21 09:49:42 -04:00