[Bug 3083] New: Passing tilde (HOME) in file option results in cryptic error
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Mon Oct 21 09:05:02 AEDT 2019
https://bugzilla.mindrot.org/show_bug.cgi?id=3083
Bug ID: 3083
Summary: Passing tilde (HOME) in file option results in cryptic
error
Product: Portable OpenSSH
Version: 8.1p1
Hardware: ix86
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh-keygen
Assignee: unassigned-bugs at mindrot.org
Reporter: s.egbert at sbcglobal.net
The command in question discovered in earlier 7.9p1 and also in latest
8.1p1:
ssh-keygen -f "~/.ssh/known_hosts" -R "johndoe"
Expected output:
known_hosts: No such file or directory
The actual result output is:
mkstemp: No such file or directory
`strace -f` shows:
openat(AT_FDCWD, "~/.ssh/known_hosts.TgA5TDcI46",
O_RDWR|O_CREAT|O_EXCL, 0600) = -1 ENOENT (No such file or directory)
write(2, "mkstemp: No such file or directo"..., 36mkstemp: No such
file or directory
Please notice the temporary file being created at
"~/.ssh/known_hosts.TgA5TDcI46"?
Looks like a tilde expansion failure (or lack thereof).
ssh-keygen(8) has this to say about the specification of
`known_hosts_file`: (*nothing*)
I've searched the unix-dev mailing list, patch history, bugzilla
(keywords: mktemp, tilde)
Introduction of breakage appears to be here:
commit 3e088aaf236ef35beeef3c9be93fd53700df5861
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Jun 1 03:51:34 2018 +0000
upstream: return correct exit code when searching for and hashing
known_hosts entries in a single operation (ssh-keygen -HF
hostname); bz2772
Report and fix from Anton Kremenetsky
OpenBSD-Commit-ID: ac10ca13eb9bb0bc50fcd42ad11c56c317437b58
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list