i screwed this up.
>From b85dd32dce286d32d0f2b8ba07b68a6339ec55d3 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Tue, 23 Mar 2010 20:23:13 +0100
Subject: [PATCH] fix open(2)
---
util/getstyle.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/util/getstyle.c b/util/getstyle.c
index f936f13..69b37bb 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -185,7 +185,7 @@ void copyFile(char *dir, char *file)
snprintf(dst, len, "%s/%s", dir, basename(file));
buf[len] = '\0';
- if ((to_fd = open(dst, O_RDWR|O_CREAT|O_TRUNC)) == -1) {
+ if ((to_fd = open(dst, O_RDWR|O_CREAT|O_TRUNC,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1) {
wfree(dst);
return;
}
--
1.7.0
--
[-]
mkdir /nonexistentFrom b85dd32dce286d32d0f2b8ba07b68a6339ec55d3 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Tue, 23 Mar 2010 20:23:13 +0100
Subject: [PATCH] fix open(2)
---
util/getstyle.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/util/getstyle.c b/util/getstyle.c
index f936f13..69b37bb 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -185,7 +185,7 @@ void copyFile(char *dir, char *file)
snprintf(dst, len, "%s/%s", dir, basename(file));
buf[len] = '\0';
- if ((to_fd = open(dst, O_RDWR|O_CREAT|O_TRUNC)) == -1) {
+ if ((to_fd = open(dst, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) == -1) {
wfree(dst);
return;
}
--
1.7.0