mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* utilunix.c (mc_tmpdir): Check that tmpdir is correctly initialized.
This commit is contained in:
parent
3b40737834
commit
772c2600b9
@ -1,3 +1,7 @@
|
|||||||
|
2005-07-27 Adam Byrtek <alpha@debian.org>
|
||||||
|
|
||||||
|
* utilunix.c (mc_tmpdir): Check that tmpdir is correctly initialized.
|
||||||
|
|
||||||
2005-07-24 Leonard den Ottolander <leonard den ottolander nl>
|
2005-07-24 Leonard den Ottolander <leonard den ottolander nl>
|
||||||
|
|
||||||
* wtools.h: #include "widget.h" and remove redundant declarations
|
* wtools.h: #include "widget.h" and remove redundant declarations
|
||||||
|
@ -240,8 +240,9 @@ mc_tmpdir (void)
|
|||||||
struct stat st;
|
struct stat st;
|
||||||
const char *error = NULL;
|
const char *error = NULL;
|
||||||
|
|
||||||
/* Check if already initialized */
|
/* Check if already correctly initialized */
|
||||||
if (tmpdir)
|
if (tmpdir && lstat (tmpdir, &st) == 0 && S_ISDIR (st.st_mode) &&
|
||||||
|
st.st_uid == getuid () && (st.st_mode & 0777) == 0700)
|
||||||
return tmpdir;
|
return tmpdir;
|
||||||
|
|
||||||
sys_tmp = getenv ("TMPDIR");
|
sys_tmp = getenv ("TMPDIR");
|
||||||
|
Loading…
Reference in New Issue
Block a user