Remove write to /sys/fs/selinux/checkreqprot
This SELinux option has been deprecated in the kernel since v5.7. In
v6.4, commit a7e4676e made any write to this file a no-op.
Since v4.4, the default value of 0 is set by the kernel. Skip the
setting of this value since we only support kernel >= 4.14.
Test: presubmit
Change-Id: Ied5945532e10b156dc0d9996b2a41a99d04e750b
diff --git a/init/selinux.cpp b/init/selinux.cpp
index 9095b85..1f211dd 100644
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -503,10 +503,6 @@
<< ") failed";
}
}
-
- if (auto result = WriteFile("/sys/fs/selinux/checkreqprot", "0"); !result.ok()) {
- LOG(FATAL) << "Unable to write to /sys/fs/selinux/checkreqprot: " << result.error();
- }
}
constexpr size_t kKlogMessageSize = 1024;