From a922cb9912935a401c7919be61ca683f751d4821 Mon Sep 17 00:00:00 2001 From: James Martin Date: Wed, 18 May 2022 13:56:58 -0700 Subject: [PATCH] Fixed file permissions for new ELF object files. --- subprojects/blob-object-elf/src/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/subprojects/blob-object-elf/src/main.c b/subprojects/blob-object-elf/src/main.c index 9f65226..17eb0fc 100644 --- a/subprojects/blob-object-elf/src/main.c +++ b/subprojects/blob-object-elf/src/main.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #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,