From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Patch setfiles to only warn if add_remove fails to lstat on user initiated excludes.
Date: Tue, 11 Aug 2009 08:12:51 -0400 [thread overview]
Message-ID: <4A816043.9090905@redhat.com> (raw)
In-Reply-To: <1249935130.2422.82.camel@moss-pluto.epoch.ncsc.mil>
On 08/10/2009 04:12 PM, Stephen Smalley wrote:
> On Mon, 2009-08-10 at 16:03 -0400, Stephen Smalley wrote:
>> On Mon, 2009-08-10 at 11:13 -0400, Daniel J Walsh wrote:
>>> Currently in F12 if you have file systems that root can not read
>>>
>>> # restorecon -R -v /var/lib/libvirt/
>>> Can't stat directory "/home/dwalsh/.gvfs", Permission denied.
>>> Can't stat directory "/home/dwalsh/redhat", Permission denied.
>>>
>>> After patch
>>>
>>> # ./restorecon -R -v /var/lib/libvirt/
>>
>> But if you were to run
>> ./restorecon -R /home/dwalsh
>> that would try to descend into .gvfs and redhat, right?
>>
>> I think you want instead to ignore the lstat error if the error was
>> permission denied and add the entry to the exclude list so that
>> restorecon will not try to descend into it. It is ok to exclude a
>> directory to which you lack permission. Try this:
>
> Also, why limit -e to only directories? Why not let the user exclude
> individual files if they choose to do so? In which case we could drop
> the mode test altogether, and possibly drop the lstat() call altogether?
> Or if you truly want to warn the user about non-existent paths, then
> take the lstat() and warning to the 'e' option processing in main()
> instead of doing it inside of add_exclude().
>
I agree lets remove the directory check and warn on non existing files.
--
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.
next prev parent reply other threads:[~2009-08-11 12:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 15:13 Patch setfiles to only warn if add_remove fails to lstat on user initiated excludes Daniel J Walsh
2009-08-10 20:03 ` Stephen Smalley
2009-08-10 20:12 ` Stephen Smalley
2009-08-11 12:12 ` Daniel J Walsh [this message]
2009-08-11 13:33 ` Stephen Smalley
2009-08-11 14:12 ` 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=4A816043.9090905@redhat.com \
--to=dwalsh@redhat.com \
--cc=sds@tycho.nsa.gov \
--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.