From c52d3ee6abc02c275987cf0bf66418d716fc988d Mon Sep 17 00:00:00 2001 From: handyohos Date: Thu, 21 Apr 2022 17:50:02 +0800 Subject: [PATCH] bugfix: allow readproc group to access /proc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1)mount /proc时增加gid选型,使得readproc组的进程可以访问/proc文件系统。 Signed-off-by: handyohos Change-Id: If2d7b80e72bdda35ae1615fdc055867de40cee1e --- services/init/standard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 services/init/standard/device.c diff --git a/services/init/standard/device.c b/services/init/standard/device.c old mode 100644 new mode 100755 index 1639ac52..201f78f7 --- a/services/init/standard/device.c +++ b/services/init/standard/device.c @@ -56,7 +56,7 @@ void MountBasicFs(void) if (mount("devpts", "/dev/pts", "devpts", 0, NULL) != 0) { INIT_LOGE("Mount devpts failed. %s", strerror(errno)); } - if (mount("proc", "/proc", "proc", 0, "hidepid=2") != 0) { + if (mount("proc", "/proc", "proc", 0, "gid=3009,hidepid=2") != 0) { INIT_LOGE("Mount procfs failed. %s", strerror(errno)); } if (mount("sysfs", "/sys", "sysfs", 0, NULL) != 0) { -- GitLab