summaryrefslogtreecommitdiff
blob: 30ec6c96e5d758fb802d07562f8a8e5a54dc0ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
Subject: Provide the required third argument to open() when O_CREAT is
	in the second argument.
Date: 2011/04/28

--- a/src/s_serv.c
+++ b/src/s_serv.c
@@ -4603,7 +4603,7 @@
 
 #else /*  LOCKFILE - MDP */
 
-  if ((out = open (filename, O_RDWR | O_APPEND | O_CREAT)) == -1)
+  if ((out = open (filename, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
   {
     sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                 me.name, parv[0], filename);
@@ -7397,7 +7397,7 @@
     syslog (LOG_INFO, "ADDCNLINE from %s for [%s] - Opening %s\n",
             get_client_name (source_p, FALSE), parv[3], configfile);
 #endif
-    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
+    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
     {
       sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                   me.name, parv[0], configfile);
@@ -7770,7 +7770,7 @@
     syslog (LOG_INFO, "ADDOPER from %s for [%s] - Opening %s\n",
             get_client_name (source_p, FALSE), parv[3], configfile);
 #endif
-    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
+    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
     {
       sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                   me.name, parv[0], configfile);
@@ -8090,7 +8090,7 @@
     syslog (LOG_INFO, "ADDQLINE from %s for [%s] - Opening %s\n",
             get_client_name (source_p, FALSE), parv[1], configfile);
 #endif
-    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
+    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
     {
       sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                   me.name, parv[0], configfile);
@@ -8379,7 +8379,7 @@
     syslog (LOG_INFO, "ADDHLINE from %s for [%s] - Opening %s\n",
             get_client_name (source_p, FALSE), parv[1], configfile);
 #endif
-    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
+    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
     {
       sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                   me.name, parv[0], configfile);
@@ -8663,7 +8663,7 @@
     syslog (LOG_INFO, "ADDULINE from %s for [%s] - Opening %s\n",
             get_client_name (source_p, FALSE), parv[1], configfile);
 #endif
-    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT)) == -1)
+    if ((out = open (configfile, O_RDWR | O_APPEND | O_CREAT, 0600)) == -1)
     {
       sendto_one (source_p, ":%s NOTICE %s :Problem opening %s ",
                   me.name, parv[0], configfile);

Diff finished.  Thu Apr 28 00:15:19 2011