tools/kernel2minor: fix permissions of created files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
188626f17c
commit
b9857b21c2
1 changed files with 11 additions and 0 deletions
11
tools/kernel2minor/patches/120-fix_create_mode.patch
Normal file
11
tools/kernel2minor/patches/120-fix_create_mode.patch
Normal file
|
@ -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);
|
Loading…
Reference in a new issue