[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 04/09: fix indentation, typo, improve logging
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 04/09: fix indentation, typo, improve logging |
Date: |
Thu, 23 Feb 2017 23:06:03 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 0945dcf2c250dea65d520ef26f9917e9be3ac4ac
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 23 22:51:25 2017 +0100
fix indentation, typo, improve logging
---
src/util/os_installation.c | 49 ++++++++++++++++++++++++++++++++++------------
1 file changed, 36 insertions(+), 13 deletions(-)
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index ea3ae3e79..b801f4f53 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -823,9 +823,13 @@ GNUNET_OS_check_helper_binary (const char *binary,
#ifdef MINGW
char *binaryexe;
- GNUNET_asprintf (&binaryexe, "%s.exe", binary);
- if ( (GNUNET_YES == GNUNET_STRINGS_path_is_absolute (binaryexe, GNUNET_NO,
- NULL, NULL)) ||
+ GNUNET_asprintf (&binaryexe,
+ "%s.exe",
+ binary);
+ if ( (GNUNET_YES ==
+ GNUNET_STRINGS_path_is_absolute (binaryexe,
+ GNUNET_NO,
+ NULL, NULL)) ||
(0 == strncmp (binary, "./", 2)) )
p = GNUNET_strdup (binaryexe);
else
@@ -840,16 +844,24 @@ GNUNET_OS_check_helper_binary (const char *binary,
}
GNUNET_free (binaryexe);
#else
- if ( (GNUNET_YES == GNUNET_STRINGS_path_is_absolute (binary, GNUNET_NO,
- NULL, NULL)) ||
+ if ( (GNUNET_YES ==
+ GNUNET_STRINGS_path_is_absolute (binary,
+ GNUNET_NO,
+ NULL,
+ NULL)) ||
(0 == strncmp (binary, "./", 2)) )
+ {
p = GNUNET_strdup (binary);
+ }
else
{
p = get_path_from_PATH (binary);
if (NULL != p)
{
- GNUNET_asprintf (&pf, "%s/%s", p, binary);
+ GNUNET_asprintf (&pf,
+ "%s/%s",
+ p,
+ binary);
GNUNET_free (p);
p = pf;
}
@@ -862,9 +874,12 @@ GNUNET_OS_check_helper_binary (const char *binary,
binary);
return GNUNET_SYSERR;
}
- if (0 != ACCESS (p, X_OK))
+ if (0 != ACCESS (p,
+ X_OK))
{
- LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "access", p);
+ LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING,
+ "access",
+ p);
GNUNET_free (p);
return GNUNET_SYSERR;
}
@@ -873,22 +888,30 @@ GNUNET_OS_check_helper_binary (const char *binary,
{
/* as we run as root, we don't insist on SUID */
GNUNET_free (p);
- return GNUNET_OK;
+ return GNUNET_YES;
}
#endif
- if (0 != STAT (p, &statbuf))
+ if (0 != STAT (p,
+ &statbuf))
{
- LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "stat", p);
+ LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING,
+ "stat",
+ p);
GNUNET_free (p);
return GNUNET_SYSERR;
}
- if (check_suid){
+ if (check_suid)
+ {
#ifndef MINGW
- if ((0 != (statbuf.st_mode & S_ISUID)) && (0 == statbuf.st_uid))
+ if ( (0 != (statbuf.st_mode & S_ISUID)) &&
+ (0 == statbuf.st_uid) )
{
GNUNET_free (p);
return GNUNET_YES;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Binary `%s' exists, but is not SUID\n"),
+ p);
/* binary exists, but not SUID */
#else
STARTUPINFO start;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (caf375948 -> e86eed188), gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 02/09: fix typo in example, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 07/09: fix use of uninitialized ID after last refactoring, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 09/09: update .gitignore files, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 03/09: fix indentation, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 06/09: log which name we are resolving, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 04/09: fix indentation, typo, improve logging,
gnunet <=
- [GNUnet-SVN] [gnunet] 05/09: change default port to 53, use setcap to enable binding to low port, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 01/09: fix termination, proper shutdown on CTRL-C, gnunet, 2017/02/23
- [GNUnet-SVN] [gnunet] 08/09: use of dns2gns proxy instead of DNS interceptor in VPN test, gnunet, 2017/02/23