All of lore.kernel.org
 help / color / mirror / Atom feed
From: mgrepl@redhat.com (Miroslav Grepl)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] services_nut.patch
Date: Mon, 23 Nov 2009 14:05:59 +0100	[thread overview]
Message-ID: <4B0A88B7.1050903@redhat.com> (raw)
In-Reply-To: <1258901980.2423.16.camel@localhost>

On 11/22/2009 03:59 PM, Stefan Schulze Frielinghaus wrote:
> On Mon, 2009-11-16 at 13:32 -0500, Daniel J Walsh wrote:
>    
>> On 11/16/2009 09:31 AM, Stefan Schulze Frielinghaus wrote:
>>      
>>> On Thu, 2009-11-12 at 16:46 -0500, Daniel J Walsh wrote:
>>>        
>>>> http://people.fedoraproject.org/~dwalsh/SELinux/F12/services_nut.patch
>>>>
>>>> nut policy.
>>>>          
>>> Some time ago I wrote a policy for NUT too (s. attachment). I guess you
>>> tested your policy with a UPS connected via USB. Maybe we could merge
>>> both policies because I tested my with the SNMP module of NUT.
>>>
>>> One note about your policy. Shouldn't we prefix all domains with "nut_"?
>>> This would indicate that e.g. each executable comes from the NUT
>>> project. Then we could also define one type for /var/run/nut (in my
>>> policy it is just nut_var_run_t) because the three main domains
>>> nut_upsd_t, nut_upsdrvctl_t and nut_upsmon_t write to the same location,
>>> share e.g. a socket file.
>>>
>>> I would also like to introduce a type for config files because clear
>>> text passwords are saved in there.
>>>
>>> Your domain upsmon_t needs also to write to all terms because it
>>> announces information via "wall". It also seems to miss the following
>>> permissions which are needed if upsmon_t should execute /sbin/shutdown
>>> (we still do not have a shutdown policy):
>>>
>>> files_rw_generic_pids(nut_upsmon_t)
>>> init_exec(nut_upsmon_t)
>>> init_rw_initctl(nut_upsmon_t)
>>> init_write_utmp(nut_upsmon_t)
>>>
>>> What are your thoughts?
>>> It tested my policy on CentOS 5.3 with a couple of dozen
>>> restarts/shutdowns. Debugging restarts/shutdowns is hell ;-)
>>>
>>> cheers,
>>> Stefan
>>>        
>> Actually I believe Miroslav wrote this policy so I will forward this to hem and you and he can work on consolidating the policies.
>>
>> I agree with your points and your naming is fine.
>>      
> Hi Miroslav,
>
> attached is the merged policy.
Hi Stefan,


>   Just a few questions left. In your
> original policy you had the following rule
>
> corenet_tcp_connect_ups_port(upsmon_t)
>
> I can't find any such port definition in refpolicy.
>
>    
+network_port(ups, tcp,3493,s0)

This is missing in the original patch.

> Another question, what is the intention of the following
>
> permissive upsd_t;
> permissive upsdrvctl_t;
> permissive upsmon_t;
>
> Does that make the domain permissive by default?
Yes, it does. We add new domains to permissive so we can fix all the avc's without blocking of functionality apps.

> I'm unsure about these
> ones.
>
> cheers,
> Stefan
>    
Regards,

Miroslav

  reply	other threads:[~2009-11-23 13:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 21:46 [refpolicy] services_nut.patch Daniel J Walsh
2009-11-16 14:31 ` Stefan Schulze Frielinghaus
2009-11-16 18:32   ` Daniel J Walsh
2009-11-22 14:59     ` Stefan Schulze Frielinghaus
2009-11-23 13:05       ` Miroslav Grepl [this message]
2009-11-23 14:36         ` Stefan Schulze Frielinghaus
2009-11-23 15:19           ` Christopher J. PeBenito
2009-11-23 16:04             ` Stefan Schulze Frielinghaus
2009-11-23 16:09               ` Stefan Schulze Frielinghaus
2009-11-23 17:17                 ` Miroslav Grepl
2009-12-18 13:53                   ` Christopher J. PeBenito
2009-12-21 10:14                     ` Stefan Schulze Frielinghaus
2009-12-25 12:55                       ` Stefan Schulze Frielinghaus
2010-01-29 16:20                         ` Miroslav Grepl
2010-02-09 13:47                         ` Christopher J. PeBenito
  -- strict thread matches above, loose matches on Subject: below --
2010-02-23 20:28 Daniel J Walsh
2010-02-24 15:53 ` Stefan Schulze Frielinghaus
2010-02-24 17:14   ` Daniel J Walsh
2010-02-26  9:00     ` Stefan Schulze Frielinghaus
2010-02-26 13:39       ` Daniel J Walsh
2010-02-26 14:23         ` Stefan Schulze Frielinghaus
2010-08-26 22:02 Daniel J Walsh
2010-09-15 13:16 ` Christopher J. PeBenito

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=4B0A88B7.1050903@redhat.com \
    --to=mgrepl@redhat.com \
    --cc=refpolicy@oss.tresys.com \
    /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.