diff options
author | 2008-08-16 14:45:35 +0000 | |
---|---|---|
committer | 2008-08-16 14:45:35 +0000 | |
commit | 6000e57278e4267a6ce39e433126dd4014d84ea8 (patch) | |
tree | d10425e4a8f54d68eb2c276b3db5f718df4c143b /app-editors/nano/files | |
parent | old (diff) | |
download | historical-6000e57278e4267a6ce39e433126dd4014d84ea8.tar.gz historical-6000e57278e4267a6ce39e433126dd4014d84ea8.tar.bz2 historical-6000e57278e4267a6ce39e433126dd4014d84ea8.zip |
Version bump and fix by Magnus Granberg for open(O_CREAT) bug #232079.
Package-Manager: portage-2.2_rc6/cvs/Linux 2.6.26.1 x86_64
Diffstat (limited to 'app-editors/nano/files')
-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"); |