#!/bin/bash

### BEGIN INIT INFO
# Provides:          grsec-xen
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Set grsecurity to allow xen VMS to be created
# Description:       Set grsecurity to allow xen VMS to be created
#                    at the very end of the boot process
### END INIT INFO

# Disable ALL chroot hardenings

CHROPTS=`sysctl -aN 2>/dev/null |grep "kernel.grsecurity.chroot"`

for CHROPT in $CHROPTS; do
	sysctl -q -w $CHROPT=0
done
