[Bug 2914] New: Use getservbyname(3) for port numbers
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Fri Oct 5 06:01:45 AEST 2018
https://bugzilla.mindrot.org/show_bug.cgi?id=2914
Bug ID: 2914
Summary: Use getservbyname(3) for port numbers
Product: Portable OpenSSH
Version: 7.7p1
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: Miscellaneous
Assignee: unassigned-bugs at mindrot.org
Reporter: naddy at mips.inka.de
Created attachment 3186
--> https://bugzilla.mindrot.org/attachment.cgi?id=3186&action=edit
Patch for resolving port specifications with getservbyname
Is there a reason ssh doesn't consult services(5) for port numbers?
This has irked me forever. I'd rather write ssh -L icb:localhost:icb
instead of ssh -L 7326, wait, 7236, uhm, grep icb /etc/services...
I don't think there is any syntactic ambiguity since Unix sockets
already must contain a '/'.
The patch below adds this:
* Try to resolve a port specification with getservbyname(3) if a
numeric conversion fails.
* Make the "Port" option in ssh_config handle its argument as a
port rather than a plain integer.
All other command line switches and configuration file options
already use a2port().
This passes the existing regression tests.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list