Bug 196748 - Review Request: setroubleshoot - automatic diagnosis of SELinux problems
Summary: Review Request: setroubleshoot - automatic diagnosis of SELinux problems
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FC-ACCEPT
TreeView+ depends on / blocked
 
Reported: 2006-06-26 21:13 UTC by John Dennis
Modified: 2013-01-10 01:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-22 12:16:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
trival log file with ftpd AVC message to use for testing (220 bytes, text/plain)
2006-07-06 20:10 UTC, John Dennis
no flags Details
Cosmetic fix for setroubleshoot usage statement (348 bytes, patch)
2006-07-15 20:10 UTC, Paul W. Frields
no flags Details | Diff

Description John Dennis 2006-06-26 21:13:51 UTC
Spec URL: ftp://people.redhat.com/jdennis/setroubleshoot.spec
SRPM URL: ftp://people.redhat.com/jdennis/setroubleshoot-0.2-1.src.rpm

Description:
Provides tools to help diagnose SELinux problems. When AVC messages
are generated an alert can be generated that will give information
about the problem and help track its resolution. Alerts can be configured
to user preference. The same tools can be run on existing log files.

Comment 1 Dave Malcolm 2006-06-26 21:35:31 UTC
Should the package own these:
/var/log/setroubleshoot/
/var/log/setroubleshoot/setroubleshoot.log

c.f.:
sudo /sbin/service setroubleshoot start
Starting setroubleshootd: Traceback (most recent call last):
  File "/usr/sbin/setroubleshootd", line 20, in ?
    from setroubleshoot.config import cfg
  File "/usr/lib/python2.4/site-packages/setroubleshoot/__init__.py", line 23, in ?
    LogInit()
  File "/usr/lib/python2.4/site-packages/setroubleshoot/log.py", line 39, in LogInit
    filemode='a')
  File "/usr/lib/python2.4/logging/__init__.py", line 1218, in basicConfig
    hdlr = FileHandler(filename, mode)
  File "/usr/lib/python2.4/logging/__init__.py", line 757, in __init__
    stream = open(filename, mode)
IOError: [Errno 2] No such file or directory:
'/var/log/setroubleshoot/setroubleshoot.log'
                                                           [FAILED]


Comment 2 John Dennis 2006-06-27 04:03:51 UTC
opps, you're right David the log directory was missing from the %files section,
as was a logrotate script. I added both, new version is now setroubleshoot-0.3-1
in the same ftp area. Thank you.

Comment 3 Jesse Keating 2006-06-28 20:41:09 UTC
SHOULDFIX:
- There is no URL to upstream source, so it would be difficult to verify source
checksum.

Everything else is clean.  This passes package review.

Bill, care to ack/nack?

John, if we bring this into core, how would it get installed on people's system?
 Would it go into a Comps group?  Would it be a dep of something else?

Comment 4 John Dennis 2006-06-30 19:47:34 UTC
How does one provide a source URL when the source is in our internal "elvis" CVS
repository?

I imagine it would be part of a comps group. There is nothing else dependent on it.

Comment 5 Bill Nottingham 2006-06-30 20:22:19 UTC
Hm, I can't seem to get it to do anything useful. The daemon starts, but that's
about it.

Comment 6 John Dennis 2006-07-06 19:36:16 UTC
I realize the package needs documentation but let me explain what Bill probably
experienced. There are two basic modes the analyzer can run it, either running
in the background waiting to be triggered by an real time AVC, or run against a
log file which might contain AVC messages.

In the former case, AVC real time event mode, the trigger is fired by auditd, it
invokes the analyzer because /etc/auditd.conf has its dispatcher line set to
/usr/sbin/avc_snap (BTW, that name is going to change), avc_snap talks to the
troubleshooter daemon setroubleshootd. However, the rpm in its current form does
not edit auditd.conf or manage the auditd service, all for a variety of good
packaging practices. Thus you may not have seen anything if auditd was not
running or it's dispatcher was not set to avc_snap. Steve Grubb and I are
working on fixing this issue this week. The plan is to have auditd find plugin
configuration files in /etc/audisp.d. When that functionality is present
(expected next week) then setroubleshoot will install a configuration file
there. (BTW, I did just notice the spec file was missing a requires for "audit",
that has been fixed).

The second mode, log file scanning, can be done via

% /usr/sbin/setroubleshoot filename

Just be aware the version you have does not throttle multiple alerts and may
fire off a bunch of them in succession, throttling code will be checked in tommorow.

Comment 7 John Dennis 2006-07-06 19:39:14 UTC
I spoke with Pete Graner today because we're trying to get this into RHEL5, but
that has a dependency on this being in FC6t2 (as I understand it). FC6t2 freeze
is 7/12, can we get this approved so that its in the pipeline?

Comment 8 Bill Nottingham 2006-07-06 19:41:14 UTC
OK, I installed auditd and started it, and still didn't get any pop-ups or
similar; setroubleshoot /var/log/messages also gave no output. Does it only
handle certain AVCs?

Comment 9 John Dennis 2006-07-06 20:08:21 UTC
There are two pieces to the package, the framework, and a set of analysis
plugins.  It is the analysis plugin's job to recognise an AVC. So far most of
the work has gone into the framework, not the set of plugins, and the current
rpm only has two analysis plugins. The plugin's are meant to be simple to
author, and on the TODO list is simplyfying them even further.

I'm attaching a trival log file you can test with that has an AVC which would be
generated by ftpd, one of the existing plugins.

I suppose I should mention as well that we would like to distribute the plugin's
separately and I'll probably tweak the spec file to make the plugin's a sub package.

Comment 10 John Dennis 2006-07-06 20:10:02 UTC
Created attachment 132021 [details]
trival log file with ftpd AVC message to use for testing

Comment 11 John Dennis 2006-07-14 13:56:37 UTC
ping, is this in for FC6t2? I haven't heard anything explicit and the freeze
date is approaching, just checking.

Comment 12 Paul W. Frields 2006-07-15 20:10:11 UTC
Created attachment 132498 [details]
Cosmetic fix for setroubleshoot usage statement

Trivial and cosmetic, but I'm just starting to learn Python.

Comment 13 Jesse Keating 2006-07-17 19:24:26 UTC
Bill, do we have an Ack?

John, where should this go in comps?  or should it be made a dep of selinux
userland stuff?

Comment 14 Bill Nottingham 2006-07-17 19:43:08 UTC
Yeah. When I ran it it seemed somewhat overloaded with jargon, but that can be
fixed.

Comment 15 Jesse Keating 2006-07-17 19:50:29 UTC
added to dist-fc6, jdennis is owner.  Still not sure where to put it in Comps.

Comment 16 Jesse Keating 2006-07-18 17:08:26 UTC
Please close this when the package is built into rawhide.

Comment 17 Rahul Sundaram 2006-07-22 12:16:40 UTC
Package is in rawhide now. closing


Note You need to log in before you can comment on or make changes to this bug.