All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Caleb Case <calebcase@gmail.com>
Cc: "Christopher J. PeBenito" <cpebenito@tresys.com>,
	Dominick Grift <domg472@gmail.com>,
	russell@coker.com.au, SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: squid and apache
Date: Wed, 03 Mar 2010 11:36:54 -0500	[thread overview]
Message-ID: <4B8E9026.5040709@redhat.com> (raw)
In-Reply-To: <150846cc1003030824q73cc9fd5u34acab36a2f4e42c@mail.gmail.com>

On 03/03/2010 11:24 AM, Caleb Case wrote:
> On Wed, Mar 3, 2010 at 11:01 AM, Christopher J. PeBenito
> <cpebenito@tresys.com>  wrote:
>    
>> On Wed, 2010-03-03 at 10:08 -0500, Daniel J Walsh wrote:
>>      
>>> On 03/03/2010 05:20 AM, Dominick Grift wrote:
>>>        
>>>> On 03/03/2010 12:07 AM, Russell Coker wrote:
>>>> <snip>
>>>>
>>>>          
>>>>> How should we solve this?
>>>>>
>>>>>
>>>>>            
>>>> I Wrote a blog with my view on this issue here:
>>>>
>>>> http://selinux-mac.blogspot.com/2010/02/about-apachecontenttemplate.html
>>>>
>>>> I am also interested in other views on this.
>>>>
>>>>
>>>>          
>>> Dominic your example would not work since it would not have rules to
>>> handle apache content is not present.  What happens to you executable.
>>>
>>> I am not sure this would work.
>>> optional_policy(`
>>> apache_cgi_domain(backuppc_admin_t, backuppc_admin_exec_t)
>>> ',`
>>>       gen_require(`
>>>               type bin_t;
>>>       ')
>>>       typealias bin_t alias backuppc_admin_exec_t;
>>> ')
>>>        
>> That won't work because you can't put require blocks in the else block
>> of an optional.
>>
>>      
> Thought I'd mention that the proposed CIL would alleviate this problem
> since it allows you to put FC statements in the policy (and in
> conditional statements). For example:
>
> # if the squid block exists (i.e., the squid module is in the policy)
> IF (? /(BLOCK squid)) {
>    # call the apache block with the squid type
>    CALL /(BLOCK apache_content_template) (TYPE squid)
>
>    # label the squid cache manager
>    LABEL (PATH:FILE (PATH:REGEX "/usr/lib/squid/cachemgr\.cgi")
> (PATH:FILETYPE "--")) {
>       USER system
>       ROLE object
>       TYPE squid_script_exec
>       RANGE (LEVEL s0)
>    }
> }
>
> The syntax is probably going to be changed at some point, but this
> does illustrate the general concept that labeling is part of the
> policy language proper and can be used in conditionals.
>
> Caleb
>    
Well since you brought it up,   I believe there should be an alias in here.

So if this policy is installed you have squid_script_exec_t otherwise 
alias all files to bin_t.  So the system can work if the policy is 
enabled or disabled.


All file types defined in policy  should have an alias for enabled and 
disabled policy.

Even if they default to default_t.


--
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.

  reply	other threads:[~2010-03-03 16:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 23:07 squid and apache Russell Coker
2010-03-03 10:20 ` Dominick Grift
2010-03-03 15:08   ` Daniel J Walsh
2010-03-03 15:15     ` Daniel J Walsh
2010-03-03 16:01     ` Christopher J. PeBenito
2010-03-03 16:13       ` Daniel J Walsh
2010-03-03 16:24       ` Caleb Case
2010-03-03 16:36         ` Daniel J Walsh [this message]
2010-03-23  3:31   ` Russell Coker

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=4B8E9026.5040709@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=calebcase@gmail.com \
    --cc=cpebenito@tresys.com \
    --cc=domg472@gmail.com \
    --cc=russell@coker.com.au \
    --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.