aboutsummaryrefslogtreecommitdiffstats
path: root/local.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2007-05-23 15:06:05 +0000
committerDai Sato <satodai@w3m.jp>2007-05-23 15:06:05 +0000
commit3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a (patch)
tree3aa5dcb2c9d7db6bc81a56a82c160e5a93173071 /local.c
parentfix comments. (diff)
downloadw3m-3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a.tar.gz
w3m-3c7e9b27c1db068e9b29e5ffa3a74dea449a0c9a.zip
[w3m-dev 04155] fix for minpw.
Diffstat (limited to 'local.c')
-rw-r--r--local.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/local.c b/local.c
index d7cd3f0..f5a73a2 100644
--- a/local.c
+++ b/local.c
@@ -1,4 +1,4 @@
-/* $Id: local.c,v 1.34 2007/04/19 12:07:04 inu Exp $ */
+/* $Id: local.c,v 1.35 2007/05/23 15:06:05 inu Exp $ */
#include "fm.h"
#include <string.h>
#include <stdio.h>
@@ -16,6 +16,10 @@
#include "local.h"
#include "hash.h"
+#ifdef __MINGW32_VERSION
+#include <winsock.h>
+#endif
+
#define CGIFN_NORMAL 0
#define CGIFN_LIBDIR 1
#define CGIFN_CGIBIN 2
@@ -194,8 +198,10 @@ check_local_cgi(char *file, int status)
return -1;
if (S_ISDIR(st.st_mode))
return -1;
+#ifndef __MINGW32_VERSION
if ((st.st_uid == geteuid() && (st.st_mode & S_IXUSR)) || (st.st_gid == getegid() && (st.st_mode & S_IXGRP)) || (st.st_mode & S_IXOTH)) /* executable */
return 0;
+#endif
return -1;
}
@@ -354,6 +360,9 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
pid_t pid;
char *file = uri, *name = uri, *path_info = NULL, *tmpf = NULL;
+#ifdef __MINGW32_VERSION
+ return NULL;
+#else
status = cgi_filename(uri, &file, &name, &path_info);
if (check_local_cgi(file, status) < 0)
return NULL;
@@ -413,4 +422,5 @@ localcgi_post(char *uri, char *qstr, FormList *request, char *referer)
file, mybasename(file), strerror(errno));
exit(1);
return NULL;
+#endif
}