All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Paul Howarth <paul@city-fan.org>
Cc: briaeros007 <briaeros007@gmail.com>, selinux@tycho.nsa.gov
Subject: Re: how to always add rules to a policy
Date: Mon, 14 Sep 2009 07:59:43 -0700	[thread overview]
Message-ID: <4AAE5A5F.9090500@gmail.com> (raw)
In-Reply-To: <4AAE224A.9060506@city-fan.org>

Paul Howarth wrote:
> On 14/09/09 09:40, briaeros007 wrote:
>> Hello,
>>
>> First of all, i'm sorry if my questions is something "dumb".
>>
>> Here the context of my trouble :
>> I have create a server with an php website.
>> This php website use a postgresql db on the same server.
>> I use a RHEL 5.3 and selinux with the policy "targeted".
>>
>> For the website to works properly, i must add the rules :
>> "allow httpd_t postgresql_port_t:tcp_socket name_connect;"
>>
>> So now my problem is :
>> If i update my server and the policy is updated : Is there a way to
>> automatically add this (local) rule ?
>>
>> What i want to do is to use the rhel policy as a base, and to add my
>> own local rules without the need to recompile them/add them manually
>> at each update.
>>
>> I don't know if i'm very clear /o\
>
> You probably don't need to add any rules at all. Try setting this 
> boolean instead:
>
> # setsebool -P httpd_can_network_connect_db=1
>
> Paul.
>
> -- 
> 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.
>
 From what I remember, if using the
selinux-policy-default there was a
file called local.te(cant remember the path)
and in there you would add your allow rules
to the policy. That is if your using monolithic.

Justin P. Mattock

--
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:[~2009-09-14 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14  8:40 how to always add rules to a policy briaeros007
2009-09-14 11:00 ` Paul Howarth
2009-09-14 14:59   ` Justin P. Mattock [this message]

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=4AAE5A5F.9090500@gmail.com \
    --to=justinmattock@gmail.com \
    --cc=briaeros007@gmail.com \
    --cc=paul@city-fan.org \
    --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.