Bug 691420 - netcat is a bit stale
Summary: netcat is a bit stale
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nc
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Petr Šabata
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-28 14:19 UTC by tz
Modified: 2011-04-07 09:10 UTC (History)
3 users (show)

Fixed In Version: nc-1.100-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-02 05:54:21 UTC


Attachments (Terms of Use)

Description tz 2011-03-28 14:19:05 UTC
Description of problem:
version is 1.84, current is 1.100, many updates in 1.86


Version-Release number of selected component (if applicable):
1.84

How reproducible:
always

Steps to Reproduce:
"netcat -q-1"
1.
2.
3.
  
Actual results:
invalid option

Expected results:
timeout option

Additional info:
Switch to a different upstream, or pull the current openbsd upstream.

Comment 1 Petr Šabata 2011-03-28 14:35:56 UTC
nc-1.100 is available in Rawhide, see bug 681824
I have nothing against getting this to f14 & f15 so if there's an interest in that, I'll build it for those.

Comment 2 Fedora Update System 2011-03-28 14:50:35 UTC
nc-1.100-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/nc-1.100-1.fc15

Comment 3 Fedora Update System 2011-03-28 14:51:00 UTC
nc-1.100-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/nc-1.100-1.fc14

Comment 4 tz 2011-03-28 15:59:00 UTC
Thanks.  I was considering upgrading to rawhide anyway, but am glad that I found something that needed to be pushed backwards.

Comment 5 Fedora Update System 2011-03-28 19:21:02 UTC
Package nc-1.100-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nc-1.100-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/nc-1.100-1.fc14
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-04-02 05:54:16 UTC
nc-1.100-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2011-04-06 22:28:59 UTC
nc-1.100-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Bojan Smojver 2011-04-07 03:09:22 UTC
Doesn't work on i686 for me (F-14). I get:

---------------
$ nc localhost 22
nc: port number fͿfͿfͿ: 22
$ 
---------------

SSH is listening on localhost on that box.

Works on x86_64 though.

Comment 9 Bojan Smojver 2011-04-07 03:15:05 UTC
Downgrading to nc-1.84-23.fc14.i686 fixes the issue immediately on i686.

Comment 10 Petr Šabata 2011-04-07 07:50:12 UTC
You mentioned some garbage output in Bodhi. Do you mean the "string" between the word 'number' and '22' or something else?

Comment 11 Bojan Smojver 2011-04-07 08:54:27 UTC
(In reply to comment #10)
> You mentioned some garbage output in Bodhi. Do you mean the "string" between
> the word 'number' and '22' or something else?

Here is the full output when I run it within gdb, all debuginfo loaded:
--------------
$ gdb nc
GNU gdb (GDB) Fedora (7.2-46.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/nc...Reading symbols from /usr/lib/debug/usr/bin/nc.debug...done.
done.
(gdb) set args localhost 22
(gdb) r
Starting program: /usr/bin/nc localhost 22
nc: port number���������: 22

Program exited with code 01
--------------

So, it doesn't really crash, just runs prints the above to stderr and exits with code 1.

Comment 12 Bojan Smojver 2011-04-07 09:02:14 UTC
Maybe this will help:
--------------
[bsmojver@vwpdk526 ~]$ gdb nc
GNU gdb (GDB) Fedora (7.2-46.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/nc...Reading symbols from /usr/lib/debug/usr/bin/nc.debug...done.
done.
(gdb) set args localhost 22
(gdb) b netcat.c:115
Breakpoint 1 at 0x804a414: file netcat.c, line 115.
(gdb) r
Starting program: /usr/bin/nc localhost 22

Breakpoint 1, main (argc=<value optimized out>, argv=<value optimized out>)
    at netcat.c:122
122		const char *errstr, *proxyhost = "", *proxyport = NULL;
(gdb) n
288		if (xflag) {
(gdb) 
122		const char *errstr, *proxyhost = "", *proxyport = NULL;
(gdb) 
288		if (xflag) {
(gdb) 
316		if (lflag) {
(gdb) 
373		} else if (family == AF_UNIX) {
(gdb) 
390			build_ports(uport);
(gdb) 
nc: port number���������: 22

Program exited with code 01.
(gdb)
--------------

Comment 13 Bojan Smojver 2011-04-07 09:05:30 UTC
Some more:
--------------
(gdb) r
Starting program: /usr/bin/nc localhost 22

Breakpoint 1, main (argc=<value optimized out>, argv=<value optimized out>)
    at netcat.c:122
122		const char *errstr, *proxyhost = "", *proxyport = NULL;
(gdb) n
288		if (xflag) {
(gdb) 
122		const char *errstr, *proxyhost = "", *proxyport = NULL;
(gdb) 
288		if (xflag) {
(gdb) 
316		if (lflag) {
(gdb) 
373		} else if (family == AF_UNIX) {
(gdb) 
390			build_ports(uport);
(gdb) s
build_ports (p=0xbffff61e "22") at netcat.c:766
766		int x = 0;
(gdb) n
762	{
(gdb) 
769			comma = strchr(p, ',');
(gdb) 
770			if (comma)
(gdb) 
769			comma = strchr(p, ',');
(gdb) 
770			if (comma)
(gdb) 
773			if ((n = strchr(p, '-')) != NULL) {
(gdb) 
804				hi = strtonum(p, 1, PORT_MAX, &errstr);
(gdb) 
805				if (errstr)
(gdb) 
806					errx(1, "port number %s: %s", errstr, p);
(gdb) p hi
$1 = 0
(gdb) p  p
$2 = 0xbffff61e "22"
(gdb) p errstr
$3 = 0xbffff494 "\b\366\377\277\024\366\377\277\036\366\377\277"
--------------

Weird...

Comment 14 Petr Šabata 2011-04-07 09:10:20 UTC
I've created bug 694407 for this.


Note You need to log in before you can comment on or make changes to this bug.