Hide Forgot
Description of problem: Modify a file with emacs and the *~ version keeps the correct selinux information but the real file has default context. Version-Release number of selected component (if applicable): Any and all for quite some time How reproducible: Steps to Reproduce: 1.emacs someFileName 2.make a change 3.save 4.Now ls -Z someFileName* Actual results: The ~ version has the correct selinux info and the real file has it wrong. Expected results: Additional info: What editor are you guys using to avoid manually fixing selinux issues like this? What editor IS selinux aware?
I don't have a SELinux enabled system at hand to test with, but I suppose setting backup-by-copying to t could help. M-x customize-variable RET backup-by-copying RET -> Toggle it to on
Ville - Thanks for the suggestion. I didn't know it could do that. But emacs still needs to get fixed. gedit is also not selinux aware. I'm wondering what the selinux people are using when they make changes to conf files, etc. Its a PITA to keep fixing up the context and too easy to forget to do it.
Hi Bill, the SELinux support will be a part of Emacs 24, which will be released soon. See bug #506060. It would be too error-prone to backport those patches to Emacs 23. Setting the backup-by-copying variable helps. I think we should not enable it by default, because it would surprise users. Furthermore, Emacs manual says the default is to backup by renaming. http://www.gnu.org/s/emacs/manual/html_node/elisp/Rename-or-Copy.html
No plan to address this issue in Fedora 16. Emacs in Fedora 17 already is SELinux aware.