From bf947741ac8f65e74d594a1e14e94d90320b403e Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 19 Jul 2007 09:42:38 -0700 Subject: [PATCH] Respect umask when creating backup files. Previously backup files were created with permissions of 0600 before the umask was subtracted. Set it to 0666 now; the user can adjust the permissions to make them more restrictive by changing the umask or permissions in the parent directories. --- store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store.cc b/store.cc index eb1c6da..8f2c8b3 100644 --- a/store.cc +++ b/store.cc @@ -57,7 +57,7 @@ Tarfile::Tarfile(const string &path, const string &segment) filter_fd = spawn_filter(real_fd); if (tar_fdopen(&t, filter_fd, (char *)path.c_str(), NULL, - O_WRONLY | O_CREAT, 0600, TAR_VERBOSE | TAR_GNU) == -1) + O_WRONLY | O_CREAT, 0666, TAR_VERBOSE | TAR_GNU) == -1) throw IOException("Error opening Tarfile"); } -- 2.20.1