From: Jonathan Lebon <jlebon@redhat.com>
To: selinux@vger.kernel.org
Cc: Jonathan Lebon <jlebon@redhat.com>
Subject: [PATCH] setfiles: clarify documented path resolution behaviour
Date: Thu, 4 Jun 2020 15:12:40 -0400 [thread overview]
Message-ID: <20200604191240.263819-1-jlebon@redhat.com> (raw)
One thing that confused me when investigating
https://github.com/SELinuxProject/selinux/issues/248 (i.e.
https://github.com/coreos/fedora-coreos-tracker/issues/512) was that the
manual page for `setfiles` seemed to imply that paths were fully
resolved. This was consistent with the issues above where `setfiles` was
failing because the target of the symbolic link didn't exist.
But in fact, the wording around symbolic links in
`setfiles`/`restorecon` refers actually to whether the parent
directories are canonicalized via `realpath(3)` before labeling.
Clarify the man pages to explain this.
---
policycoreutils/setfiles/restorecon.8 | 4 ++--
policycoreutils/setfiles/setfiles.8 | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/policycoreutils/setfiles/restorecon.8 b/policycoreutils/setfiles/restorecon.8
index bbfc83fe..06ec5a1d 100644
--- a/policycoreutils/setfiles/restorecon.8
+++ b/policycoreutils/setfiles/restorecon.8
@@ -159,8 +159,8 @@ The pathname for the file(s) to be relabeled.
.SH "NOTES"
.IP "1." 4
.B restorecon
-does not follow symbolic links and by default it does not
-operate recursively on directories.
+by default does not operate recursively on directories. Parent directories
+are fully resolved before labeling.
.IP "2." 4
If the
.I pathname
diff --git a/policycoreutils/setfiles/setfiles.8 b/policycoreutils/setfiles/setfiles.8
index 0188a75a..12f41967 100644
--- a/policycoreutils/setfiles/setfiles.8
+++ b/policycoreutils/setfiles/setfiles.8
@@ -214,7 +214,8 @@ option is used.
.SH "NOTES"
.IP "1." 4
.B setfiles
-follows symbolic links and operates recursively on directories.
+operates recursively on directories. Parent directories are not fully
+resolved before labeling.
.IP "2." 4
If the
.I pathname
--
2.26.2
next reply other threads:[~2020-06-04 19:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 19:12 Jonathan Lebon [this message]
2020-06-08 15:18 ` [PATCH] setfiles: clarify documented path resolution behaviour Stephen Smalley
2020-06-18 18:25 ` Jonathan Lebon
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=20200604191240.263819-1-jlebon@redhat.com \
--to=jlebon@redhat.com \
--cc=selinux@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).