diff options
author | Florian Dold <florian@dold.me> | 2021-08-04 20:54:03 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-08-04 20:54:45 +0200 |
commit | 4baecd4856460a73eb2f0090dfbbe4719972f0c9 (patch) | |
tree | 591e8ee6d2e0ca9501ec5a5191043eda45b58932 /src/util/crypto_helper_esign.c | |
parent | 21f3412ac7347e1252a4bbf228d81b4b5753c6cc (diff) |
call chmod on path, not on whole sock addr
Diffstat (limited to 'src/util/crypto_helper_esign.c')
-rw-r--r-- | src/util/crypto_helper_esign.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/crypto_helper_esign.c b/src/util/crypto_helper_esign.c index 1234ba4a5..2c51187d0 100644 --- a/src/util/crypto_helper_esign.c +++ b/src/util/crypto_helper_esign.c @@ -146,12 +146,12 @@ try_connect (struct TALER_CRYPTO_ExchangeSignHelper *esh) /* Fix permissions on client UNIX domain socket, just in case umask() is not set to enable group write */ { - char path[sizeof (esh->my_sa) + 1]; + char path[sizeof (esh->sa.sun_path) + 1]; strncpy (path, - (const char *) &esh->my_sa, - sizeof (esh->my_sa)); - path[sizeof (esh->my_sa)] = '\0'; + esh->my_sa.sun_path, + sizeof (esh->my_sa.sun_path)); + path[sizeof (esh->my_sa.sun_path)] = '\0'; if (0 != chmod (path, S_IRUSR | S_IWUSR | S_IWGRP)) |