summaryrefslogtreecommitdiff
blob: 6a6adcdafdca2689d01073ef8f09bd6da6935366 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  * palo/palo.c: Supply a mode to open() to go with the O_CREAT flag.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506083

--- a/palo/palo.c
+++ b/palo/palo.c
@@ -479,7 +479,7 @@
 	    error(14, "bootloader");
 
 	sprintf(badblockfilename, "/tmp/paloblk-%d", getpid());
-	if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC)) < 0) {
+	if ((fd = open(badblockfilename, O_RDWR | O_CREAT | O_TRUNC, 0644)) < 0) {
 	    perror(badblockfilename);
 	    exit(1);
 	}