From b687ca70d5cf0a26cb0ad41c0ba99fbdacdd3e23 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sun, 23 Jul 2017 17:59:13 +0530 Subject: [PATCH] Update runtime error message thrown for grsec/hardened kernels (#236) * Update runtime error message thrown for grsec/hardened kernels, saying that they are not supported right now, #107 * Remove unnecessary check for grsec enable/disable status - the build will not work in either case --- pmb/helpers/other.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pmb/helpers/other.py b/pmb/helpers/other.py index 2c1a63fd..1921f539 100644 --- a/pmb/helpers/other.py +++ b/pmb/helpers/other.py @@ -17,24 +17,24 @@ You should have received a copy of the GNU General Public License along with pmbootstrap. If not, see . """ import os -import pmb.helpers.run def check_grsec(args): """ Check if the current kernel is based on the grsec patchset, and if the chroot_deny_chmod option is enabled. Raise an exception in that - case, with a link to a wiki page. Otherwise, do nothing. + case, with a link to the issue. Otherwise, do nothing. """ path = "/proc/sys/kernel/grsecurity/chroot_deny_chmod" if not os.path.exists(path): return - status = pmb.helpers.run.root( - args, ["cat", path], return_stdout=True).rstrip() - if status != "0": - link = "https://github.com/postmarketOS/pmbootstrap/wiki/Troubleshooting:grsec" - raise RuntimeError("You're running a kernel based on the grsec" - " patchset. To get pmbootstrap working, you" - " will need to disable some options with" - " sysctl: <" + link + ">") + link = "https://github.com/postmarketOS/pmbootstrap/issues/107" + raise RuntimeError("You're running a kernel based on the grsec" + " patchset. At the moment, pmbootstrap is not" + " compatible with grsec or a hardened kernel, sorry!" + " To get pmbootstrap working, you will need to switch" + " to a vanilla kernel (i.e. non-hardened and without grsec)." + " Alternatively, it would be awesome if you want to add" + " support for hardened/grsec kernels, please see this for" + " more details: <" + link + ">")