~emersion/soju-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2

[PATCH] Slightly relax new log file permissions

Details
Message ID
<20210614155713.60423-1-greg@gpanders.com>
DKIM signature
pass
Download raw message
Patch: +2 -2
Make new log files group-readable by default. To retain the prior
behavior, soju can be started with a umask set to 0077.
---
 msgstore_fs.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/msgstore_fs.go b/msgstore_fs.go
index d17859d..5f7025b 100644
--- a/msgstore_fs.go
+++ b/msgstore_fs.go
@@ -129,12 +129,12 @@ func (ms *fsMessageStore) Append(network *network, entity string, msg *irc.Messa
		}

		dir := filepath.Dir(path)
		if err := os.MkdirAll(dir, 0700); err != nil {
		if err := os.MkdirAll(dir, 0750); err != nil {
			return "", fmt.Errorf("failed to create message logs directory %q: %v", dir, err)
		}

		var err error
		f, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0600)
		f, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0640)
		if err != nil {
			return "", fmt.Errorf("failed to open message log file %q: %v", path, err)
		}
-- 
2.32.0
Details
Message ID
<4N5Ob31FR106j1_bRO2zf1bG63x2OGtp-648yOhlOIlbsHIu-Av0KJHtZm4CEp-AWJz4wmsbitkpNFhV9RlcC4IuFvtRCuT4O2aieoEGjlA=@emersion.fr>
In-Reply-To
<20210614155713.60423-1-greg@gpanders.com> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Details
Message ID
<mO2QwYl74OvOMt48iwCqawqoi4gq4mRabN9z7oRwuMpxv6UISY1GkaGntTzns1-5D2il85yZOosMYHhPDF3GM2THsG97_j09U_JGwioX890=@emersion.fr>
In-Reply-To
<20210614155713.60423-1-greg@gpanders.com> (view parent)
DKIM signature
pass
Download raw message
Pushed, thanks!
Reply to thread Export thread (mbox)