+8
-1
lines changedFilter options
+8
-1
lines changed Original file line number Diff line number Diff line change
@@ -704,7 +704,14 @@ func (d *dump) dump(fc chan<- sumFileJob) error {
704
704
d.Path = file
705
705
d.ExitCode = 0
706
706
707
-
if err := os.Chmod(file, 0600); err != nil {
707
+
var mode os.FileMode = 0600
708
+
if d.Options.Format == 'd' {
709
+
// The hardening of permissions only apply to the top level
710
+
// directory, this won't make the contents executable
711
+
mode = 0700
712
+
}
713
+
714
+
if err := os.Chmod(file, mode); err != nil {
708
715
return fmt.Errorf("could not chmod to more secure permission for %s: %s", dbname, err)
709
716
}
710
717
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4