Subject: savecore.
To: None <tech-userlevel@NetBSD.ORG>
From: matthew green <mrg@eterna.com.au>
List: tech-userlevel
Date: 11/18/1996 21:22:39
should savecore(8) do a umask(02) before writing any files, to ensure
that users won't be able to read kernels anyway? theoretically, they
shouldn't be able to get into /var/crash ...
i found this patch in my tree when updating just now. :-)
.mrg.
Index: savecore.c
===================================================================
RCS file: /cvsroot/src/sbin/savecore/savecore.c,v
retrieving revision 1.28
diff -c -r1.28 savecore.c
*** savecore.c 1996/10/01 18:21:48 1.28
--- savecore.c 1996/11/18 10:23:26
***************
*** 370,375 ****
--- 370,376 ----
* Get the current number and update the bounds file. Do the update
* now, because may fail later and don't want to overwrite anything.
*/
+ umask(002);
(void)snprintf(path, sizeof(path), "%s/bounds", dirname);
if ((fp = fopen(path, "r")) == NULL)
goto err1;