summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2012-11-20 11:03:16 -0800
committerJoern Engel <joern@logfs.org>2012-11-20 11:03:16 -0800
commit839b29da920bcfebe1b9d33afeab6287b85f1d5a (patch)
tree1dd14fa21ce0699f91370db9d1f4e444e2f0a70a
parenta4bbca7625c7bd45a338222784495eb0330c057c (diff)
downloadcancd-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cancd.c b/cancd.c
index 4aff4fa..cfcfec1 100644
--- a/cancd.c
+++ b/cancd.c
@@ -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 {