git: 9front

Download patch

ref: 2bf39a818a3bed3e3403e1d96aadc4cdf1135726
parent: 31ef4f2c6d0c30cb173b5df2717ae9e30ea4cace
author: cinap_lenrek <cinap_lenrek@felloff.net>
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,
--