diff options
author | Joern Engel <joern@logfs.org> | 2012-11-20 11:03:16 -0800 |
---|---|---|
committer | Joern Engel <joern@logfs.org> | 2012-11-20 11:03:16 -0800 |
commit | 839b29da920bcfebe1b9d33afeab6287b85f1d5a (patch) | |
tree | 1dd14fa21ce0699f91370db9d1f4e444e2f0a70a | |
parent | a4bbca7625c7bd45a338222784495eb0330c057c (diff) | |
download | cancd-839b29da920bcfebe1b9d33afeab6287b85f1d5a.tar.gz |
Create files with 0644, not 0600
Allows other user without write access to read logfiles.
Signed-off-by: Joern Engel <joern@logfs.org>
-rw-r--r-- | cancd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -392,7 +392,7 @@ static const char *copy_tmpfile(struct source_ip *sip) char buf[4096]; ssize_t count; - fd = open(name, O_WRONLY | O_APPEND | O_CREAT, 0600); + fd = open(name, O_WRONLY | O_APPEND | O_CREAT, 0644); if (fd < 0) { syslog(LOG_ERR, "Unable to open \"%s\": %s", name, strerror(errno)); @@ -431,7 +431,7 @@ static void do_output(char *buf, int len, struct sockaddr_in *addr, socklen_t so if (!name) return; - fd = open(name, O_WRONLY | O_APPEND | O_CREAT, 0600); + fd = open(name, O_WRONLY | O_APPEND | O_CREAT, 0644); if (fd < 0) syslog(LOG_ERR, "Unable to open \"%s\": %s", name, strerror(errno)); else { |