1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00
elinks/src/util
Miciah Dashiel Butler Masters 40f5e23fb0 Secure file saving: restore umask after _all_ failure conditions
The secure file saving code plays some shenanigans with the umask.
Previously, the code could fail to restore the old umask when certain libc
calls failed: malloc, mkstemp, fdopen, and fopen. This resulted in
unrelated code creating files with the wrong umode. Specifically, the
download code's automatic directory creation was creating directories
without the execute permission bit.

Thanks to Quiznos for reporting and helping to track the problem down.

[ Backported from commit 7f0fb0440c in
  ELinks 0.12.GIT.  The general download code in 0.11.2.GIT does not
  automatically create directories but the BitTorrent code does.  --KON ]
2007-04-06 15:18:49 +03:00
..
align.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
base64.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
base64.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
bitfield.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
box.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
color_s.inc Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
color.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
color.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
color.inc Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
conv.c add_html_to_string: If out of memory, roll back and return NULL. 2007-03-18 12:38:19 +02:00
conv.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
env.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
env.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
error.c Add missing b flag to fopen() call. 2006-01-10 14:01:46 +01:00
error.h Fix typo 2006-01-29 10:25:18 +01:00
fastfind.c Fix various sparse warnings 2005-11-24 15:38:47 +01:00
fastfind.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
file.c Revert 06eb3fa02abf12c6d2352af4288a6ad465a0e8c1 (in the historic repo) 2006-01-29 12:28:43 +01:00
file.h Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
hash.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
hash.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
lists.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
Makefile path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
math.h Don't include <sys/param.h> in util/math for MAX/MIN 2006-01-10 16:06:09 +01:00
md5.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
md5.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
memdebug.c set_mem_comment(): Use memcpy() + NUL assignment instead of safe_strncpy() 2005-12-28 23:06:23 +01:00
memdebug.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
memlist.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
memlist.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
memory.c Bug 919, mem_mmap_realloc: Don't overflow the buffer when shrinking it. 2007-01-02 20:43:58 +02:00
memory.h Add memory-leak tracing to intdup. 2005-12-26 11:22:05 +00:00
profile.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
scanner.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
scanner.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
secsave.c Secure file saving: restore umask after _all_ failure conditions 2007-04-06 15:18:49 +03:00
secsave.h Simplify secure_open() call, make it a wrapper around secure_open_umask(). 2006-01-29 10:02:46 +01:00
sha1.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
sha1.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
snprintf.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
snprintf.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
string.c add_string_to_string: Don't fail if @from is empty. 2007-03-18 21:18:02 +02:00
string.h Add routine add_file_to_string and use it in load_textarea_file. 2005-12-18 15:56:59 +00:00
time.c Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
time.h Include <sys/types.h> and fix compilation on an old PPC/Debian system 2006-11-27 17:38:00 +01:00