diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:20:57 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-11 07:20:57 +0100 |
| commit | c2009ddeb7052dfe443f0239893f627759580c29 (patch) | |
| tree | 41a2c5309ff941f45aa0dfbf826e2f92fa59d9c3 /lib/Utils/copyfd.cpp | |
| parent | 1d038a9cf5e154406710800c372631f5c7c3fd81 (diff) | |
| download | abrt-c2009ddeb7052dfe443f0239893f627759580c29.tar.gz abrt-c2009ddeb7052dfe443f0239893f627759580c29.tar.xz abrt-c2009ddeb7052dfe443f0239893f627759580c29.zip | |
SOSreport/TicketUploader: use more restrictive file modes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/copyfd.cpp')
| -rw-r--r-- | lib/Utils/copyfd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Utils/copyfd.cpp b/lib/Utils/copyfd.cpp index 9abe7522..fdc568ac 100644 --- a/lib/Utils/copyfd.cpp +++ b/lib/Utils/copyfd.cpp @@ -106,7 +106,7 @@ off_t copyfd_eof(int fd1, int fd2) return full_fd_action(fd1, fd2, 0); } -off_t copy_file(const char *src_name, const char *dst_name) +off_t copy_file(const char *src_name, const char *dst_name, int mode) { off_t r; int src = open(src_name, O_RDONLY); @@ -115,7 +115,7 @@ off_t copy_file(const char *src_name, const char *dst_name) perror_msg("Can't open '%s'", src_name); return -1; } - int dst = open(dst_name, O_WRONLY | O_TRUNC | O_CREAT, 0666); + int dst = open(dst_name, O_WRONLY | O_TRUNC | O_CREAT, mode); if (dst < 0) { close(src); |
