File: portability_open

package info (click to toggle)
ifmail 2.14tx8.10-26
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,908 kB
  • sloc: ansic: 30,320; perl: 4,955; yacc: 838; makefile: 717; sh: 424; cpp: 235; lex: 206; awk: 24
file content (15 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Subject: Missing mode to open() call with O_CREAT
Author: James Westby <james.westby@canonical.com>
Bug-Debian: http://bugs.debian.org/507044

--- a/ifgate/flock.c
+++ b/ifgate/flock.c
@@ -15,7 +15,7 @@ char *fn;
 
 	if (fn)
 	{
-		if ((lfd=open(fn,O_RDWR | O_CREAT)) < 0)
+		if ((lfd=open(fn,O_RDWR | O_CREAT,0600)) < 0)
 		{
 			logerr("$Error opening file %s",fn);
 			return -1;