Mailing List Archive

[Bug 3169] sshd listens to port 22 AND whatever port is specified in or after Include(s)
https://bugzilla.mindrot.org/show_bug.cgi?id=3169

Jakub Jelen <jjelen@redhat.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |jjelen@redhat.com

--- Comment #1 from Jakub Jelen <jjelen@redhat.com> ---
Created attachment 3398
--> https://bugzilla.mindrot.org/attachment.cgi?id=3398&action=edit
proposed patch

the attached patch should address the issue. The important part is not
to call process_queued_listen_addrs() for every included file, because
it sets the port to 22 if none is set before. I missed this on my first
run.

The following code snippet should reproduce this issue and verify the
fix in the regress testsuite (regress/servcfginclude.sh)

# Port in included file is correctly interpretted (bug #3169)
cat > $OBJ/sshd_config.i << _EOF
Include $OBJ/sshd_config.i.2
Port 7722
_EOF
cat > $OBJ/sshd_config.i.2 << _EOF
HostKey $OBJ/host.ssh-ed25519
_EOF

trace "Port after included files"
${SUDO} ${REAL_SSHD} -f $OBJ/sshd_config.i -T -ddd \
-C "host=x,user=test,addr=127.0.0.1" > $OBJ/sshd_config.out || \
fail "failed to parse Port after included files"
_port=`grep -i '^port ' $OBJ/sshd_config.out | awk '{print $2}'`
if test "x7722" != "x$_port" ; then
fail "The Port in included file was intertepretted wrongly.
Expected 7722, got $_port"
fi

--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3169] sshd listens to port 22 AND whatever port is specified in or after Include(s) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3169

Damien Miller <djm@mindrot.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |djm@mindrot.org
Status|NEW |RESOLVED
Blocks| |3162
Resolution|--- |FIXED

--- Comment #2 from Damien Miller <djm@mindrot.org> ---
Thanks - Jakub's patch has been applied and will be in OpenSSH 8.4, due
in ~3 months.


Referenced Bugs:

https://bugzilla.mindrot.org/show_bug.cgi?id=3162
[Bug 3162] Tracking bug for 8.4 release
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 3169] sshd listens to port 22 AND whatever port is specified in or after Include(s) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=3169

Damien Miller <djm@mindrot.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |Flupp+bugzilla.mindrot.org@
| |mailbox.org

--- Comment #3 from Damien Miller <djm@mindrot.org> ---
*** Bug 3164 has been marked as a duplicate of this bug. ***

--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs