]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
tools: init scripts: make XEN_RUN_DIR and XEN_LOCK_DIR mode 700
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 7 Feb 2019 15:02:27 +0000 (15:02 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 7 Feb 2019 18:44:36 +0000 (18:44 +0000)
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 <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
tools/hotplug/Linux/init.d/xencommons.in

index aa62e4c92f742554efb16d2acfe5912af11c581e..7fd6903b9868e27f855ba797a2529e6e2171d089 100644 (file)
@@ -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