Source-Changes-HG archive

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

[src/netbsd-8]: src/bin/ksh Pull up following revision(s) (requested by maya ...



details:   https://anonhg.NetBSD.org/src/rev/0ebbc63558ad
branches:  netbsd-8
changeset: 434572:0ebbc63558ad
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jan 22 12:13:15 2018 +0000

description:
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

diffstat:

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

diffs (27 lines):

diff -r fa19987fa5e0 -r 0ebbc63558ad bin/ksh/history.c
--- a/bin/ksh/history.c Tue Jan 16 14:21:10 2018 +0000
+++ b/bin/ksh/history.c Mon Jan 22 12:13:15 2018 +0000
@@ -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 @@
   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) {



Home | Main Index | Thread Index | Old Index