[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13036 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13036 - gnunet/src/transport |
Date: |
Tue, 21 Sep 2010 09:45:55 +0200 |
Author: grothoff
Date: 2010-09-21 09:45:55 +0200 (Tue, 21 Sep 2010)
New Revision: 13036
Modified:
gnunet/src/transport/plugin_transport_tcp.c
Log:
no SUID on W32
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2010-09-20 14:26:46 UTC (rev
13035)
+++ gnunet/src/transport/plugin_transport_tcp.c 2010-09-21 07:45:55 UTC (rev
13036)
@@ -2277,6 +2277,9 @@
{
struct stat statbuf;
char *p;
+#ifdef MINGW
+ SOCKET rawsock;
+#endif
p = get_path_from_PATH (binary);
if (p == NULL)
@@ -2287,10 +2290,18 @@
return GNUNET_SYSERR;
}
GNUNET_free (p);
+#ifndef MINGW
if ( (0 != (statbuf.st_mode & S_ISUID)) &&
(statbuf.st_uid == 0) )
return GNUNET_YES;
return GNUNET_NO;
+#else
+ rawsock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);
+ if (INVALID_SOCKET == rawsock)
+ return GNUNET_NO; /* not running as administrator */
+ closesocket (rawsock);
+ return GNUNET_YES;
+#endif
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13036 - gnunet/src/transport,
gnunet <=