shithub: riscv

Download patch

ref: ab5c4799d95e0d60ca9ebf16dede88cd245e3aaa
parent: 9fcce48b3859f3aa5a784efba460ad2b090bf7a8
author: cinap_lenrek <[email protected]>
date: Sun Feb 23 15:42:00 EST 2020

devcons: fix permissions for reboot and sysstat

#c/reboot is a write only file
#c/sysstat should not be writable by everyone (write resets counters)

--- a/sys/src/9/port/devcons.c
+++ b/sys/src/9/port/devcons.c
@@ -344,9 +344,9 @@
 	"pid",		{Qpid},		NUMSIZE,	0444,
 	"ppid",		{Qppid},	NUMSIZE,	0444,
 	"random",	{Qrandom},	0,		0444,
-	"reboot",	{Qreboot},	0,		0664,
+	"reboot",	{Qreboot},	0,		0220,
 	"sysname",	{Qsysname},	0,		0664,
-	"sysstat",	{Qsysstat},	0,		0666,
+	"sysstat",	{Qsysstat},	0,		0664,
 	"time",		{Qtime},	NUMSIZE+3*VLNUMSIZE,	0664,
 	"user",		{Quser},	0,		0666,
 	"zero",		{Qzero},	0,		0444,