From 1482b9bfb0fc33160fc833326acba1b932e381a3 Mon Sep 17 00:00:00 2001 From: elijahr Date: Thu, 13 Feb 2025 13:38:00 -0600 Subject: [PATCH] Write key file if filesystem does not support hard links Fixes #344 --- src/gensignkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gensignkey.c b/src/gensignkey.c index cfe0a800a..295211db7 100644 --- a/src/gensignkey.c +++ b/src/gensignkey.c @@ -161,7 +161,7 @@ int signkey_generate(enum signkey_type keytype, int bits, const char* filename, /* If generating keys on connection (skipexist) it's OK to get EEXIST - we probably just lost a race with another connection to generate the key */ if (!(skip_exist && errno == EEXIST)) { - if (errno == EPERM || errno == EACCES) { + if (errno == EPERM || errno == EACCES || errno == ENOSYS) { /* Non-atomic fallback when hard-links not allowed or unsupported */ buf_setpos(buf, 0); ret = buf_writefile(buf, filename, skip_exist);