From: Alice Mynona <alice_mynona@bian-fu.net>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux@tycho.nsa.gov, Daniel J Walsh <dwalsh@redhat.com>,
Karl MacMillan <kmacmillan@tresys.com>
Subject: Re: Developing a SELinux policy for antivirus - Activating a boolean variable when another has been actived
Date: Fri, 25 Jun 2010 12:11:01 +0200 [thread overview]
Message-ID: <4C2480B5.7040602@bian-fu.net> (raw)
In-Reply-To: <1277400829.25186.54.camel@moss-pluto.epoch.ncsc.mil>
Stephen Smalley schrieb am 24.06.2010 19:33 Uhr:
> On Thu, 2010-06-24 at 13:12 -0400, Stephen Smalley wrote:
>> On Thu, 2010-06-24 at 17:01 +0200, Alice Mynona wrote:
>>> Hello,
>>>
>>> during the developing of a SELinux module I got the following error messages when executing "audit2allow -a -l"
>>>
>>> ...
>>> libsepol.context_from_record: type antivirus_t is not defined
>>> libsepol.context_from_record: could not create context structure
>>> libsepol.context_from_string: could not create context structure
>>> libsepol.sepol_context_to_sid: could not convert unconfined_u:unconfined_r:antivirus_t:s0 to sid
>>>
>>> "antivirus_t" is a domain I have defined in my module:
>>>
>>> type antivirus_t;
>>> domain_type(antivirus_t)
>>>
>>> I have already removed the module (semodule -r antivirus.pp && semodule -R) and did a file context repair afterwards (fixfiles restore). The error still exists.
>>>
>>> I have reinstalled the policy (yum reinstall selinux-policy-*), but the problem remains. I have also taken a look at "file_contexts" (cd /etc/selinux/targeted/modules/active && grep antivirus_t file_contexts*), but there's no "antivirus_t" anymore.
>>>
>>> Can you help me to find the cause of the problem? I don't know how to debug libsepol-messages.
>>>
>>> I'm using "selinux-policy-targeted-3.6.32-118.fc12.noarch".
>>
>> Sounds like the -l option to audit2allow isn't working correctly, so
>> that instead of only processing audit messages since the last policy
>> reload, you are still processing the audit messages from when that
>> policy module was installed, and unsurprisingly it cannot map those
>> contexts since you removed the module. That would be a bug in
>> audit2allow/sepolgen.
>>
>> Workaround would be to use ausearch to select the desired range of
>> messsages specifically, e.g.
>> /sbin/ausearch -m AVC -ts today | audit2allow
>
I did a reload today at 08:36:00 a.m. (semodule -R). Round about two and half hours later I checked the auditlog:
ausearch -m AVC --start 25.06.2010 08:36:00 --end 25.06.2010 11:00:00
Only messages from ssh_t (success=yes). Fine. But "audit2allow -a -l" still throws error messages:
...
libsepol.context_from_record: type antivirus_t is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert unconfined_u:unconfined_r:antivirus_t:s0 to sid
...
> Dan - looks like you pushed the audit2why analyze calls down into
> sepolgen while it is parsing the messages. But this means that all
> messages will be analyzed even if the user specified -l.
>
I will wait for Dan's answer :-).
Problem solved. @All: Thanks for your help.
Best regards,
Alice
p.s.:
I still don't know how to debug sepol-messages. Can you give me a hint?
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2010-06-25 10:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 15:01 Developing a SELinux policy for antivirus - Activating a boolean variable when another has been actived Alice Mynona
2010-06-24 15:35 ` Xavier Toth
2010-06-24 17:12 ` Alice Mynona
2010-06-24 16:14 ` Dominick Grift
2010-06-24 17:05 ` Alice Mynona
2010-06-24 17:12 ` Stephen Smalley
2010-06-24 17:33 ` Stephen Smalley
2010-06-25 10:11 ` Alice Mynona [this message]
2010-06-25 10:30 ` Dominick Grift
2010-06-25 20:18 ` Daniel J Walsh
2010-06-25 20:23 ` Stephen Smalley
2010-06-25 20:25 ` Stephen Smalley
2010-06-25 20:47 ` Daniel J Walsh
2010-06-25 21:04 ` Stephen Smalley
-- strict thread matches above, loose matches on Subject: below --
2010-06-21 13:58 Alice Mynona
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2480B5.7040602@bian-fu.net \
--to=alice_mynona@bian-fu.net \
--cc=SELinux@tycho.nsa.gov \
--cc=dwalsh@redhat.com \
--cc=kmacmillan@tresys.com \
--cc=sds@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.