All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Russell Coker <russell@coker.com.au>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: chcon
Date: Tue, 21 Oct 2003 14:39:38 -0400	[thread overview]
Message-ID: <3F957D6A.7060807@redhat.com> (raw)
In-Reply-To: <1066743378.27065.81.camel@moss-spartans.epoch.ncsc.mil>

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

Stephen Smalley wrote:

>On Tue, 2003-10-21 at 09:27, Russell Coker wrote:
>  
>
>>Steve, chcon needs access to /selinux/context, is there any problem in putting 
>>in a macro such as the following and using it for all user domains?
>>
>>define(`can_check_context', `
>>allow $1 security_t:dir search;
>>allow $1 security_t:file { read write };
>>allow $1 security_t:security { check_context };
>>')
>>    
>>
>
>This is a recent change to chcon in Dan's SRPM; doesn't exist in the
>coreutil-selinux patch from the last release. It isn't truly necessary,
>as the context will be checked when it is passed to the kernel via
>setfilecon and that call will fail if the context is invalid, so it is
>only useful if there is some benefit to catching such errors earlier.
>
>Even if it is worth retaining in chcon, I would suggest distinguishing
>between an errno of ENOENT and an errno of EINVAL, as the former may
>just indicate that selinuxfs wasn't mounted or the kernel was a
>non-SELinux kernel (but could still have the xattr handlers), and
>letting the chcon proceed in the former case.  Otherwise, you won't be
>able to use chcon if selinuxfs is unmounted or using a non-SELinux
>kernel that has the xattr handlers.  I should likely make the same
>change to setfiles.
>
>  
>
I have put out a new patch that does not do this anymore.  It has a 
simpler error mechanism.

Dan

[-- Attachment #2: Type: text/html, Size: 1807 bytes --]

  reply	other threads:[~2003-10-21 18:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 13:27 chcon Russell Coker
2003-10-21 13:36 ` chcon Stephen Smalley
2003-10-21 18:39   ` Daniel J Walsh [this message]
2003-10-21 18:58     ` chcon Stephen Smalley

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=3F957D6A.7060807@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=russell@coker.com.au \
    --cc=sds@epoch.ncsc.mil \
    --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.