Hi, I have created patches that add basic SELinux support into Emacs. Currently, if you have SELinux enabled, and you edit a file and then store it, the backup file (with the tilde) gets the proper SELinux context but the real file loses it. That is caused by "backup by renaming". If you set "backup-by-copying" variable to non-nil, the file you edited preserves the correct context after saving, but the backup file gets the default context (it should get the context of the original file). This causes a lot of problems when editing config files on machines with SELinux enabled. The attached patches modify Emacs so that it preserves SELinux context of edited files. - emacs-1-selinux-config changes the build system to support libselinux - emacs-2-selinux-get-set-context-fun adds two new functions file-selinux-context and set-file-selinux-context - emacs-3-selinux-backups-on-save modifies the buffer saving functions to handle SELinux context The patch can be applied against a recent version of the repository. Best regards, Karel Klic