diff options
author | Eric Wong <e@80x24.org> | 2021-09-21 09:29:45 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-21 19:18:37 +0000 |
commit | 6f1cf49c96b0e6d628bcd90487ba2e0820351bba (patch) | |
tree | f16c49d8deb0bf01819c3663a7718b2c12a8b145 /lib | |
parent | 5c7d3f916da9a9c93419282e943a7d45c53b9c86 (diff) | |
download | public-inbox-6f1cf49c96b0e6d628bcd90487ba2e0820351bba.tar.gz |
There's a chance some sensitive information (e.g. folder names) can end up in errors.log, though $XDG_RUNTIME_DIR or /tmp/lei-$UID/ will have 0700 permissions, anyways.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 2df1f326..29293e6c 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1225,6 +1225,7 @@ sub lazy_start { $errors_log = "$sock_dir/errors.log"; my $addr = pack_sockaddr_un($path); my $lk = bless { lock_path => $errors_log }, 'PublicInbox::Lock'; + umask(077) // die("umask(077): $!"); $lk->lock_acquire; socket($listener, AF_UNIX, SOCK_SEQPACKET, 0) or die "socket: $!"; if ($errno == ECONNREFUSED || $errno == ENOENT) { @@ -1236,7 +1237,6 @@ sub lazy_start { $! = $errno; # allow interpolation to stringify in die die "connect($path): $!"; } - umask(077) // die("umask(077): $!"); bind($listener, $addr) or die "bind($path): $!"; $lk->lock_release; undef $lk; |