From 4dde0665c89362e90d46748a3a4358863a361ebb Mon Sep 17 00:00:00 2001 From: Nye Liu Date: Tue, 22 Jun 2021 21:29:20 -0700 Subject: [PATCH] core: transaction journal should not be executable (#23090) --- core/tx_journal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tx_journal.go b/core/tx_journal.go index 41b5156d4a..d282126a08 100644 --- a/core/tx_journal.go +++ b/core/tx_journal.go @@ -138,7 +138,7 @@ func (journal *txJournal) rotate(all map[common.Address]types.Transactions) erro journal.writer = nil } // Generate a new journal with the contents of the current pool - replacement, err := os.OpenFile(journal.path+".new", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755) + replacement, err := os.OpenFile(journal.path+".new", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) if err != nil { return err } @@ -158,7 +158,7 @@ func (journal *txJournal) rotate(all map[common.Address]types.Transactions) erro if err = os.Rename(journal.path+".new", journal.path); err != nil { return err } - sink, err := os.OpenFile(journal.path, os.O_WRONLY|os.O_APPEND, 0755) + sink, err := os.OpenFile(journal.path, os.O_WRONLY|os.O_APPEND, 0644) if err != nil { return err }