Chris PeBenito
26e0396290
Implement User unit tests.
2015-04-10 14:53:07 -04:00
Chris PeBenito
52d119c58f
Fix qpol compile error.
2015-04-09 14:39:11 -04:00
Chris PeBenito
4e0b7d853b
Thoroughly test MLS representations.
...
Implement category and level decl. lookups along the way.
2015-04-09 14:27:51 -04:00
Chris PeBenito
71e99abbcf
sedta: add limit for transition output
2015-04-07 14:43:17 -04:00
Chris PeBenito
8cfa23109c
Revise README tool and library descriptions
2015-04-07 14:41:55 -04:00
Chris PeBenito
448b8ebeae
PermissionMapTest: add additional unit tests for error cases
...
Fix the exposed bugs in PermissionMap. Add an exception for parse errors
in the permission map file parser, as SyntaxError is not the correct
exception.
2015-04-07 14:40:04 -04:00
Chris PeBenito
f817fe2c56
Fix tox lint target on CI.
2015-04-06 10:58:42 -04:00
Chris PeBenito
ffd32d38f8
Add lint to CI. Step back to single coverage test, on Python 3.3.
...
I decided kamino's original single-coverage tox.ini was better.
2015-04-06 10:07:22 -04:00
Chris PeBenito
f3ca479a27
Address remaining pylint errors.
...
Also implement some suggested changes.
2015-04-06 09:51:32 -04:00
Chris PeBenito
695081fcc0
Add pylint configuration.
2015-04-06 09:38:58 -04:00
Chris PeBenito
0397706313
PermissionMapTest: implement helper function for verifying map contents
2015-04-03 15:07:04 -04:00
Chris PeBenito
816fc94e3b
MLSRuleQueryTest: PEP8 fix
2015-04-03 14:59:07 -04:00
Chris PeBenito
cfbedfb9f3
tests: implement ValidateRule mixin
...
Simplifies testing and uncovered a couple minor bugs in unit tests.
2015-04-03 14:48:25 -04:00
Chris PeBenito
9d51dcc7e3
Misc cleanups suggested by pylint
...
* unnecessary parentheses on return
* variable shadowing
* unused variables
* classmethod variable naming
2015-04-02 14:50:21 -04:00
Chris PeBenito
94376a145f
Remove unused imports.
...
Uncovered with pylint.
2015-04-02 10:58:26 -04:00
Chris PeBenito
d15a015bfa
Fix missed exception changes.
2015-04-02 10:36:22 -04:00
Chris PeBenito
0745f8011c
SELinuxPolicyTest: clean up temp binary policy in case of setUpClass error
...
This should never be hit since the source policy already was complied
by checkpolicy.
2015-04-01 13:26:48 -04:00
Chris PeBenito
c146f0ab47
Restructure exceptions across the entire project.
...
Group all exception classes into a module for each package. This is the
first step towards having all exceptions raised by setools libs be a child of
SEToolsException.
2015-04-01 12:10:45 -04:00
Chris PeBenito
4ced886c24
Add KNOWN-BUGS.
2015-04-01 09:21:40 -04:00
Chris PeBenito
a659c87b50
seinfoflow: remove redundant try block
2015-03-31 15:49:08 -04:00
Chris PeBenito
f24a8237ab
Further README revision and formatting.
2015-03-31 10:41:20 -04:00
Chris PeBenito
d6ea1014a0
Convert README to github markdown.
2015-03-31 10:40:59 -04:00
Chris PeBenito
c6a280e79a
Add more info for libsepol patch.
...
List known test failures seen without this patch.
2015-03-31 09:31:56 -04:00
Chris PeBenito
bb1734e9e5
RangeFactoryTest: add test for high end of range being invalid
2015-03-29 09:40:15 -04:00
Chris PeBenito
e849bf26a9
Infoflow: move internal functions
...
Also rename step generator function.
2015-03-28 19:25:53 -04:00
Chris PeBenito
ba461e3fef
DTA: move internal functions
2015-03-28 19:22:11 -04:00
Chris PeBenito
4f73368b7e
DTA/InfoFlow: add unit tests for analysis functions
...
The purpose is not to verify graph algorithm correctness. The purpose is to
verify everything is yielded correctly.
2015-03-28 11:50:44 -04:00
Chris PeBenito
a64d20c36d
InfoFlowAnalysis: add option for incoming infoflows
2015-03-28 11:42:00 -04:00
Chris PeBenito
708ccbbecd
DTA: revise generators
...
* Pull the edge attribute data once and pass it along to minimize risk of
errors accessing edge data.
* Rename generators to be clear that they are generators
* __generate_entrypoints(): Each ruletype is populated; if there are no
rules, then there is still an empty list. No need for extra checking.
* Clarify some docs
2015-03-28 11:38:23 -04:00
Chris PeBenito
3e6a509ecb
NodeconQueryTest: fix typo in messages
2015-03-27 13:22:12 -04:00
Chris PeBenito
2ea074e563
InfoFlowAnalysisTest: improve efficiency
...
The main graph is never rebuilt since the perm map never changes. This
mirrors how a user might interact. If in the future perm map changes
are introduced, the code should still cope.
Also one minor efficiency tweak in InfoFlowAnalysis. Don't bother removing
edges due to weight if it is set to 1 since that includes everything.
2015-03-27 12:30:43 -04:00
Chris PeBenito
c9c995e7f3
NodeconQueryTest: Change IP criteria to skip on Python < 3.3
2015-03-27 09:38:00 -04:00
Chris PeBenito
c6f11ca80e
DTA: add error testing on the interface.
2015-03-27 09:15:15 -04:00
Chris PeBenito
758865e3a9
InfoFlow tests: fix disconnected node tests
...
The no_flow type wasn't ever in the graph.
2015-03-27 09:07:48 -04:00
Chris PeBenito
84217f0d73
DTA/InfoFlow: change exclude to handle None
...
This is a little clearer than having an empty list, from the caller side.
2015-03-27 09:06:16 -04:00
Chris PeBenito
ec9de08ac6
InfoFlowAnalysis: Add interface error tests.
...
Unconvered 2 minor NetworkX error path bugs:
networkx/networkx#1430
networkx/networkx#1433
2015-03-26 14:48:29 -04:00
Chris PeBenito
87d89c6dd1
symbol: change InvalidSymbol to inherit ValueError.
2015-03-26 11:10:18 -04:00
Chris PeBenito
cb18f4c21f
InfoFlowAnalysis: change set_perm_map() to only take map objects.
...
Remove this handling from the analysis code. It now expects a permission
map to be passed in, and won't handle a string.
2015-03-26 11:05:19 -04:00
Chris PeBenito
c224995eeb
Fully configure logging in CLI tools.
2015-03-25 13:40:03 -04:00
Chris PeBenito
0fc61b0a54
Add initial sid lookup functions.
2015-03-25 13:25:07 -04:00
Chris PeBenito
7b1f462567
SELinuxPolicy: add functions for validating rule types.
2015-03-24 16:12:18 -04:00
Chris PeBenito
f274677c28
DTA/Infoflow: fix catching of NetworkX no path exception.
...
Since the functions are generators, the exception isn't hit until the
generator is iterated.
2015-03-23 14:46:50 -04:00
Chris PeBenito
64cda06216
DTA/Infoflow: additional logging.
2015-03-23 14:42:55 -04:00
Chris PeBenito
286adab308
qpol.i: add missing out-of-memory check for qpol_log_callback()
2015-03-22 14:34:21 -04:00
Chris PeBenito
402c6d1c6f
seinfo: add useful expanded info for attributes
2015-03-22 11:46:44 -04:00
Chris PeBenito
11fdaa7ad6
Route libqpol meessages through Python logging.
...
Does not include errors from the lex/yacc.
2015-03-21 16:23:59 -04:00
Chris PeBenito
f2d334c691
LevelFactoryTest: add extra test for category range parse error.
...
Such as: s0:c0.c2.c4
2015-03-20 12:03:09 -04:00
Chris PeBenito
a4ab5b64d5
Implement logging in all Queries.
2015-03-20 12:02:13 -04:00
Chris PeBenito
3d1c8af0c1
Remove rule type combination parser error.
...
It is possible to have a match across all three types of rules:
* same target type for (type|role|range)_transition
* regex, e.g. sysadm_(r|t)
2015-03-20 11:54:08 -04:00
Chris PeBenito
b7ae7520a7
Add --common option to seinfo for CommonQuery.
2015-03-20 11:50:25 -04:00