Set backup file permissions to 600
authorJamie Cameron <jcameron@webmin.com>
Fri, 16 Jan 2009 07:56:09 +0000 (07:56 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 16 Jan 2009 07:56:09 +0000 (07:56 +0000)
backup-config/CHANGELOG
backup-config/backup-config-lib.pl

index f20c216..30fade6 100644 (file)
@@ -15,3 +15,4 @@ When a directory is entered as an additional path to backup, it will be expanded
 When backing up or restoring from an FTP or SSH server, an optional port number can be entered if the remote server is using a non-standard port.
 ---- Changes since 1.440 ----
 Converted commands in the module's API file to POD format, and added more details about each function.
+Backup files are now given 600 permissions, to prevent reading by non-root users.
index 5b1d256..c914c39 100644 (file)
@@ -385,6 +385,7 @@ if ($?) {
 local @st = stat($file);
 ${$_[2]} = $st[7] if ($_[2]);
 @{$_[3]} = &unique(@files) if ($_[3]);
+&set_ownership_permissions(undef, undef, 0600, $file);
 
 if (!$_[5]) {
        # Call all module post functions