All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guido Trentalancia <guido@trentalancia.com>
To: Sam Gandhi <samgandhi9@gmail.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: Is there difference betweek sefiles and restorecon in terms of labels
Date: Thu, 28 Apr 2011 01:30:12 +0200	[thread overview]
Message-ID: <1303947012.2648.28.camel@vortex> (raw)
In-Reply-To: <BANLkTi=23O4bO-mDgKectp3_xXpCOXFxmw@mail.gmail.com>

Hi Sam !

Restorecon is a symbolic link to setfiles.

Setfiles probably offers more options. Most notably, I think you can
choose the file contexts definitions (as far as I remember undocumented,
see belove).

I shall quote the code:

                /* 
                 * setfiles:  
                 * Recursive descent,
                 * Does not expand paths via realpath, 
                 * Aborts on errors during the file tree walk, 
                 * Try to track inode associations for conflict detection,
                 * Does not follow mounts,
                 * Validates all file contexts at init time. 
                 */

                /*
                 * restorecon:  
                 * No recursive descent unless -r/-R,
                 * Expands paths via realpath, 
                 * Do not abort on errors during the file tree walk,
                 * Do not try to track inode associations for conflict detection,
                 * Follows mounts,
                 * Does lazy validation of contexts upon use. 
                 */

Hope it helps. Please double-check for correctness.

Least but not last: there are a few undocumented options that I have
tried to document in a patch (see PATCH[1/2] and PATCH[2/2] that I
posted here on Sun, 20 Feb 2011 09:56:48 +0100).

Regards,

Guido

On Wed, 2011-04-27 at 15:59 -0700, Sam Gandhi wrote:
> Looking at man pages of sefiles and restorecon , both mention that
> they initialize security context database ( extended attributes) on
> one or more filesystems.
> 
> There are certainly differences between command line arguments, but
> can these programs be used interchangeably as far as extended
> attributes they assign to files?
> 
> -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.

  reply	other threads:[~2011-04-27 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 22:59 Is there difference betweek sefiles and restorecon in terms of labels Sam Gandhi
2011-04-27 23:30 ` Guido Trentalancia [this message]
2011-04-27 23:36 ` Guido Trentalancia
2011-04-29 14:01 ` Christopher J. PeBenito

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=1303947012.2648.28.camel@vortex \
    --to=guido@trentalancia.com \
    --cc=samgandhi9@gmail.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.