Skip to content

Commit

Permalink
Remove setuid/setgid bits on store objects in post-processing
Browse files Browse the repository at this point in the history
Updates #52
  • Loading branch information
zombiezen committed Oct 23, 2024
1 parent 125184d commit 13ec201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/osutil/osutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func MakePublicReadOnly(path string, onError func(error) error) error {
existingMode = info.Mode() & permMask
}

newMode := (existingMode | 0o444) &^ 0o222 // +r-w
newMode := (existingMode | 0o444) &^ (0o222 | os.ModeSetuid | os.ModeSetgid) // +r-sw
if entry.IsDir() || existingMode&0o111 != 0 {
newMode |= 0o111 // +x
}
Expand Down

0 comments on commit 13ec201

Please sign in to comment.