Subject: Re: bug#29287: tramp-test25-file-selinux fails

From: Glenn Morris <[email-masked]>
Date: Mon, 13 Nov 2017 15:09:17 -0500

PS I think the flaw is in this bit:

  ;; Different permissions mean different SELINUX context.
  (set-file-modes tmp-name1 #o777)
  (set-file-modes tmp-name2 #o444)

No, they don't. File modes and SELinux context are separate.

Perhaps you could use something (file-selinux-context "/") for a value
that is guaranteed to exist and be different from a temp file.
Though I don't know if users can always set a random file's context to
root_t (it works here).