All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] Help with policy writing
@ 2008-10-26 18:43 Konrad Azzopardi
  2008-10-26 18:58 ` Dominick Grift
  2008-10-29 12:37 ` Daniel J Walsh
  0 siblings, 2 replies; 5+ messages in thread
From: Konrad Azzopardi @ 2008-10-26 18:43 UTC (permalink / raw)
  To: refpolicy

Dear all,

To gain an understanding of SELinux I am trying to write a policy in
Fedora 9 and try to understand as I go along. I need to write a policy
for "samhain" , an integrity checker. I looked for tripwire refpolicy
to get some inspiration. {attached pls find policy files that I wrote}

I ran in permissive mode and although I am getting a lot of errors,
what is worrying me is the first error I am getting {see below}, am I
missing some trivial definition ? samhain is pretty standard, an init
file, a config file, a pid file, and library files.

Thanks


Summary:

SELinux is preventing samhain (samhain_t) "execute_no_trans" to
/usr/local/sbin/samhain (samhain_exec_t).

Detailed Description:

[SELinux is in permissive mode, the operation would have been denied but was
permitted due to permissive mode.]

SELinux denied access requested by samhain. It is not expected that this access
is required by samhain and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

Sometimes labeling problems can cause SELinux denials. You could try to restore
the default system file context for /usr/local/sbin/samhain,

restorecon -v '/usr/local/sbin/samhain'

If this does not work, there is currently no automatic way to allow this access.
Instead, you can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Or you can disable
SELinux protection altogether. Disabling SELinux protection is not recommended.
Please file a bug report (http://bugzilla.redhat.com/bugzilla/enter_bug.cgi)
against this package.

Additional Information:

Source Context                unconfined_u:system_r:samhain_t:s0
Target Context                system_u:object_r:samhain_exec_t:s0
Target Objects                /usr/local/sbin/samhain [ file ]
Source                        samhain
Source Path                   /usr/local/sbin/samhain
Port                          <Unknown>
Host                          MALTA
Source RPM Packages
Target RPM Packages
Policy RPM                    selinux-policy-3.3.1-99.fc9
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   catchall_file
Host Name                     MALTA
Platform                      Linux MALTA 2.6.26.5-45.fc9.i686 #1 SMP Sat Sep 20
                              03:45:00 EDT 2008 i686 i686
Alert Count                   1
First Seen                    Sun 26 Oct 2008 07:19:12 PM CET
Last Seen                     Sun 26 Oct 2008 07:19:12 PM CET
Local ID                      4b802823-267f-4b94-bafc-c8050310203b
Line Numbers

Raw Audit Messages

host=MALTA type=AVC msg=audit(1225045152.583:1290): avc:  denied  {
execute_no_trans } for  pid=7159 comm="samhain"
path="/usr/local/sbin/samhain" dev=dm-0 ino=7552222
scontext=unconfined_u:system_r:samhain_t:s0
tcontext=system_u:object_r:samhain_exec_t:s0 tclass=file

host=MALTA type=SYSCALL msg=audit(1225045152.583:1290): arch=40000003
syscall=11 success=yes exit=0 a0=b8f57000 a1=bfc3cc48 a2=bfc3cfa0
a3=bfc3cd4c items=0 ppid=7158 pid=7159 auid=500 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm="samhain"
exe="/usr/local/sbin/samhain" subj=unconfined_u:system_r:samhain_t:s0
key=(null)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samhain.fc
Type: application/octet-stream
Size: 547 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20081026/c1d65872/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samhain.if
Type: application/octet-stream
Size: 48 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20081026/c1d65872/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samhain.te
Type: application/octet-stream
Size: 1773 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20081026/c1d65872/attachment-0002.obj 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-29 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-26 18:43 [refpolicy] Help with policy writing Konrad Azzopardi
2008-10-26 18:58 ` Dominick Grift
2008-10-27 13:22   ` Brandon Whalen
2008-10-27 15:30     ` Konrad Azzopardi
2008-10-29 12:37 ` Daniel J Walsh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.