diff options
author | Chris Lumens <clumens@redhat.com> | 2007-08-02 21:06:13 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-08-02 21:06:13 +0000 |
commit | 774a5c9cd5a8c63bcb30024b19b39d2a670149a1 (patch) | |
tree | a833947cabbf7bf832ae7bf6edd49de5057d6220 | |
parent | 09b0588d4cc9c39ae177a689966e0cc7824262dc (diff) | |
download | anaconda-774a5c9cd5a8c63bcb30024b19b39d2a670149a1.tar.gz anaconda-774a5c9cd5a8c63bcb30024b19b39d2a670149a1.tar.xz anaconda-774a5c9cd5a8c63bcb30024b19b39d2a670149a1.zip |
Add a mode when creating a new file.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | loader2/fwloader.c | 2 | ||||
-rw-r--r-- | loader2/init.c | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -7,6 +7,9 @@ * autopart.py (doAutoPartition): Don't take into consideration drives that have been removed from the diskset (#250148). + * loader2/init.c (main): Add a mode when creating a new file. + * loader2/fwloader.c (load_firmware): Likewise. + 2007-08-01 Chris Lumens <clumens@redhat.com> * flags.py (Flags): Add a livecd install flag so we can tell that's diff --git a/loader2/fwloader.c b/loader2/fwloader.c index 84c124e96..170174604 100644 --- a/loader2/fwloader.c +++ b/loader2/fwloader.c @@ -451,7 +451,7 @@ static void load_firmware(struct fw_loader *fwl, struct uevent *uevent) if (!(tempfile = tempnam("/tmp/", "fw-"))) return; - if ((fd = open(tempfile, O_RDWR | O_EXCL | O_CREAT)) < 0) { + if ((fd = open(tempfile, O_RDWR | O_EXCL | O_CREAT, 0600)) < 0) { free(tempfile); return; } diff --git a/loader2/init.c b/loader2/init.c index 1b0cb41b9..11c3c5977 100644 --- a/loader2/init.c +++ b/loader2/init.c @@ -719,7 +719,7 @@ int main(int argc, char **argv) { doklog("/dev/tty4"); /* write out a pid file */ - if ((fd = open("/var/run/init.pid", O_WRONLY|O_CREAT)) > 0) { + if ((fd = open("/var/run/init.pid", O_WRONLY|O_CREAT, 0644)) > 0) { char * buf = malloc(10); int ret; |