[master] 6e8e590 Set correct mode on -C mode workdir

Poul-Henning Kamp phk at FreeBSD.org
Sun Mar 5 00:55:05 CET 2017


commit 6e8e590cf4d645e0720ed74d2501b90e9ed561f4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Mar 4 22:10:58 2017 +0000

    Set correct mode on -C mode workdir
    
    Fixes #2227

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 1eadebf..ae81022 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -40,6 +40,7 @@
 #include <string.h>
 #include <syslog.h>
 #include <unistd.h>
+#include <sys/stat.h>
 
 #include "mgt/mgt.h"
 #include "common/heritage.h"
@@ -730,6 +731,7 @@ main(int argc, char * const *argv)
 	if (C_flag) {
 		if (n_arg == NULL) {
 			AN(mkdtemp(Cn_arg));
+			AZ(chmod(Cn_arg, 0755));
 			n_arg = Cn_arg;
 		}
 	}



More information about the varnish-commit mailing list