summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-05 14:10:05 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-05 14:10:05 +0000
commit20b9651856311306abda3619741e28817da3a8d1 (patch)
treeea8dd97b82ba11b933be9bd17fc2a4db17094cf8 /src
parent203c31d7b090fbfec893aa7bc865ebd7ab2631bd (diff)
removed raw-pipe checking code for windows. this will always fail new
windows. functionality will be replaced with windows-dryrun checking
Diffstat (limited to 'src')
-rw-r--r--src/util/os_installation.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index d500580bf..b63a19d2e 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -38,8 +38,11 @@
#if DARWIN
#include <mach-o/ldsyms.h>
#include <mach-o/dyld.h>
+#elif WINDOWS
+#include <windows.h>
#endif
+
#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
#define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename)
@@ -662,7 +665,6 @@ GNUNET_OS_check_helper_binary (const char *binary)
char *p;
char *pf;
#ifdef MINGW
- SOCKET rawsock;
char *binaryexe;
GNUNET_asprintf (&binaryexe, "%s.exe", binary);
@@ -730,33 +732,19 @@ GNUNET_OS_check_helper_binary (const char *binary)
return GNUNET_YES;
}
/* binary exists, but not SUID */
- GNUNET_free (p);
- return GNUNET_NO;
#else
- GNUNET_free (p);
- {
- static int once; /* remember result from previous runs... */
-
- if (0 == once)
- {
- rawsock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
- if (INVALID_SOCKET == rawsock)
- {
- DWORD err = GetLastError ();
-
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "socket (AF_INET, SOCK_RAW, IPPROTO_ICMP) failed! GLE = %d\n", err);
- once = -1;
- return GNUNET_NO; /* not running as administrator */
- }
- once = 1;
- closesocket (rawsock);
- }
- if (-1 == once)
- return GNUNET_NO;
- return GNUNET_YES;
- }
+ return GNUNET_YES;
+ /* FIXME:
+ * no suid for windows possible!
+ * permissions-checking is too specific(as in non-portable)
+ * user/group checking is pointless (users/applications can drop privileges)
+ * using token checking for elevated permissions would limit gnunet
+ * to run only on winserver 2008 and 2012!
+ *
+ * thus, ad add "dryrun" checking */
#endif
+ GNUNET_free (p);
+ return GNUNET_NO;
}