From 0a9b8e0ae227805098cdb390d0082f9fc4c7d246 Mon Sep 17 00:00:00 2001 From: Eryu Guan Date: Wed, 26 Aug 2020 20:38:39 +0800 Subject: [PATCH] rustjail: default permission of device node should be 666 Otherwise file owner in container may not read/write such devices. Fixes: #570 Signed-off-by: Eryu Guan --- src/agent/rustjail/src/container.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/agent/rustjail/src/container.rs b/src/agent/rustjail/src/container.rs index 7607a32b61..ceb8d2c0aa 100644 --- a/src/agent/rustjail/src/container.rs +++ b/src/agent/rustjail/src/container.rs @@ -153,7 +153,7 @@ lazy_static! { r#type: "c".to_string(), major: 1, minor: 3, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), }); @@ -162,7 +162,7 @@ lazy_static! { r#type: "c".to_string(), major: 1, minor: 5, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), }); @@ -171,7 +171,7 @@ lazy_static! { r#type: String::from("c"), major: 1, minor: 7, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), }); @@ -180,7 +180,7 @@ lazy_static! { r#type: "c".to_string(), major: 5, minor: 0, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), }); @@ -189,7 +189,7 @@ lazy_static! { r#type: "c".to_string(), major: 1, minor: 9, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), }); @@ -198,7 +198,7 @@ lazy_static! { r#type: "c".to_string(), major: 1, minor: 8, - file_mode: Some(0o066), + file_mode: Some(0o666), uid: Some(0xffffffff), gid: Some(0xffffffff), });