while (NULL != fgets (line, sizeof (line), f))
{
if ((1 ==
- sscanf (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
+ SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
(NULL != (lgu = strstr (dir, "libgnunetutil"))))
{
lgu[0] = '\0';
GNUNET_free (p);
p = pf;
}
- free (binaryexe);
+ GNUNET_free (binaryexe);
#else
p = get_path_from_PATH (binary);
if (p != NULL)
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;
}
+ /* 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);