binary);
return GNUNET_SYSERR;
}
+ if (0 != ACCESS (p, X_OK))
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING, _("access (%s, X_OK) failed: %s\n"), p,
+ STRERROR (errno));
+ GNUNET_free (p);
+ return GNUNET_SYSERR;
+ }
+#ifndef MINGW
+ if (0 == getuid ())
+ {
+ /* as we run as root, we don't insist on SUID */
+ GNUNET_free (p);
+ return GNUNET_OK;
+ }
+#endif
if (0 != STAT (p, &statbuf))
{
LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p,
GNUNET_free (p);
return GNUNET_YES;
}
- if (0 == ACCESS (p, X_OK))
- {
- GNUNET_free (p);
- return GNUNET_NO;
- }
+ /* binary exists, but not SUID */
GNUNET_free (p);
- return GNUNET_SYSERR;
+ return GNUNET_NO;
#else
GNUNET_free (p);
rawsock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP);