Skip to content

Commit

Permalink
Write key file if filesystem does not support hard links
Browse files Browse the repository at this point in the history
Fixes #344
  • Loading branch information
elijahr authored Feb 13, 2025
1 parent 24deac1 commit 53d7b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gensignkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 53d7b11

Please sign in to comment.