[OpenWrt-Devel] [PATCH procd] jail: fix jail root folder permissions

Etienne CHAMPETIER champetier.etienne at gmail.com
Mon Jul 20 16:41:50 EDT 2015


We need a+x rights on the path to the root of the jails
so we can use users other than root (like nobody)

This partly fixes jailed dnsmasq

Signed-off-by: Etienne CHAMPETIER <champetier.etienne at gmail.com>
---
 jail/jail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jail/jail.c b/jail/jail.c
index a6de133..2bba292 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -143,7 +143,7 @@ static int build_jail(const char *path)
 
 	mkdir(path, 0755);
 
-	if (mount("tmpfs", path, "tmpfs", MS_NOATIME, "mode=0744")) {
+	if (mount("tmpfs", path, "tmpfs", MS_NOATIME, "mode=0755")) {
 		ERROR("tmpfs mount failed %s\n", strerror(errno));
 		return -1;
 	}
-- 
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list