All of lore.kernel.org
 help / color / mirror / Atom feed
* Is there way to set some specific domain to have all permissions?
@ 2011-06-01 23:43 Sam Gandhi
  2011-06-01 23:53 ` Guido Trentalancia
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sam Gandhi @ 2011-06-01 23:43 UTC (permalink / raw)
  To: selinux

If I want to set permission for say program in myprog_t to allow all
the permissions, is there way to do this in SELinux.

Example I have program myprog and rule to set it domain correctly,
what I want to do is this domain myprog_t should be able to do
anything.

How would one write such a policy rule? I have done search on mailing
list archive and see there was a long thread in 2007 called 'concept
of a permissive domain' but I am not able figure out what the
conclusion of that thread was...

-Sam

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there way to set some specific domain to have all permissions?
  2011-06-01 23:43 Is there way to set some specific domain to have all permissions? Sam Gandhi
@ 2011-06-01 23:53 ` Guido Trentalancia
  2011-06-01 23:57 ` Guido Trentalancia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Guido Trentalancia @ 2011-06-01 23:53 UTC (permalink / raw)
  To: Sam Gandhi; +Cc: selinux

Hi Sam !

I think you can first create an "all permissions" set and then use that
for your myprog_t.

define(`all_permissions',
`{ name_all_permissions_here_separated_by_space }')

Hope it helps.

Regards,

Guido

On Wed, 2011-06-01 at 16:43 -0700, Sam Gandhi wrote:
> If I want to set permission for say program in myprog_t to allow all
> the permissions, is there way to do this in SELinux.
> 
> Example I have program myprog and rule to set it domain correctly,
> what I want to do is this domain myprog_t should be able to do
> anything.
> 
> How would one write such a policy rule? I have done search on mailing
> list archive and see there was a long thread in 2007 called 'concept
> of a permissive domain' but I am not able figure out what the
> conclusion of that thread was...
> 
> -Sam
> 
> --
> 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.
> 



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there way to set some specific domain to have all permissions?
  2011-06-01 23:43 Is there way to set some specific domain to have all permissions? Sam Gandhi
  2011-06-01 23:53 ` Guido Trentalancia
@ 2011-06-01 23:57 ` Guido Trentalancia
  2011-06-02  6:56 ` Dominick Grift
  2011-06-02 12:36 ` Stephen Smalley
  3 siblings, 0 replies; 5+ messages in thread
From: Guido Trentalancia @ 2011-06-01 23:57 UTC (permalink / raw)
  To: Sam Gandhi; +Cc: selinux

Hello again !

I forgot to add that there is a policy mailing list... It's called
refpolicy mailing list, it doesn't matter that you are not writing
reference policy, it's still more appropriate than here.

Here you go:

http://oss.tresys.com/mailman/listinfo/refpolicy

Regards,

Guido

On Wed, 2011-06-01 at 16:43 -0700, Sam Gandhi wrote:
> If I want to set permission for say program in myprog_t to allow all
> the permissions, is there way to do this in SELinux.
> 
> Example I have program myprog and rule to set it domain correctly,
> what I want to do is this domain myprog_t should be able to do
> anything.
> 
> How would one write such a policy rule? I have done search on mailing
> list archive and see there was a long thread in 2007 called 'concept
> of a permissive domain' but I am not able figure out what the
> conclusion of that thread was...
> 
> -Sam
> 
> --
> 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.
> 



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there way to set some specific domain to have all permissions?
  2011-06-01 23:43 Is there way to set some specific domain to have all permissions? Sam Gandhi
  2011-06-01 23:53 ` Guido Trentalancia
  2011-06-01 23:57 ` Guido Trentalancia
@ 2011-06-02  6:56 ` Dominick Grift
  2011-06-02 12:36 ` Stephen Smalley
  3 siblings, 0 replies; 5+ messages in thread
From: Dominick Grift @ 2011-06-02  6:56 UTC (permalink / raw)
  To: Sam Gandhi; +Cc: selinux

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]



On Wed, 2011-06-01 at 16:43 -0700, Sam Gandhi wrote:
> 
> Example I have program myprog and rule to set it domain correctly,
> what I want to do is this domain myprog_t should be able to do
> anything.
> 
> How would one write such a policy rule?

You could make it unconfined

optional_policy(`
 unconfined_domain(myprog_t)
')

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is there way to set some specific domain to have all permissions?
  2011-06-01 23:43 Is there way to set some specific domain to have all permissions? Sam Gandhi
                   ` (2 preceding siblings ...)
  2011-06-02  6:56 ` Dominick Grift
@ 2011-06-02 12:36 ` Stephen Smalley
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Smalley @ 2011-06-02 12:36 UTC (permalink / raw)
  To: Sam Gandhi; +Cc: selinux

On Wed, 2011-06-01 at 16:43 -0700, Sam Gandhi wrote:
> If I want to set permission for say program in myprog_t to allow all
> the permissions, is there way to do this in SELinux.
> 
> Example I have program myprog and rule to set it domain correctly,
> what I want to do is this domain myprog_t should be able to do
> anything.
> 
> How would one write such a policy rule? I have done search on mailing
> list archive and see there was a long thread in 2007 called 'concept
> of a permissive domain' but I am not able figure out what the
> conclusion of that thread was...

There are two different concepts here:
1) An unconfined domain is a domain that is allowed to do everything by
the policy.  There will be no denials for such a domain and thus no avc
denied messages.  There is no single policy rule/statement for
identifying a domain as unconfined (as SELinux has no inherent notion of
an unconfined domain); instead, you have to define a set of policy rules
that grant all permissions to all types for that domain.  In typical
policies, this is done by defining an unconfined_domain() macro that
either directly expands to the necessary rules or that associates a type
attribute with the domain that is then used in a series of allow rules
granting all permissions to all domains with that type attribute (the
latter is more efficient in memory usage).

2) A permissive domain is a domain that operates in permissive mode
independent of the global enforcing/permissive status.  Such a domain
may be denied permissions by the policy, but such denials will only be
logged and not enforced by the system.  A permissive domain is defined
by the permissive statement, e.g.:
	permissive myprog_t;

Permissive domains are only supported for policy versions >= 23, so if
your kernel's /selinux/policyvers is < 23, your kernel won't support
that feature.

The purpose of permissive domains, like permissive mode, is for policy
development/debugging, not as a means of permanently making a particular
domain unconfined.

-- 
Stephen Smalley
National Security Agency


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-02 12:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 23:43 Is there way to set some specific domain to have all permissions? Sam Gandhi
2011-06-01 23:53 ` Guido Trentalancia
2011-06-01 23:57 ` Guido Trentalancia
2011-06-02  6:56 ` Dominick Grift
2011-06-02 12:36 ` Stephen Smalley

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.