Bug 506060

Summary: Emacs is not SELinux aware
Product: [Fedora] Fedora Reporter: Bill Gradwohl <bill>
Component: emacsAssignee: Karel Klíč <kklic>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: debarshir, dnovotny, jonathan.underwood, kklic, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-21 07:19:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch 1: libselinux support in autotools
none
Patch 2: file-selinux-context, set-file-selinux-context functions
none
Patch 3: modification of the file save mechanism none

Description Bill Gradwohl 2009-06-15 12:43:55 UTC
Description of problem:
Edit a file with emacs and the tilde version (the backup) has the proper SELinux properties, but the real file does not.
Causes a lot of grief when fixing config files.

Version-Release number of selected component (if applicable):


How reproducible:
Edit a file with a non default context and then ls -Z the file and the backup.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Karel Klíč 2010-02-18 20:32:57 UTC
I'm working on it.

Comment 2 Karel Klíč 2010-02-28 22:24:04 UTC
Created attachment 396914 [details]
Patch 1: libselinux support in autotools

Comment 3 Karel Klíč 2010-02-28 22:25:38 UTC
Created attachment 396915 [details]
Patch 2: file-selinux-context, set-file-selinux-context functions

Comment 4 Karel Klíč 2010-02-28 22:30:34 UTC
Created attachment 396916 [details]
Patch 3: modification of the file save mechanism

The patches apply to Emacs 23.1.92. I'd like to convince upstream to include them to Emacs 24, and then backport them for Fedora purposes.

Some testing is needed before submitting it to the upstream.

Comment 5 Karel Klíč 2010-04-21 13:11:04 UTC
The patches have been merged to the upstream branch for Emacs 24.
It should be easy to port the changes back to Emacs 23.2 (= Fedora 13 and later).

Comment 6 Bug Zapper 2010-04-27 14:56:29 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Karel Klíč 2010-05-21 07:19:37 UTC
The attached patches break tramp. The patch which also properly solves tramp issues would be very large.

I decided to close this bug as WONTFIX. The patched Emacs would be too difficult to maintain.

SELinux support will be in Emacs 24.

Sorry for that.