summaryrefslogtreecommitdiffstats
path: root/utils
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 /utils
parentc58b142265e2472df674eb262b7decc438f6e629 (diff)
downloadanaconda-e1578b893c4a6047d86351112e5482521d1c07de.tar.gz
anaconda-e1578b893c4a6047d86351112e5482521d1c07de.tar.xz
anaconda-e1578b893c4a6047d86351112e5482521d1c07de.zip
* utils/geninitrdsz.c: Create initrd.size file with 0644 permissions
(#197773).
Diffstat (limited to 'utils')
-rw-r--r--utils/geninitrdsz.c4
1 files changed, 2 insertions, 2 deletions
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)");