From 2969fb7663c6a0c868007071c56a3ce2d9511cfa Mon Sep 17 00:00:00 2001 From: rd235 Date: Wed, 15 Nov 2006 15:51:27 +0000 Subject: [PATCH] just a minor fix on dir permissions. git-svn-id: https://vde.svn.sourceforge.net/svnroot/vde/trunk@111 d37a7db1-d92d-0410-89df-f68f52f87b57 --- vde-2/datasock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vde-2/datasock.c b/vde-2/datasock.c index 2c32950..74176d7 100644 --- a/vde-2/datasock.c +++ b/vde-2/datasock.c @@ -3,6 +3,7 @@ * Licensed under the GPLv2 * Modified by Ludovico Gardenghi 2005 * -g option (group management) by Daniel P. Berrange + * dir permission patch by Alessio Caprari 2006 */ #include @@ -390,7 +391,8 @@ static void init(void) printlog(LOG_ERR,"Setting O_NONBLOCK on connection fd: %s",strerror(errno)); return; } - if (mkdir(ctl_socket, (mode | 0100) & 0755) < 0) { + if (mkdir(ctl_socket, (mode & 0700 ? 0700 : 0) | + (mode & 0070 ? 0050 : 0) | (mode & 0007 ? 0005 : 0)) < 0) { printlog(LOG_ERR,"creating vde ctl dir: %s",strerror(errno)); return; } -- 2.11.4.GIT