~ubuntu-branches/debian/squeeze/nano/squeeze

« back to all changes in this revision

Viewing changes to debian/patches/open_flags.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2008-08-25 17:27:55 UTC
  • mfrom: (13.1.6 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080825172755-f7nqabuhghz16a5u
Tags: 2.0.7-4
* The "Valencia, tenemos la fórmula" release.
* Add patch successful_write_no_free_space.patch to solve an issue
  with nano reporting successful writes on full devices, potentially
  causing files to be zeroed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- nano-2.0.7.orig/src/files.c
 
2
+++ nano-2.0.7/src/files.c
 
3
@@ -1564,7 +1564,8 @@
 
4
        }
 
5
 
 
6
        if (f_open == NULL) {
 
7
-           fd_source = open(realname, O_RDONLY | O_CREAT);
 
8
+           fd_source = open(realname, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR |
 
9
+               S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
 
10
 
 
11
            if (fd_source != -1) {
 
12
                f_source = fdopen(fd_source, "rb");
 
13
@@ -1683,7 +1684,7 @@
 
14
        int fd_source;
 
15
        FILE *f_source = NULL;
 
16
 
 
17
-       fd_source = open(tempname, O_RDONLY | O_CREAT);
 
18
+       fd_source = open(tempname, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR);
 
19
 
 
20
        if (fd_source != -1) {
 
21
            f_source = fdopen(fd_source, "rb");