aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-06 16:37:46 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-06 16:38:33 +0100
commitb9857b21c27c3ba98a400cd797c540baa9f40be1 (patch)
tree007d9320e30efb40aead4743ddd35432b81efe46
parent188626f17c0904a0bcd2755e530e2da252d969a2 (diff)
downloadupstream-b9857b21c27c3ba98a400cd797c540baa9f40be1.tar.gz
upstream-b9857b21c27c3ba98a400cd797c540baa9f40be1.tar.bz2
upstream-b9857b21c27c3ba98a400cd797c540baa9f40be1.zip
tools/kernel2minor: fix permissions of created files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--tools/kernel2minor/patches/120-fix_create_mode.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/kernel2minor/patches/120-fix_create_mode.patch b/tools/kernel2minor/patches/120-fix_create_mode.patch
new file mode 100644
index 0000000000..8fa87078e1
--- /dev/null
+++ b/tools/kernel2minor/patches/120-fix_create_mode.patch
@@ -0,0 +1,11 @@
+--- a/kernel2minor.c
++++ b/kernel2minor.c
+@@ -622,7 +622,7 @@ int main(int argc, char *argv[]){
+ perror("Can't open kernel file");
+ exit(-1);
+ }
+- r = creat(res_file, 0);
++ r = open(res_file, O_CREAT | O_TRUNC | O_WRONLY, 0644);
+ if(r <= 0){
+ perror("Can't create result file");
+ close(k);