Lines 1076-1088
Link Here
|
1076 |
# SELinux file labeling (needs to always be last in dyn_preinst) |
1076 |
# SELinux file labeling (needs to always be last in dyn_preinst) |
1077 |
# only attempt to label if setfiles is executable |
1077 |
# only attempt to label if setfiles is executable |
1078 |
# and 'context' is available on selinuxfs. |
1078 |
# and 'context' is available on selinuxfs. |
1079 |
if [ -f /selinux/context -a -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ]; then |
1079 |
if [ -f /selinux/context -a -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ] || \ |
|
|
1080 |
[ -f /sys/fs/selinux/context -a -x /usr/sbin/setfiles -a -x /usr/sbin/selinuxconfig ]; then |
1080 |
vecho ">>> Setting SELinux security labels" |
1081 |
vecho ">>> Setting SELinux security labels" |
1081 |
( |
1082 |
( |
1082 |
eval "$(/usr/sbin/selinuxconfig)" || \ |
1083 |
eval "$(/usr/sbin/selinuxconfig)" || \ |
1083 |
die "Failed to determine SELinux policy paths."; |
1084 |
die "Failed to determine SELinux policy paths."; |
1084 |
|
1085 |
|
1085 |
addwrite /selinux/context; |
1086 |
addwrite /selinux/context; |
|
|
1087 |
addwrite /sys/fs/selinux/context; |
1086 |
|
1088 |
|
1087 |
/usr/sbin/setfiles "${file_contexts_path}" -r "${D}" "${D}" |
1089 |
/usr/sbin/setfiles "${file_contexts_path}" -r "${D}" "${D}" |
1088 |
) || die "Failed to set SELinux security labels." |
1090 |
) || die "Failed to set SELinux security labels." |