diff options
Diffstat (limited to 'app-editors/nano/files/nano-2.1.4-open-mode.patch')
-rw-r--r-- | app-editors/nano/files/nano-2.1.4-open-mode.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app-editors/nano/files/nano-2.1.4-open-mode.patch b/app-editors/nano/files/nano-2.1.4-open-mode.patch new file mode 100644 index 000000000000..60ce7dba94ee --- /dev/null +++ b/app-editors/nano/files/nano-2.1.4-open-mode.patch @@ -0,0 +1,26 @@ +make sure we actually pass a valid mode to open() when creating files + +http://bugs.gentoo.org/232079 + +patch by Magnus Granberg + +--- nano-2.1.1/src/files.c ++++ nano-2.1.1/src/files.c +@@ -1572,7 +1572,7 @@ + } + + if (f_open == NULL) { +- fd_source = open(realname, O_RDONLY | O_CREAT); ++ fd_source = open(realname, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR); + + if (fd_source != -1) { + f_source = fdopen(fd_source, "rb"); +@@ -1691,7 +1691,7 @@ + int fd_source; + FILE *f_source = NULL; + +- fd_source = open(tempname, O_RDONLY | O_CREAT); ++ fd_source = open(tempname, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR); + + if (fd_source != -1) { + f_source = fdopen(fd_source, "rb"); |