diff options
author | Florian Dold <florian@dold.me> | 2021-07-29 13:04:55 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-07-29 13:04:55 +0200 |
commit | 036d4cb71ac1abe1990c936ee1f3b2cbf15d14c1 (patch) | |
tree | 5af2eb2adb5d6a71746b1781920cacc0ed30e5c6 /src/util/crypto_helper_denom.c | |
parent | dae09f1a43b58778b01f4bb436504ee2fe8f5357 (diff) |
secmod: services create their own client dirs with correct permissions
Diffstat (limited to 'src/util/crypto_helper_denom.c')
-rw-r--r-- | src/util/crypto_helper_denom.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c index bd9802d2f..2cc140c8e 100644 --- a/src/util/crypto_helper_denom.c +++ b/src/util/crypto_helper_denom.c @@ -228,29 +228,32 @@ TALER_CRYPTO_helper_denom_connect ( if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, - "PATHS", - "TALER_RUNTIME_DIR", + "taler-exchange-secmod-rsa", + "CLIENT_DIR", &tmpdir)) { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, - "PATHS", - "TALER_RUNTIME_DIR"); - tmpdir = GNUNET_strdup ("/tmp"); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "taler-exchange-secmod-rsa", + "CLIENT_DIR"); + return NULL; } GNUNET_asprintf (&template, - "%s/crypto-rsa-client/cli", + "%s/cli", tmpdir); - GNUNET_free (tmpdir); + /* We expect the service to create the client directory */ if (GNUNET_OK != - GNUNET_DISK_directory_create_for_file (template)) + GNUNET_DISK_directory_test (tmpdir, + GNUNET_YES)) { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, - "mkdir", - template); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unable to read secmod client directory (%s)\n", + tmpdir); GNUNET_free (dh); GNUNET_free (template); + GNUNET_free (tmpdir); return NULL; } + GNUNET_free (tmpdir); dh->template = template; if (strlen (template) >= sizeof (dh->sa.sun_path)) { |