exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 5b4d2ed1bed390ebd766ebffc2344cf587e241f6
parent 275296311f516d101186f211602b36056f387fa4
Author: Florian Dold <florian.dold@gmail.com>
Date:   Mon, 25 Apr 2016 21:17:16 +0200

octal

Diffstat:
Msrc/exchange/taler-exchange-httpd.c | 19++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c @@ -520,6 +520,7 @@ exchange_serve_process_config () else if (0 == strcmp (serve_type, "unix")) { struct sockaddr_un s_un; + char *modestring; unsigned long long mode; if (GNUNET_OK != @@ -545,10 +546,21 @@ exchange_serve_process_config () } if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, + GNUNET_CONFIGURATION_get_value_string (cfg, "exchange", "unixpath_mode", - &mode)) + &modestring)) + { + GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "unixpath_mode", + "unixpath_mode required"); + TMH_VALIDATION_done (); + return GNUNET_SYSERR; + } + errno = 0; + unixpath_mode = (mode_t) strtoul (modestring, NULL, 8); + if (0 != errno) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, "exchange", @@ -557,7 +569,7 @@ exchange_serve_process_config () TMH_VALIDATION_done (); return GNUNET_SYSERR; } - unixpath_mode = (mode_t) mode; + } else { @@ -803,6 +815,7 @@ main (int argc, fprintf (stderr, "chmod failed: %s\n", strerror (errno)); return 1; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "set socket '%s' to mode %o", unixpath, unixpath_mode); mydaemon = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, 0,