gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r26781 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r26781 - gnunet/src/util
Date: Fri, 5 Apr 2013 16:10:05 +0200

Author: cfuchs
Date: 2013-04-05 16:10:05 +0200 (Fri, 05 Apr 2013)
New Revision: 26781

Modified:
   gnunet/src/util/os_installation.c
Log:
removed raw-pipe checking code for windows. this will always fail new 
windows. functionality will be replaced with windows-dryrun checking


Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c   2013-04-05 14:08:52 UTC (rev 26780)
+++ gnunet/src/util/os_installation.c   2013-04-05 14:10:05 UTC (rev 26781)
@@ -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 @@
   char *p;
   char *pf;
 #ifdef MINGW
-  SOCKET rawsock;
   char *binaryexe;
 
   GNUNET_asprintf (&binaryexe, "%s.exe", binary);
@@ -730,33 +732,19 @@
     return GNUNET_YES;
   }
   /* binary exists, but not SUID */
+#else
+  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;
-#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;
-  }
-#endif
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]