emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 588a0363d9a: Improve SELinux handling in Tramp


From: Michael Albinus
Subject: Re: master 588a0363d9a: Improve SELinux handling in Tramp
Date: Thu, 03 Aug 2023 15:08:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]