X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=grub;fp=grub;h=b5fbe31cf5a9242f1d734f34cb135a0bdd07159d;hb=8485a58b8bcc5205c18cf8c3f65386c9e70b7dd0;hp=0000000000000000000000000000000000000000;hpb=c96b02bc85d6a8213c1423bea16aa16b9dd5a6fc;p=kernel-cn.git diff --git a/grub b/grub new file mode 100755 index 0000000..b5fbe31 --- /dev/null +++ b/grub @@ -0,0 +1,26 @@ +#!/bin/sh +# Grub shell ExecShield wrapper +# +# Copyright (C) 2009 Dinko Korunic, CARNet, Grupa za izradu paketa +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +SHIELD=$(sysctl -e -n kernel.exec-shield) +_retval=0 + +if [ ! -z "$SHIELD" ]; then + sysctl -e -w kernel.exec-shield=0 >/dev/null 2>&1 || true +fi + +if [ -x "$0.real" ]; then + "$0.real" $@ || _retval=$? +fi + +if [ ! -z "$SHIELD" ]; then + sysctl -e -w "kernel.exec-shield=$SHIELD" >/dev/null 2>&1 || true +fi + +exit $_retval