Module Name: src Committed By: snj Date: Tue Mar 13 17:01:54 UTC 2018
Modified Files: src/bin/ksh [netbsd-6-0]: history.c Log Message: Pull up following revision(s) (requested by maya in ticket #1520): bin/ksh/history.c: 1.18 Use 0600 as the mode for histfile here too. pointed out by John D. Baker in PR bin/52480 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.10.1 src/bin/ksh/history.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/ksh/history.c diff -u src/bin/ksh/history.c:1.11 src/bin/ksh/history.c:1.11.10.1 --- src/bin/ksh/history.c:1.11 Wed Aug 31 16:24:54 2011 +++ src/bin/ksh/history.c Tue Mar 13 17:01:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: history.c,v 1.11 2011/08/31 16:24:54 plunky Exp $ */ +/* $NetBSD: history.c,v 1.11.10.1 2018/03/13 17:01:54 snj Exp $ */ /* * command history @@ -19,7 +19,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: history.c,v 1.11 2011/08/31 16:24:54 plunky Exp $"); +__RCSID("$NetBSD: history.c,v 1.11.10.1 2018/03/13 17:01:54 snj Exp $"); #endif @@ -757,7 +757,7 @@ hist_finish() else hp = histlist; - fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0777); + fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0600); /* Remove anything written before we got the lock */ ftruncate(fd, 0); if (fd >= 0 && (fh = fdopen(fd, "w"))) {