nano/nano-2.0.6-open-macro.patch

21 lines
683 B
Diff
Raw Normal View History

2007-08-22 17:53:29 +00:00
--- nano-2.0.6/src/files.c~ 2007-04-21 21:33:56.000000000 +0100
+++ nano-2.0.6/src/files.c 2007-08-22 18:52:11.000000000 +0100
@@ -1518,7 +1518,7 @@ bool write_file(const char *name, FILE *
}
if (f_open == NULL) {
- fd_source = open(realname, O_RDONLY | O_CREAT);
+ fd_source = open(realname, O_RDONLY | O_CREAT, 0600);
if (fd_source != -1) {
f_source = fdopen(fd_source, "rb");
@@ -1637,7 +1637,7 @@ bool write_file(const char *name, FILE *
int fd_source;
FILE *f_source = NULL;
- fd_source = open(tempname, O_RDONLY | O_CREAT);
+ fd_source = open(tempname, O_RDONLY | O_CREAT, 0600);
if (fd_source != -1) {
f_source = fdopen(fd_source, "rb");