From: Ian Jackson Date: Thu, 7 Feb 2019 15:02:27 +0000 (+0000) Subject: tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7b5278b28f8fbcd4402e4520d7a5d607d4a997a7;p=people%2Fpauldu%2Fxen.git tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700 These directories ought not to be even world-readable. If this script for some reason runs with a lax umask they might be created overly-writeable. Avoid any such bug by setting the mode explicitly. Signed-off-by: Ian Jackson Acked-by: Wei Liu Release-acked-by: Juergen Gross --- diff --git a/tools/hotplug/Linux/init.d/xencommons.in b/tools/hotplug/Linux/init.d/xencommons.in index aa62e4c92f..7fd6903b98 100644 --- a/tools/hotplug/Linux/init.d/xencommons.in +++ b/tools/hotplug/Linux/init.d/xencommons.in @@ -56,8 +56,8 @@ do_start () { for mod in $BACKEND_MODULES ; do modprobe "$mod" &>/dev/null ; done - mkdir -p ${XEN_RUN_DIR} - mkdir -p ${XEN_LOCK_DIR} + mkdir -m700 -p ${XEN_RUN_DIR} + mkdir -m700 -p ${XEN_LOCK_DIR} mkdir -p ${XEN_LOG_DIR} @XEN_SCRIPT_DIR@/launch-xenstore || exit 1