Commit Graph

70 Commits

Author SHA1 Message Date
Steve Lawrence
8b4fb2d2de sepolgen: remove unnecessary grammar in interface call param list
The addition of this rule caused interface vectors to be less accurate.
The grammar looks correct without the rule, so remove it.

Reverted hunk from commit 17cc87e56b

Signed-off-by: Steve Lawrence <slawrence@tresys.com>
2014-08-26 07:59:08 -04:00
Stephen Smalley
75fdea94bb Bump version for bug fix to sepolgen-ifgen.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-31 10:13:10 -04:00
Dan Walsh
bbf72baca1 Add back attributes flag to fix exception crash. 2013-10-31 10:11:20 -04:00
Stephen Smalley
7c4bb77999 Version bump for release.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-30 12:45:19 -04:00
Stephen Smalley
8e5d465335 Update ChangeLog files.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-30 12:42:05 -04:00
Dan Walsh
cde05f3b61 Have sepolgen return additional constraint information 2013-10-29 08:49:52 -04:00
Dan Walsh
579236d30a Fix line spacing on audit2allow output 2013-10-29 08:49:52 -04:00
Dan Walsh
4a674abd34 Return the sections of the source and target context that differ
Help the administrator/policy developer to see what parts of the label are different.

For example if you get a constraint violation and the role of the source and target
differ, audit2allow will suggest this might be the problem.
2013-10-29 08:49:52 -04:00
Stephen Smalley
a08010023b Update ChangeLogs and bump VERSIONs to an intermediate value.
2.1.99 is just a placeholder to distinguish it from the prior release.
2.2 will be the released version.  Switching to 2-component versions.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-25 15:14:23 -04:00
Stephen Smalley
56258807ea Revert "Richard Haines patch that allows us discover constraint violation information"
This reverts commit 56b49ab711.

Conflicts:
	libselinux/src/audit2why.c
2013-10-25 13:53:03 -04:00
Stephen Smalley
07e8f316da Fix sepolgen test case.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-25 12:54:04 -04:00
Dan Walsh
8137b9392c Fix test matching to use proper constants 2013-10-24 13:58:38 -04:00
Dan Walsh
17cc87e56b sepolgen did not work with filename transitions.
This patch adds support for it.
2013-10-24 13:58:38 -04:00
Dan Walsh
3223746ba8 fix bug in calls to attributes 2013-10-24 13:58:38 -04:00
Dan Walsh
56b49ab711 Richard Haines patch that allows us discover constraint violation information
Basically we need this information to allow audit2allow/audit2why to better
describe which constraint is being broken.
2013-10-24 13:58:37 -04:00
Eric Paris
e9410c9b06 VERSION BUMP FOR UPSTREAM PUSH 2013-02-05 20:22:02 -05:00
Miroslav Grepl
3dd13f7d08 sepolgen: understand role attributes
Parse and handle role attributes in sepolgen.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-05 20:14:47 -05:00
Laurent Bigonville
7b3a9a30eb sepolgen: Use refpolicy_makefile() instead of hardcoding Makefile path
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-05 20:14:47 -05:00
rhatdan
a2a50eaaec sepolgen: audit.py: Handle times in foreign locals for audit2allow -b
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2013-02-05 20:14:40 -05:00
Eric Paris
8638197342 Version bumps for upstream push 2012-09-13 10:33:58 -04:00
Eric Paris
a8a36f88c2 sepolgen: audit2allow: one role/type pair per line
audit2allow was generating rules which would not compile.  We can only
do one per line, not tons of types at one time.

Signed-off-by: Eric Paris <eparis@redhat.com>
2012-09-12 20:57:24 -04:00
Eric Paris
628bcc69e2 policycoreutils: sepolgen: return and output constraint violation information
update sepolgen to return constraint violation information.  Then output
that information in audit2allow.

Signed-off-by: Eric Paris <eparis@redhat.com>
2012-09-12 15:08:56 -04:00
Dan Walsh
065e5d3149 sepolgen: Allow returning of bastard matches
Return low quality matches as well as high quality matches.  Sometimes
we just want the crap with the sugar.

Signed-off-by: Eric Paris <eparis@redhat.com>
2012-09-12 12:16:19 -04:00
Eric Paris
f05a71b92d Version bumps for upstream push 2012-06-28 14:02:29 -04:00
Dan Walsh
0eed03e756 checkpolicy: sepolgen: We need to support files that have a + in them
Filenames can have a +, so we should be able to parse and handle those
files.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2012-06-28 13:29:24 -04:00
Dan Walsh
0ea11e7315 sepolgen: Make use of setools optional within sepolgen
We still want to be able to use sepolgen even if setools isn't
installed.  Degrade functionality, but still work if it can't be found.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwlash@redhat.com>
2012-06-28 13:29:23 -04:00
Eric Paris
7a86fe1a3d bump version and changelog for upstream push 2012-03-28 15:44:05 -04:00
Manoj Srivastava
98455c5524 sepolgen: fix detection of policy loads
I am running into an issue with sepolgen. Debian ships more
than one version of the refpolicy, a default one, and a MLS enabled
one. So, the include files live in either
/usr/share/selinux/{default,mls}/include sepolgen (in
src/sepolgen/defaults.py) sets refpolicy_devel() to a single
location -- and thus, only one version of the security policy may be
supported. So, sepolgen-ifgen from policycoreutils can only work
with one policy, which may not be the one installed on the target
machine. Could this be made configurable, somehow? As far as I can
see, sepolgen's python library does not offer any way to set the
value. This change fixes that. Now you may set the path to look for
development headers in /etc/selinux/sepolgen.conf, in the variable
SELINUX_DEVEL_PATH. The builtin default will have it work on Debian
and fedora machines out of the box.

Signed-off-by: Laurent Bigonville bigon@debian.org
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2012-03-28 14:52:13 -04:00
Dan Walsh
8f3207eda0 sepolgen: do not use md5 when calculating hash signatures
FIPS does not allow md5 as a valid algorithm.  Although we don't really
care about cryptographic strength since the algorithm isn't allowed to
be used at all use something strong, like sha256.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2012-03-28 14:52:13 -04:00
Dan Walsh
df45dcdf3d sepolgen: audit.py Dont crash if empty data is passed to sepolgen
If you pass output from a log file that does not include any avc's
audit2allow will crash.  This patch fixes this problem.

ausearch -m avc -ts recent | audit2allow

If there was no AVC's recently, we do not want the python to crash.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2012-03-28 14:52:12 -04:00
Dan Walsh
18e3a8d396 checkpolicy: libselinux: Fix dead links to www.nsa.gov/selinux
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2012-03-28 08:39:07 -04:00
Eric Paris
339f8079d7 update VERSION and Changelog for public push 2011-12-21 12:46:04 -05:00
Eric Paris
5c3211bcca sepolgen: better analysis of why things broke
combine analysys of audit2why into audit2allow, so users can see if a
boolean would solve an AVC or if it is a constrain violation.  Rather
then blindly adding allow rules to modules.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-12-21 12:22:05 -05:00
Eric Paris
d65c02f066 bump version and changelog 2011-12-05 16:20:45 -05:00
Dan Walsh
a0af38a531 sepolgen: Allow ~ as a file identifier
We already allow this in policy, so allow it in sepolgen as well.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-12-05 16:10:37 -05:00
Eric Paris
14e4b70b93 Bump Version and Changelog for commit 2011-11-03 15:26:36 -04:00
Dan Walsh
077e863517 sepolgen: Return name field in avc data
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-11-02 16:22:06 -04:00
Dan Walsh
9cbd404ceb sepolgen: Ignore permissive qualifier if found in an interface
During Rawhide releases we change all "unconfined_domains" to
permissive domains in order to find new AVC messages without breaking
rawhide boxes.  The way we do this is changing the unconfined_domain
interface and putting permissive $1; in it.  sepolgen does not like
this and blows up the build.  This patch tells sepolgen to ignore the
permissive in an interface.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-11-02 16:22:06 -04:00
Eric Paris
418dbc70e8 Bump version and changelog for all components. 2011-09-16 15:34:36 -04:00
Guido Trentalancia
eb695e5a56 whole tree: default make target to all not install
Change the default "make" target for the libraries from "install" to
"all" in the makefiles.

Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-09-16 11:54:04 -04:00
Dan Walsh
b1331909a0 policycoreutils: sepolgen: audit2allow is mistakakenly not allowing valid module names
module names must begin with a letter, optionally followed by letters,
numbers, "-", "_", "."\n'  some of these were being denied.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2011-09-16 11:54:03 -04:00
Dan Walsh
ab1195dcfe sepolgen: look for booleans that might solve problems
This patch allows audit2allow to do analysis on the AVC's to see if a
boolean would have solved the problem or if the AVC is caused by a
constraint.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-09-16 11:54:00 -04:00
Dan Walsh
eecf746aa8 sepolgen: Change perm-map and add open to try to get better results on matches
This patch adds open to sepolgen checks and resets the priorities to
get better matches on AVCs

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-09-16 11:54:00 -04:00
Dan Walsh
037285e936 sepolgen: src: sepolgen: add attribute storing infrastructure
add attribute handling to sepolgen so it can take into account the attributes
within an interface

Signed-off-by: Eric Paris <eparis@redhat.com>
2011-09-15 19:19:58 -04:00
Eric Paris
1f8cf403be update changelog and versions for 2011-08-26 2011-08-26 15:11:58 -04:00
Eric Paris
3f1446944e sepolgen: refparser: include open among valid permissions
The perser doesn't recognize 'open'.  Make it so.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-08-26 14:46:02 -04:00
Eric Paris
de311acdc9 sepolgen: refparser: add support for filename_trans rules
The parser cannot handle the new format of filename_trans rules.  Nor
can it handle the " now used.  Add support for both.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-08-26 14:44:33 -04:00
Steve Lawrence
44121f6624 Minor version bump for release
Bump checkpolicy to 2.1.0
Bump libselinux to 2.1.0
Bump libsepol to 2.1.0
Bump libsemanage to 2.1.0
Bump policycoreutils to 2.1.0
Bump sepolgen to 1.1.0
2011-07-27 15:32:54 -04:00
Joshua Brindle
4bbaeeb7bb bump sepolgen to 1.0.23 2010-03-24 13:47:39 -04:00
Daniel J Walsh
6e35202e20 sepolgen unit tests fail
Patch to fix unit test.

Signed-off-by: Joshua Brindle <method@manicmethod.com>
2010-03-24 13:43:53 -04:00