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
This commit is contained in:
Thiébaud Weksteen 2023-10-19 11:27:49 +11:00
parent 91bab464ed
commit b010393fe5

View file

@ -503,10 +503,6 @@ void SelinuxSetEnforcement() {
<< ") 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;