Fixed file permissions for new ELF object files.
parent
ef72003049
commit
a922cb9912
|
@ -7,6 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef align_up
|
||||
|
@ -64,8 +65,13 @@ int main(int argc, char** argv) {
|
|||
|
||||
close(blob_fd);
|
||||
|
||||
// only write is needed, but mmap requires O_RDWR
|
||||
int output_fd = open(output_file_name, O_RDWR | O_CREAT | O_TRUNC);
|
||||
int output_fd =
|
||||
open(
|
||||
output_file_name,
|
||||
// only write is needed, but mmap requires O_RDWR
|
||||
O_RDWR | O_CREAT | O_TRUNC,
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
);
|
||||
if (output_fd < 0) {
|
||||
fprintf(
|
||||
stderr,
|
||||
|
|
Loading…
Reference in New Issue