summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-09-22 14:32:50 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-09-22 14:32:50 +0000
commite1578b893c4a6047d86351112e5482521d1c07de (patch)
treed30571606dcf730d839c3135b338a3e48ce05234
parentc58b142265e2472df674eb262b7decc438f6e629 (diff)
downloadanaconda-e1578b893c4a6047d86351112e5482521d1c07de.tar.gz
anaconda-e1578b893c4a6047d86351112e5482521d1c07de.tar.xz
anaconda-e1578b893c4a6047d86351112e5482521d1c07de.zip
* utils/geninitrdsz.c: Create initrd.size file with 0644 permissions
(#197773).
-rw-r--r--ChangeLog3
-rw-r--r--utils/geninitrdsz.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cff50c616..67a36950b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
IPv6 but uncheck IPv4 and the edit dialog enables and disables the
wrong widgets.
+ * utils/geninitrdsz.c: Create initrd.size file with 0644 permissions
+ (#197773).
+
2006-09-22 Bill Nottingham <notting@redhat.com>
* loader2/firewire.c: firewire devices never have ->device
diff --git a/utils/geninitrdsz.c b/utils/geninitrdsz.c
index 5b8b8048e..01d1cf135 100644
--- a/utils/geninitrdsz.c
+++ b/utils/geninitrdsz.c
@@ -20,6 +20,7 @@ int main(int argc,char **argv) {
unsigned int zero = 0;
int fd;
unsigned int size;
+ mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH;
if (argc != 3) {
printf("Usage: %s [integer size] [output file]\n", basename(argv[0]));
@@ -28,8 +29,7 @@ int main(int argc,char **argv) {
}
size = htonl(atoi(argv[1]));
-
- fd = open(argv[2], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
+ fd = open(argv[2], O_CREAT | O_RDWR, mode);
if (write(fd, &zero, sizeof(int)) == -1) {
perror("writing initrd.size (zero)");