From: Christian Grothoff Date: Wed, 25 Jan 2012 20:05:32 +0000 (+0000) Subject: -always check that WE can execute X-Git-Tag: initial-import-from-subversion-38251~15100 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1f1cee05703360688308f3a6cfab40673b891989;p=oweals%2Fgnunet.git -always check that WE can execute --- diff --git a/src/util/os_installation.c b/src/util/os_installation.c index c0b7c8583..ee4257ca5 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c @@ -487,6 +487,13 @@ GNUNET_OS_check_helper_binary (const char *binary) 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; + } if (0 != STAT (p, &statbuf)) { LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p, @@ -500,11 +507,6 @@ GNUNET_OS_check_helper_binary (const char *binary) GNUNET_free (p); return GNUNET_YES; } - if (0 == ACCESS (p, X_OK)) - { - GNUNET_free (p); - return GNUNET_NO; - } GNUNET_free (p); return GNUNET_SYSERR; #else