search for: 94665b0ab

Displaying 1 result from an estimated 1 matches for "94665b0ab".

2025 Jan 06
1
ssh-keygen: error if file is directory
...alar Nosrati-Ershad <snosratiershad at gmail.com> Date: Mon, 6 Jan 2025 12:59:22 +0330 Subject: [PATCH] ssh-keygen: feat: raise error on confirm_overwrite if file is directory --- ssh-keygen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssh-keygen.c b/ssh-keygen.c index 89c3ed287..94665b0ab 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -242,6 +242,10 @@ confirm_overwrite(const char *filename) if (stat(filename, &st) != 0) return 1; + if (S_ISDIR(st.st_mode)) { + error("%s is a directory.", filename); + return 0;...