Module Name: src
Committed By: martin
Date: Mon Jan 22 12:13:15 UTC 2018
Modified Files:
src/bin/ksh [netbsd-8]: history.c
Log Message:
Pull up following revision(s) (requested by maya in ticket #505):
bin/ksh/history.c: revision 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.12 -r1.12.6.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.12 src/bin/ksh/history.c:1.12.6.1
--- src/bin/ksh/history.c:1.12 Sat Jan 14 18:35:43 2017
+++ src/bin/ksh/history.c Mon Jan 22 12:13:15 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: history.c,v 1.12 2017/01/14 18:35:43 maya Exp $ */
+/* $NetBSD: history.c,v 1.12.6.1 2018/01/22 12:13:15 martin Exp $ */
/*
* command history
@@ -19,7 +19,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: history.c,v 1.12 2017/01/14 18:35:43 maya Exp $");
+__RCSID("$NetBSD: history.c,v 1.12.6.1 2018/01/22 12:13:15 martin Exp $");
#endif
@@ -757,7 +757,7 @@ hist_finish()
else
hp = histlist;
- if ((fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0777)) != -1) {
+ if ((fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0600)) != -1) {
/* Remove anything written before we got the lock */
ftruncate(fd, 0);
if ((fh = fdopen(fd, "w")) != NULL) {