From: Christian Grothoff Date: Wed, 25 Jan 2012 23:03:10 +0000 (+0000) Subject: -allow binaries without SUID if we are root X-Git-Tag: initial-import-from-subversion-38251~15088 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=984cd842482b352da2969233f134b8c8ee565b71;p=oweals%2Fgnunet.git -allow binaries without SUID if we are root --- diff --git a/src/util/os_installation.c b/src/util/os_installation.c index ee4257ca5..ddd40fc00 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -494,6 +494,12 @@ GNUNET_OS_check_helper_binary (const char *binary) GNUNET_free (p); return GNUNET_SYSERR; } + if (0 == getuid ()) + { + /* as we run as root, we don't insist on SUID */ + GNUNET_free (p); + return GNUNET_OK; + } if (0 != STAT (p, &statbuf)) { LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p, @@ -507,8 +513,9 @@ GNUNET_OS_check_helper_binary (const char *binary) 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);