Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-0]: src/bin/ksh Pull up following revision(s) (requested by may...



details:   https://anonhg.NetBSD.org/src/rev/15a1177b5f4c
branches:  netbsd-7-0
changeset: 801421:15a1177b5f4c
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Jan 22 19:57:17 2018 +0000

description:
Pull up following revision(s) (requested by maya in ticket #1554):
        bin/ksh/history.c: revision 1.18 via patch
Use 0600 as the mode for histfile here too.
pointed out by John D. Baker in PR bin/52480

diffstat:

 bin/ksh/history.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r c865e43e85e7 -r 15a1177b5f4c bin/ksh/history.c
--- a/bin/ksh/history.c Mon Jan 22 19:40:25 2018 +0000
+++ b/bin/ksh/history.c Mon Jan 22 19:57:17 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: history.c,v 1.11 2011/08/31 16:24:54 plunky Exp $      */
+/*     $NetBSD: history.c,v 1.11.24.1 2018/01/22 19:57:17 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.24.1 2018/01/22 19:57:17 snj Exp $");
 #endif
 
 
@@ -757,7 +757,7 @@
   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"))) {



Home | Main Index | Thread Index | Old Index