[Devel,libvzctl] scritps/vz-rst-action.in: Fix permissions in restore_devices

Submitted by Kirill Gorkunov on Dec. 12, 2016, 7:54 a.m.

Details

Message ID 20161212075426.GA27244@uranus.lan
State New
Series "scritps/vz-rst-action.in: Fix permissions in restore_devices"
Headers show

Commit Message

Kirill Gorkunov Dec. 12, 2016, 7:54 a.m.
When ploop is created on container's startup it's done with
S_IRUSR|S_IWUSR permissions. If container is migrating we need
old device name to be preserved between nodes, for this sake
we create it on restore via action script. But there is a typo:
the device created with 0660 instead of 0600. Fix it.

https://jira.sw.ru/browse/PSBM-57075

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 scripts/vz-rst-action.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

Index: libvzctl.git/scripts/vz-rst-action.in
===================================================================
--- libvzctl.git.orig/scripts/vz-rst-action.in
+++ libvzctl.git/scripts/vz-rst-action.in
@@ -55,7 +55,7 @@  restore_devices()
 			else
 				mkdir -p $dir
 			fi
-			mknod -m 660 $root/$d b $major $minor
+			mknod -m 600 $root/$d b $major $minor
 		done
 
 		rm -f $root/dev/$uuid