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

Cyrill Gorcunov gorcunov at virtuozzo.com
Sun Dec 11 23:54:26 PST 2016


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 at openvz.org>
---
 scripts/vz-rst-action.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


More information about the Devel mailing list