aboutsummaryrefslogtreecommitdiffstats
path: root/bashhist.c
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1999-02-19 17:11:39 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:52 +0000
commitb72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (patch)
treeb9899162338c2ff3fd83a8aef8831cb119e85cd7 /bashhist.c
parentbc4cd23ce958feda898c618215f94d8a4e8f4ffa (diff)
downloadandroid_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.gz
android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.bz2
android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.zip
Imported from ../bash-2.03.tar.gz.
Diffstat (limited to 'bashhist.c')
-rw-r--r--bashhist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bashhist.c b/bashhist.c
index 744c8fa..ed88b2c 100644
--- a/bashhist.c
+++ b/bashhist.c
@@ -289,7 +289,7 @@ maybe_append_history (filename)
/* If the filename was supplied, then create it if necessary. */
if (stat (filename, &buf) == -1 && errno == ENOENT)
{
- fd = open (filename, O_WRONLY|O_CREAT, 0666);
+ fd = open (filename, O_WRONLY|O_CREAT, 0600);
if (fd < 0)
{
builtin_error ("%s: cannot create: %s", filename, strerror (errno));
@@ -324,7 +324,7 @@ maybe_save_shell_history ()
if (stat (hf, &buf) == -1)
{
int file;
- file = open (hf, O_CREAT | O_TRUNC | O_WRONLY, 0666);
+ file = open (hf, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (file != -1)
close (file);
}