Added tmp check to TMP_OPT section (how apropriate).
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
5982849325
commit
20c131cf67
|
@ -3,6 +3,7 @@ CVS code -
|
||||||
write_file()
|
write_file()
|
||||||
- Added O_EXCL to open call if tmp is set, more security which hopefully
|
- Added O_EXCL to open call if tmp is set, more security which hopefully
|
||||||
fixes any remaining security issues.
|
fixes any remaining security issues.
|
||||||
|
- Added tmp check to TMP_OPT section (how apropriate).
|
||||||
|
|
||||||
nano 0.9.22 - 12/02/2000
|
nano 0.9.22 - 12/02/2000
|
||||||
- General
|
- General
|
||||||
|
|
2
files.c
2
files.c
|
@ -346,7 +346,7 @@ int write_file(char *name, int tmp)
|
||||||
S_IWOTH);
|
S_IWOTH);
|
||||||
/* Open the file and truncate it. Trust the symlink. */
|
/* Open the file and truncate it. Trust the symlink. */
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
if (ISSET(TEMP_OPT)) {
|
if (!tmp && ISSET(TEMP_OPT)) {
|
||||||
UNSET(TEMP_OPT);
|
UNSET(TEMP_OPT);
|
||||||
return do_writeout(1);
|
return do_writeout(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue