Commit Diff
Diff:
a03f914c51349e9583d4f6dc23fcf7e10eef2ab4
04d70a974fdfafe4f25c4f2bdea8b5a3bd2bce6e
Commit:
04d70a974fdfafe4f25c4f2bdea8b5a3bd2bce6e
Tree:
2800bbac33f8620b36367d6eb33823eeb21dd665
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Mon Mar 6 22:13:53 2023 UTC
Message:
Fix permissions complaints in Mail.pm
blob - d41998e5bf507817e9f1f30711ae7881ff6a06d8
blob + 77990e440fd2824378c5b48d195c24f41cedb2d0
--- Mail.pm
+++ Mail.pm
@@ -74,6 +74,7 @@ sub mmail {
$line =~ s/^#(${username}\@${hostname}.*)/$1/;
}
# trailing newline necessary
+ `doas touch $passwdpath.bak`
main::writefile("$passwdpath.bak", join("\n", @passwd)."\n");
copy "${passwdpath}.bak", $passwdpath;
@@ -118,6 +119,7 @@ sub mmail {
$line =~ s/^(${username}\@${hostname}.*)/#$1/;
}
# trailing newline necessary
+ `doas touch $passwdpath.bak`
main::writefile("$passwdpath.bak", join("\n", @passwd)."\n");
copy "${passwdpath}.bak", $passwdpath;
@@ -268,6 +270,9 @@ sub deletemail {
@senders = grep !/^${username}\@${hostname}/, @virtuals;
# trailing newline necessary
+ `doas touch $passwdpath.bak`
+ `doas touch $virtualspath.bak`
+ `doas touch $senderspath.bak`
main::writefile("$passwdpath.bak", join("\n", @passwd)."\n");
copy "${passwdpath}.bak", $passwdpath;
main::writefile("$virtualspath", join("\n", @virtuals)."\n");
IRCNow