FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Advisory Board

 
 
LinkBack Thread Tools
 
Old 05-12-2010, 03:05 PM
David Cantrell
 
Default Set permissions on initrd.addrsize to 0644 (#591455)

---
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
");
@@ -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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-12-2010, 06:35 PM
Hans de Goede
 
Default Set permissions on initrd.addrsize to 0644 (#591455)

ack.

On 05/12/2010 05:05 PM, David Cantrell wrote:

---
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
");
@@ -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) ");


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

Thread Tools




All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org