The kernel now provides the /sys/fs/selinux mountpoint and libselinux
prefers it if it's available.
systemd currently tests only for /selinux and this leads to an infinite
loop of policy reloads in the latest Rawhide.
Fix it by checking both possible mountpoints.
Also add the new path to ignore_paths[].
/selinux appears also in nspawn.c. I don't think it's necessary to
change it there at this point.
https://bugzilla.redhat.com/show_bug.cgi?id=711015
* we just list them here so that we know that we should ignore them */
static const char * const ignore_paths[] = {
* we just list them here so that we know that we should ignore them */
static const char * const ignore_paths[] = {
"/selinux",
"/proc/bus/usb"
};
"/selinux",
"/proc/bus/usb"
};
int enforce = 0;
/* Already initialized? */
int enforce = 0;
/* Already initialized? */
- if (path_is_mount_point("/selinux") > 0)
+ if (path_is_mount_point("/sys/fs/selinux") > 0 ||
+ path_is_mount_point("/selinux") > 0)
return 0;
/* Before we load the policy we create a flag file to ensure
return 0;
/* Before we load the policy we create a flag file to ensure