Re: "Cannot create temporary command file" error
- From: Jindrich Makovicka <makovick kmlinux fjfi cvut cz>
- To: mc-devel gnome org
- Subject: Re: "Cannot create temporary command file" error
- Date: Mon, 19 May 2003 12:02:22 +0200
aargh :( _here_ is the patch
--
Jindrich Makovicka
Index: utilunix.c
===================================================================
RCS file: /cvs/gnome/mc/src/utilunix.c,v
retrieving revision 1.57
diff -u -b -B -r1.57 utilunix.c
--- utilunix.c 10 Mar 2003 06:52:57 -0000 1.57
+++ utilunix.c 19 May 2003 08:26:04 -0000
@@ -314,8 +314,17 @@
const char *error = NULL;
/* Check if already initialized */
- if (tmpdir)
+ if (tmpdir) {
+ if (lstat (tmpdir, &st) == 0) {
+ /* Sanity check for existing directory */
+ if (S_ISDIR (st.st_mode)
+ && st.st_uid != getuid ()
+ && (st.st_mode & 0777) == 0700)
+ {
return tmpdir;
+ }
+ }
+ }
sys_tmp = getenv ("TMPDIR");
if (!sys_tmp) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]