GNU bug report logs - #29287
tramp-test25-file-selinux fails

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Mon, 13 Nov 2017 19:31:02 UTC

Severity: normal

Found in version 26.0.90

Fixed in version 26.0.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29287 in the body.
You can then email your comments to 29287 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org:
bug#29287; Package emacs. (Mon, 13 Nov 2017 19:31:03 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: tramp-test25-file-selinux fails
Date: Mon, 13 Nov 2017 14:30:01 -0500
Package: emacs
Version: 26.0.90

tramp-test25-file-selinux fails on RHEL7.4 with SELinux enabled.
Reporting as requested in the comment in the source file. :)

Test tramp-test25-file-selinux backtrace:
  signal(ert-test-failed (((should-not (equal (file-selinux-context tm
  ert-fail(((should-not (equal (file-selinux-context tmp-name1) (file-
  (if (not (unwind-protect (setq value-4340 (apply fn-4338 args-4339))
  (let (form-description-4342) (if (not (unwind-protect (setq value-43
  (let ((value-4340 'ert-form-evaluation-aborted-4341)) (let (form-des
  (let* ((fn-4338 (function equal)) (args-4339 (condition-case err (le
  (progn (write-region "foo" nil tmp-name1) (let* ((fn-4318 (function 
  (unwind-protect (progn (write-region "foo" nil tmp-name1) (let* ((fn
  (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2
  (let (quoted) (let ((tmp-name1 (tramp--test-make-temp-name nil quote
  (closure (t) nil (let* ((fn-4308 (function tramp--test-enabled)) (ar
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name tramp-test25-file-selinux :documentat
  ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :expensive-t
  ert-run-tests((not (tag :expensive-test)) #f(compiled-function (even
  ert-run-tests-batch((not (tag :expensive-test)))
  ert-run-tests-batch-and-exit((not (tag :expensive-test)))
  eval((ert-run-tests-batch-and-exit '(not (tag :expensive-test))))
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/net/tramp-tests.el" 
  command-line()
  normal-top-level()
Test tramp-test25-file-selinux condition:
    (ert-test-failed
     ((should-not
       (equal
	(file-selinux-context tmp-name1)
	(file-selinux-context tmp-name2)))
      :form
      (equal
       ("unconfined_u" "object_r" "user_tmp_t" "s0")
       ("unconfined_u" "object_r" "user_tmp_t" "s0"))
      :value t :explanation nil))
   FAILED  29/41  tramp-test25-file-selinux




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29287; Package emacs. (Mon, 13 Nov 2017 20:10:02 GMT) Full text and rfc822 format available.

Message #6 received at 29287 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 29287 <at> debbugs.gnu.org
Cc: michael.albinus <at> gmx.de
Subject: Re: bug#29287: tramp-test25-file-selinux fails
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).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29287; Package emacs. (Mon, 13 Nov 2017 20:12:01 GMT) Full text and rfc822 format available.

Message #9 received at 29287 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 29287 <at> debbugs.gnu.org
Cc: michael.albinus <at> gmx.de
Subject: Re: bug#29287: tramp-test25-file-selinux fails
Date: Mon, 13 Nov 2017 15:11:05 -0500
PPS Nitpick: it's "SELinux", not "SELINUX".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29287; Package emacs. (Tue, 14 Nov 2017 09:26:02 GMT) Full text and rfc822 format available.

Message #12 received at 29287 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 29287 <at> debbugs.gnu.org
Subject: Re: bug#29287: tramp-test25-file-selinux fails
Date: Tue, 14 Nov 2017 10:25:42 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> 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).

I've used another approach, hoping it is generic enough.

Could you, pls, check whether my patch (committed to the emacs-26
branch) works for you?

Thanks, and best regards, Michael.




bug marked as fixed in version 26.0.91, send any further explanations to 29287 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 14 Nov 2017 17:21:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29287; Package emacs. (Tue, 14 Nov 2017 17:23:02 GMT) Full text and rfc822 format available.

Message #17 received at 29287 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 29287 <at> debbugs.gnu.org
Subject: Re: bug#29287: tramp-test25-file-selinux fails
Date: Tue, 14 Nov 2017 12:21:56 -0500
Works for me, thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Dec 2017 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.