mkimage: fit: don't create image with 0700 permissions
PATCH 1/1 mkimage: fit: don't create image with 0700 permissions
commit 7298e422504e ("mkimage: fit: add support to encrypt image with aes") added a new copyfile() function as part of the FIT image creation flow. This function as currently written creates the final image with a mode of 0700 (before umask), differing from the old behavior of 0666. Since there doesn't seem to be any reason to make the image executable or non-group, non-other readable, change the mask to 0666 to preserve the old behavior.
---
tools/fit_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/fit_image.c +1 -1
@@ -642,7 +642,7 @@ static int copyfile(const char *src, const char *dst) goto out; } - fd_dst =open (dst,O_WRONLY |O_CREAT ,0700 ); + fd_dst =open (dst,O_WRONLY |O_CREAT ,0666 );if (fd_dst <0 ) {printf ("Can't open file %s (%s)\n" , dst,strerror (errno)); goto out;
Signature · 1 line
2.25.0
PATCH 1/1 mkimage: fit: don't create image with 0700 permissions
Quoted 10 lines · Thomas Hebb
commit
7298e422504e("mkimage: fit: add support to encrypt image with aes") added a newcopyfile()function as part of the FIT image creation flow. This function as currently written creates the final image with a mode of 0700 (before umask), differing from the old behavior of 0666. Since there doesn't seem to be any reason to make the image executable or non-group, non-other readable, change the mask to 0666 to preserve the old behavior.Fixes 7298e422504e ("mkimage: fit: add support to encrypt image with aes")Signed-off-by Thomas Hebb <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200421/e987048e/attachment.sig>