summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2016-03-04 00:53:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-04 00:53:14 +0000
commit4a248a34316efdb18aad93b75eb3149383eb17cf (patch)
treef82e8d62bc20c219cdcf26e090637858993360cf
parentd4028dea316b84e9170ee0018736bce8ba57f7a3 (diff)
parent0c1a5819e292891497d6aefcac9a13d9052608e2 (diff)
downloadlibselinux-4a248a34316efdb18aad93b75eb3149383eb17cf.tar.gz
Delete SELinux mount code
am: 0c1a5819e2 * commit '0c1a5819e292891497d6aefcac9a13d9052608e2': Delete SELinux mount code
-rw-r--r--src/android.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/android.c b/src/android.c
index 0856ff9..4b2b0d6 100644
--- a/src/android.c
+++ b/src/android.c
@@ -1596,33 +1596,7 @@ int selinux_android_reload_policy(void)
int selinux_android_load_policy(void)
{
- const char *mnt = SELINUXMNT;
- int rc;
- rc = mount(SELINUXFS, mnt, SELINUXFS, 0, NULL);
- if (rc < 0) {
- if (errno == ENODEV) {
- /* SELinux not enabled in kernel */
- return -1;
- }
- if (errno == ENOENT) {
- /* Fall back to legacy mountpoint. */
- mnt = OLDSELINUXMNT;
- rc = mkdir(mnt, 0755);
- if (rc == -1 && errno != EEXIST) {
- selinux_log(SELINUX_ERROR,"SELinux: Could not mkdir: %s\n",
- strerror(errno));
- return -1;
- }
- rc = mount(SELINUXFS, mnt, SELINUXFS, 0, NULL);
- }
- }
- if (rc < 0) {
- selinux_log(SELINUX_ERROR,"SELinux: Could not mount selinuxfs: %s\n",
- strerror(errno));
- return -1;
- }
- set_selinuxmnt(mnt);
-
+ set_selinuxmnt(SELINUXMNT);
return selinux_android_load_policy_helper(false);
}