mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
38 lines
1.0 KiB
Diff
38 lines
1.0 KiB
Diff
diff --git a/contrib/init/openrc/docker.confd b/contrib/init/openrc/docker.confd
|
|
index 2444031..b5f431c 100644
|
|
--- a/contrib/init/openrc/docker.confd
|
|
+++ b/contrib/init/openrc/docker.confd
|
|
@@ -11,3 +11,6 @@
|
|
|
|
# any other random options you want to pass to docker
|
|
DOCKER_OPTS=""
|
|
+
|
|
+# disable grsecurity features
|
|
+#disable_grsec="chroot_deny_chmod chroot_deny_mknod"
|
|
diff --git a/contrib/init/openrc/docker.initd b/contrib/init/openrc/docker.initd
|
|
index f2e1536..20de85b 100644
|
|
--- a/contrib/init/openrc/docker.initd
|
|
+++ b/contrib/init/openrc/docker.initd
|
|
@@ -9,9 +9,21 @@
|
|
start_stop_daemon_args="--background \
|
|
--stderr \"${DOCKER_LOGFILE}\" --stdout \"${DOCKER_LOGFILE}\""
|
|
|
|
+grsecdir=/proc/sys/kernel/grsecurity
|
|
+
|
|
+depend() {
|
|
+ need sysfs
|
|
+}
|
|
+
|
|
start_pre() {
|
|
checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
|
|
|
|
+ for i in $disable_grsec; do
|
|
+ if [ -e "$grsecdir/$i" ]; then
|
|
+ einfo " Disabling $i"
|
|
+ echo 0 > "$grsecdir/$i"
|
|
+ fi
|
|
+ done
|
|
ulimit -n 1048576
|
|
|
|
# Having non-zero limits causes performance problems due to accounting overhead
|