tools/mkimage: create .itb file with read-access for group,other not just owner. mkimage-perms
authorTed Hess <thess@kitschensync.net>
Thu, 23 Jul 2020 18:07:16 +0000 (14:07 -0400)
committerTed Hess <thess@kitschensync.net>
Thu, 23 Jul 2020 18:14:44 +0000 (14:14 -0400)
This patch will fix the source of 403 errors on these files
from downloads.openwrt.org.

Signed-off-by: Ted Hess <thess@kitschensync.net>
tools/mkimage/patches/020-fix-file-creation-perms.patch [new file with mode: 0644]

diff --git a/tools/mkimage/patches/020-fix-file-creation-perms.patch b/tools/mkimage/patches/020-fix-file-creation-perms.patch
new file mode 100644 (file)
index 0000000..80cda28
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/tools/fit_image.c
++++ b/tools/fit_image.c
+@@ -642,7 +642,7 @@ static int copyfile(const char *src, con
+               goto out;
+       }
+-      fd_dst = open(dst, O_WRONLY | O_CREAT, 0700);
++      fd_dst = open(dst, O_WRONLY | O_CREAT, 0744);
+       if (fd_dst < 0) {
+               printf("Can't open file %s (%s)\n", dst, strerror(errno));
+               goto out;