0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-09-26 02:15:01 +00:00
Files
termux-packages/packages/openssh/ssh-keygen.c.patch
2023-11-23 16:32:34 +02:00

16 lines
639 B
Diff

diff -uNr openssh-portable-V_9_5_P1/ssh-keygen.c openssh-portable-V_9_5_P1.mod/ssh-keygen.c
--- openssh-portable-V_9_5_P1/ssh-keygen.c 2023-10-04 07:34:10.000000000 +0300
+++ openssh-portable-V_9_5_P1.mod/ssh-keygen.c 2023-11-23 16:29:34.274542842 +0200
@@ -1369,7 +1369,11 @@
/* Backup existing file */
if (unlink(old) == -1 && errno != ENOENT)
fatal("unlink %.100s: %s", old, strerror(errno));
+#ifdef __ANDROID__
+ if (rename(identity_file, old) == -1)
+#else
if (link(identity_file, old) == -1)
+#endif
fatal("link %.100s to %.100s: %s", identity_file, old,
strerror(errno));
/* Move new one into place */