[PATCH] Set permissions on initrd.addrsize to 0644 (#591455)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 utils/addrsize.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/utils/addrsize.c b/utils/addrsize.c
index 701ebcd..5933a00 100644
--- a/utils/addrsize.c
+++ b/utils/addrsize.c
@@ -40,6 +40,7 @@ int main(int argc,char **argv) {
     unsigned int addr = 0, size = 0, zero = 0;
     int fd, rc;
     char *tmp = NULL;
+    mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH;
 
     if (argc != 4) {
         printf("Generate initrd address and size file used by the .ins LPAR load mechanism\n");
@@ -60,7 +61,7 @@ int main(int argc,char **argv) {
 
     addr = htonl(strtoul(address, &tmp, 0));
     size = htonl(initrd_stat.st_size);
-    fd = open(output, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
+    fd = open(output, O_CREAT | O_RDWR, mode);
 
     if (write(fd, &zero, sizeof(int)) == -1) {
         perror("writing initrd.addr (zero) ");
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux