diff options
| author | Florian Dold <florian.dold@gmail.com> | 2016-04-25 21:17:16 +0200 | 
|---|---|---|
| committer | Florian Dold <florian.dold@gmail.com> | 2016-04-25 21:17:16 +0200 | 
| commit | 5b4d2ed1bed390ebd766ebffc2344cf587e241f6 (patch) | |
| tree | 4bce2fa75481d5980215ab7897a035a402cd4227 /src | |
| parent | 275296311f516d101186f211602b36056f387fa4 (diff) | |
octal
Diffstat (limited to 'src')
| -rw-r--r-- | src/exchange/taler-exchange-httpd.c | 19 | 
1 files changed, 16 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 549d63b2..33367ade 100644 --- 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,  | 
