From: Miroslav Grepl <mgrepl@redhat.com>
To: "Spector, Aaron" <Aaron_Spector@mcafee.com>
Cc: "SELinux \(selinux@tycho.nsa.gov\)" <selinux@tycho.nsa.gov>
Subject: Re: Switching to enforcing mode introduces new policy issues?
Date: Fri, 24 Apr 2015 14:17:10 +0200 [thread overview]
Message-ID: <553A3446.8010809@redhat.com> (raw)
In-Reply-To: <d15a5dc7a1fc4677b6ea3908b7480c6c@MIVEXUSR1N01.corpzone.internalzone.com>
On 04/24/2015 06:12 AM, Spector, Aaron wrote:
> That sounds like an idea, I'll have to give it a shot. To add a bit more information, I'm seeing a bunch of these changes happen during the boot process in init and I would assume the AVC is cleared between reboots - I've tweaked and added some things there for experimentation. I can boot my system up in permissive and see no problems, but when I restart it in enforcing I start seeing brand new policy violations, things I haven't seen before. It seems odd that the same boot sequence would result in such different behavior.
>
> -Aaron
>
> -----Original Message-----
> From: Paul Moore [mailto:paul@paul-moore.com]
> Sent: Thursday, April 23, 2015 5:20 PM
> To: Spector, Aaron
> Cc: SELinux (selinux@tycho.nsa.gov)
> Subject: Re: Switching to enforcing mode introduces new policy issues?
>
> On Thu, Apr 23, 2015 at 5:14 PM, Spector, Aaron <Aaron_Spector@mcafee.com> wrote:
>> Hi all,
>>
>> I’ve been working on writing my first policy for SELinux and I’ve hit
>> a bit of a snag. I’ve gotten the policy clean in permissive mode, but
>> when I swap the system over to enforcing, a whole new set of policy issues crop up.
>> Everything I’ve read says this isn’t to be expected so I’m a bit
>> confused as to what’s happening.
>
Try to use journalctl/dmesg to search either SELINUX_ERR or AVCs during
boot time.
> {snip}
>
>> So far what I’ve had to do to get around it is to add to my policy,
>> but that doesn’t seem like that should be necessary. If the audit is
>> clean in permissive mode, why isn’t it clean in enforcing?
>>
>> Is it possible that I’m missing policy deny audits when it’s in
>> permissive mode?
>
> It's important to remember that when you are in permissive mode you will only see a given SELinux AVC denial *once*, after that it will not be reported until the AVC is reset. My two favorite ways of resetting the SELinux AVC are to run either 'load_policy' or toggle the system from permissive into enforcing and then back into permissive mode. Try that and I suspect that will solve your problem.
>
> -Paul
>
> --
> paul moore
> www.paul-moore.com
>
> _______________________________________________
> Selinux mailing list
> Selinux@tycho.nsa.gov
> To unsubscribe, send email to Selinux-leave@tycho.nsa.gov.
> To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov.
>
--
Miroslav Grepl
Software Engineering, SELinux Solutions
Red Hat, Inc.
next prev parent reply other threads:[~2015-04-24 12:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 21:14 Switching to enforcing mode introduces new policy issues? Spector, Aaron
2015-04-23 22:19 ` Paul Moore
2015-04-24 4:12 ` Spector, Aaron
2015-04-24 4:53 ` Gaurav Gangwar
2015-04-24 13:47 ` Spector, Aaron
2015-04-24 12:17 ` Miroslav Grepl [this message]
2015-04-24 12:25 ` Stephen Smalley
2015-04-24 15:18 ` Spector, Aaron
2015-04-24 15:27 ` Stephen Smalley
2015-04-24 15:57 ` Spector, Aaron
2015-04-24 16:03 ` Stephen Smalley
2015-04-24 16:05 ` Stephen Smalley
2015-04-24 16:11 ` Stephen Smalley
2015-04-24 16:30 ` Spector, Aaron
2015-04-24 16:33 ` Stephen Smalley
2015-04-24 16:36 ` Stephen Smalley
2015-04-24 20:37 ` Spector, Aaron
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=553A3446.8010809@redhat.com \
--to=mgrepl@redhat.com \
--cc=Aaron_Spector@mcafee.com \
--cc=selinux@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.