From: Michael Albinus <michael.albinus@gmx.de>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 588a0363d9a: Improve SELinux handling in Tramp
Date: Thu, 03 Aug 2023 15:08:28 +0200 [thread overview]
Message-ID: <87zg38clyr.fsf@gmx.de> (raw)
In-Reply-To: <877cqcbb2i.fsf@yahoo.com> (Po Lu's message of "Thu, 03 Aug 2023 19:49:09 +0800")
Po Lu <luangruo@yahoo.com> writes:
Hi,
> If my understanding is correct, then with this change Tramp starts to
> return SELinux context information from file-attributes.
No. There's no visible change outside Tramp, it still returns the
SELinux context with file-selinux-context calls only.
This patch is part of Tramp optimizations I'm working on the last
days. One observation from the traces is, that file-selinux-context
calls almost always happen shortly after file-attributes calls. So I've
adapted Tramp's file-attributes implementations to use also the "-Z"
option (for ls) or "%C" option (for stat) on the remote side. From the
result, the SELinux context is extracted and cached inside Tramp. It is
not returned with file-attributes.
When the next file-selinux-context call happens, Tramp checks first the
cache, before it sends the respective remote command. By this, often a
network roundtrip can be avoided.
> Doesn't this mean Dired and similar should be adjusted to refrain from
> trying to restore SELinux attributes when performing a copy from a
> remote directory, given that different machines can have completely
> incompatible SELinux configurations?
I don't believe so. Outside Tramp, nothing has changed.
Best regards, Michael.
next prev parent reply other threads:[~2023-08-03 13:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169106143410.16457.9843450418997998201@vcs2.savannah.gnu.org>
[not found] ` <20230803111715.B86F3C038BB@vcs2.savannah.gnu.org>
2023-08-03 11:49 ` master 588a0363d9a: Improve SELinux handling in Tramp Po Lu
2023-08-03 13:08 ` Michael Albinus [this message]
2023-08-03 13:14 ` Po Lu
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg38clyr.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).