projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ada56a8
)
-allow binaries without SUID if we are root
author
Christian Grothoff
<christian@grothoff.org>
Wed, 25 Jan 2012 23:03:10 +0000
(23:03 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 25 Jan 2012 23:03:10 +0000
(23:03 +0000)
src/util/os_installation.c
patch
|
blob
|
history
diff --git
a/src/util/os_installation.c
b/src/util/os_installation.c
index ee4257ca5b931fcf77c0ce3d9064c67a57487665..ddd40fc00a95ba26282cc35f3629058d3efa7e6d 100644
(file)
--- 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);