diff options
Diffstat (limited to 'src/util/crypto_helper_denom.c')
-rw-r--r-- | src/util/crypto_helper_denom.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c index 243dd296..f154bd3e 100644 --- a/src/util/crypto_helper_denom.c +++ b/src/util/crypto_helper_denom.c @@ -152,12 +152,21 @@ try_connect (struct TALER_CRYPTO_DenominationHelper *dh) sizeof (dh->my_sa)); path[sizeof (dh->my_sa)] = '\0'; - if (0 != chmod (path, - S_IRUSR | S_IWUSR | S_IWGRP)) { - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, - "chmod", - path); + char path[sizeof (dh->sa.sun_path) + 1]; + + strncpy (path, + dh->my_sa.sun_path, + sizeof (dh->my_sa.sun_path)); + path[sizeof (dh->my_sa.sun_path)] = '\0'; + + if (0 != chmod (path, + S_IRUSR | S_IWUSR | S_IWGRP)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, + "chmod", + path); + } } } GNUNET_free (tmpdir); |