All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>
Cc: Matt Anderson <mra@hp.com>, selinux@tycho.nsa.gov
Subject: Re: SELINUX_ERR using chcon to set a printer to Secret
Date: Fri, 29 Sep 2006 13:51:02 -0400	[thread overview]
Message-ID: <451D5D06.6080401@redhat.com> (raw)
In-Reply-To: <1159473365.2850.62.camel@sgc.columbia.tresys.com>

Christopher J. PeBenito wrote:
> On Thu, 2006-09-28 at 15:33 -0400, Matt Anderson wrote:
>   
>> When I add the policy:
>>
>> allow secadm_t printer_device_t:chr_file { getattr relabelfrom relabelto };
>>
>> I'm able to perform the relabel from secadm_r.  This meets my needs wrt
>> CUPS, but could one of the policy gurus point what in the policy allows
>> secadm_r to do this?
>>     
>
> You need MLS upgrade and/or downgrade permissions:
>
> mls_file_upgrade(secadm_t)
> mls_file_downgrade(secadm_t)
>
>   
No those rules are already there.  I think the problem is in

files_relabel_all_files

I believe it needs this patch

diff -u files.if~ files.if
--- files.if~   2006-09-27 17:07:37.000000000 -0400
+++ files.if    2006-09-29 13:48:53.000000000 -0400
@@ -896,8 +896,8 @@
        allow $1 { file_type $2 }:lnk_file { getattr relabelfrom 
relabelto };
        allow $1 { file_type $2 }:fifo_file { getattr relabelfrom 
relabelto };
        allow $1 { file_type $2 }:sock_file { getattr relabelfrom 
relabelto };
-       allow $1 { file_type $2 }:blk_file { getattr relabelfrom };
-       allow $1 { file_type $2 }:chr_file { getattr relabelfrom };
+       allow $1 { file_type $2 }:blk_file { getattr relabelfrom 
relabelto };
+       allow $1 { file_type $2 }:chr_file { getattr relabelfrom 
relabelto };
 
        # satisfy the assertions:
        seutil_relabelto_bin_policy($1)


--
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:[~2006-09-29 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 18:59 SELINUX_ERR using chcon to set a printer to Secret Matt Anderson
2006-09-28 19:33 ` Matt Anderson
2006-09-28 19:56   ` Christopher J. PeBenito
2006-09-29 17:51     ` Daniel J Walsh [this message]
2006-09-29 18:23       ` Christopher J. PeBenito
2006-09-29 19:13         ` Daniel J Walsh

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=451D5D06.6080401@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=cpebenito@tresys.com \
    --cc=mra@hp.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.