Creating .ssh directory when it does not exist, does not work
I think there is a problem with the logic in hostfile_create_user_ssh_dir
. When the .ssh directory does not exist, it fails to create it because of the call to realpath()
. I looked and saw that the use of realpath in this function doesn't exist in upstream OpenSSH 8.8p1. What's the need for this functionality as it relates to PKIXSSH?
Example from my breakpoint. This directory example is extremely basic.
hostfile_create_user_ssh_dir (
filename=filename@entry=0x502d60 "/home/root/.ssh/known_hosts",
notify=notify@entry=0) at hostfile.c:506
p p
$25 = 0x502d6f "/known_hosts"
p len
$26 = 15
p filename
$28 = 0x502d60 "/home/root/.ssh/known_hosts"
p dirname
$29 = "/home/root/.ssh\000"
PKIXSSH commit: 0f9c4c64 vs OpenSSH 8.8p1 commit: https://github.com/openssh/openssh-portable/commit/74344c3ca42c3f53b00b025daf09ae7f6aa38076
The base OpenSSH version of this function succeeds.
Edited by OS P