Gentoo Archives: gentoo-commits

From: "Steve Arnold (nerdboy)" <nerdboy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/grass/files: grass-6.3.0-o_creat.patch
Date: Mon, 23 Mar 2009 03:51:44
Message-Id: E1LlbCQ-0007HL-FQ@stork.gentoo.org
1 nerdboy 09/03/23 03:51:42
2
3 Added: grass-6.3.0-o_creat.patch
4 Log:
5 Updated with fix for fortify_source error and buffer size.
6 (Portage version: 2.2_rc25/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-geosciences/grass/files/grass-6.3.0-o_creat.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/files/grass-6.3.0-o_creat.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-geosciences/grass/files/grass-6.3.0-o_creat.patch?rev=1.1&content-type=text/plain
13
14 Index: grass-6.3.0-o_creat.patch
15 ===================================================================
16 open with O_CREAT in second argument needs 3 arguments.
17 2009-03-05 Martin von Gagern
18 Reference: https://bugs.gentoo.org/261283
19
20 Index: grass-6.3.0/raster/r.drain/main.c
21 ===================================================================
22 --- grass-6.3.0.orig/raster/r.drain/main.c
23 +++ grass-6.3.0/raster/r.drain/main.c
24 @@ -296,8 +296,8 @@ int main(int argc, char **argv)
25 tempfile1 = G_tempfile();
26 tempfile2 = G_tempfile();
27
28 - fe = open(tempfile1, O_RDWR | O_CREAT);
29 - fd = open(tempfile2, O_RDWR | O_CREAT);
30 + fe = open(tempfile1, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
31 + fd = open(tempfile2, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
32
33 /* transfer the input map to a temp file */
34 for (i = 0; i < nrows; i++) {
35 Index: grass-6.3.0/raster/r.fill.dir/main.c
36 ===================================================================
37 --- grass-6.3.0.orig/raster/r.fill.dir/main.c
38 +++ grass-6.3.0/raster/r.fill.dir/main.c
39 @@ -196,9 +196,9 @@ main(int argc, char **argv)
40 tempfile2 = G_tempfile();
41 tempfile3 = G_tempfile();
42
43 - fe=open(tempfile1,O_RDWR|O_CREAT); /* elev */
44 - fd=open(tempfile2,O_RDWR|O_CREAT); /* dirn */
45 - fm=open(tempfile3,O_RDWR|O_CREAT); /* problems */
46 + fe=open(tempfile1,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* elev */
47 + fd=open(tempfile2,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* dirn */
48 + fm=open(tempfile3,O_RDWR|O_CREAT, S_IRUSR|S_IWUSR); /* problems */
49
50 G_message(_("Reading map..."));
51 for(i=0;i<nrows;i++)