Package: netcat-openbsd Version: 1.203-1 Severity: normal Control: tags -1 + patch
Dear Maintainer, The debian-specific patch "use-flags-to-specify-listen-address.patch" disallows the usage of "-s" in some valid cases. For example, the following should connect to the unix socket "target" and use "foo" as its client socket: $ nc -U -s foo target usage: nc ... Looking at the patch I don't trust this is the only behaviour change. I don't understand why this divergence from upstream was introduced and I wish it was reverted altogether. But if that's not possible below is a patch that you can fold into the existing one. By the way, when I was looking at netcat 2 weeks ago I found several other issues. I wrote to the upstream ML and was planning to report the bugs to the Debian BTS afterwards but it seems upstream is not very interested because there was no reply in 10+ days. Anyway, in case you want to fix any of these, of the upstream issues the ones that are most relevant for the Debian "fork" are the following: - https://marc.info/?l=openbsd-bugs&m=156551733219405&w=2 (the non-kernel part, obviously) - https://marc.info/?l=openbsd-bugs&m=156568806424551&w=2 - https://marc.info/?l=openbsd-bugs&m=156551644519192&w=2 - https://marc.info/?l=openbsd-bugs&m=156551645219193&w=2 - https://marc.info/?l=openbsd-bugs&m=156551644219191&w=2 There's also this one, but here Debian unfortunately diverged so there's less of a compelling reason to fix it: - https://marc.info/?l=openbsd-bugs&m=156551640819187&w=2 The remaining one is OpenBSD-specific. In my Debian box I've been running a custom netcat package with all of the above patched (some "provisionally", some with patches that differ slightly for Linux), so feel free to ask if you want the patches. Thanks. -- System Information: Debian Release: bullseye/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages netcat-openbsd depends on: ii libbsd0 0.9.1-2 ii libc6 2.28-10 netcat-openbsd recommends no packages. netcat-openbsd suggests no packages. -- no debconf information --- a/netcat.c +++ b/netcat.c @@ -511,7 +511,7 @@ main(int argc, char *argv[]) if (argc == 0 && lflag) { uport = &pflag; host = sflag; - } else if (argc == 1 && !pflag && !sflag) { + } else if (argc == 1 && !pflag && (!sflag || family == AF_UNIX)) { if (family == AF_UNIX) { host = argv[0]; uport = NULL;