mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-21 00:59:07 +00:00
Do not make files world writable
If we can chmod it, we own the file, so we only need a writable-bit for the owner, not for everybody. The permissions are changed back soon after, but it creates a small window for local attackers to insert their stuff into our build results.
This commit is contained in:
parent
7670b0be39
commit
0acfe66a99
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ for my $dest (@ARGV) {
|
|||
print "Generating: $source",$/;
|
||||
|
||||
if(-f $dest) {
|
||||
chmod(0777, $dest) || die "Could not chmod $dest for removing: $!";
|
||||
chmod(0755, $dest) || die "Could not chmod $dest for removing: $!";
|
||||
}
|
||||
|
||||
open(my $sfh, '<', $source) || die "Could not open $source for reading: $!";
|
||||
|
|
Loading…
Add table
Reference in a new issue