diff options
author | 2012-05-13 08:47:37 +0000 | |
---|---|---|
committer | 2012-05-13 08:47:37 +0000 | |
commit | e255fd45c11dd50063bdebc11844c509628a09a0 (patch) | |
tree | 11ebd51ece65041d9f9dbb120ab774c2ee8cbf58 /sys-libs/libselinux/files | |
parent | Don't try to install nonexistent docs. #415703 (diff) | |
download | gentoo-2-e255fd45c11dd50063bdebc11844c509628a09a0.tar.gz gentoo-2-e255fd45c11dd50063bdebc11844c509628a09a0.tar.bz2 gentoo-2-e255fd45c11dd50063bdebc11844c509628a09a0.zip |
Mount /sys before /sys/fs/selinux, bug #414779
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/libselinux/files')
-rw-r--r-- | sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch b/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch new file mode 100644 index 000000000000..f2a206d1f1ae --- /dev/null +++ b/sys-libs/libselinux/files/libselinux-2.1.9-mountsys.patch @@ -0,0 +1,22 @@ +diff -ur libselinux-2.1.9.orig/src/load_policy.c libselinux-2.1.9/src/load_policy.c +--- libselinux-2.1.9.orig/src/load_policy.c 2012-05-05 10:33:06.130719282 +0200 ++++ libselinux-2.1.9/src/load_policy.c 2012-05-05 10:43:45.024720646 +0200 +@@ -370,8 +370,16 @@ + * mount it if present for use in the calls below. + */ + char *mntpoint = NULL; +- if (mount(SELINUXFS, SELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { +- mntpoint = SELINUXMNT; ++ /* First make sure /sys is mounted */ ++ if (mount("sysfs", "/sys", "sysfs", 0, 0) == 0 || errno == EBUSY) { ++ if (mount(SELINUXFS, SELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { ++ mntpoint = SELINUXMNT; ++ } else { ++ /* check old mountpoint */ ++ if (mount(SELINUXFS, OLDSELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { ++ mntpoint = OLDSELINUXMNT; ++ } ++ } + } else { + /* check old mountpoint */ + if (mount(SELINUXFS, OLDSELINUXMNT, SELINUXFS, 0, 0) == 0 || errno == EBUSY) { |