Vim editor supports preserving selinux labels, however it's unconditionally disabled at build time. This functionality is useful when editing files so they preserve correct security labels (for example files in /etc/init.d). Following patch adds check for selinux use flag to ebuild, and enables selinux support when needed. Reproducible: Always Steps to Reproduce: edit file using vim in /etc/init.d Actual Results: file label changes to system_u:object_r:etc_t Expected Results: should stay system_u:object_r:initrc_exec_t
Created attachment 362484 [details, diff] ebuild patch
Created attachment 362486 [details, diff] gvim ebuild patch same problem with app-editors/gvim
Added to 7.4.94.