Bug 732883

Summary: nc unnecessarily binds to a temporary unix source socket
Product: [Fedora] Fedora Reporter: JW <ohtmvyyn>
Component: ncAssignee: Petr Šabata <psabata>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: psabata, rvokal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 846527 (view as bug list) Environment:
Last Closed: 2013-11-09 13:13:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description JW 2011-08-24 03:37:22 UTC
Description of problem:
Even when one doesn't supply a "-s" option to nc, and when the "-U" option is supplied, nc attempts to bind to a temporary unix socket. This is wrong, unnecessary, misleading, and broken.

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


How reproducible:
nc-1.100-2

Steps to Reproduce:
1. echo x | nc -uU some-unix-domain-socket-file-set-for-dgram
2.
3.
  
Actual results:
1. fails

Expected results:
1. should work

Additional info:
This nc program is really badly written. Although there is error handling there is no error output.  So when the bind() in unix_bind() fails then nobody gets told anything. There could be perror()'s just about everywhere a failure is detected but there are none.  One has to resort to strace to see what is going on.

Also, binding to a source doesn't work for unix domain sockets anyhow.  So one has to wonder why this code has been added.

A simple fix is firstly to remove the temporary source path that gets created in the absence of a "-s" option. Secondly, to only do the bind() portion in unix_bind() is the path argument is set and is non empty.

Comment 1 Fedora End Of Life 2012-08-07 20:02:41 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 JW 2012-08-08 03:43:54 UTC
needs fixing, does not need closing

Comment 3 Fedora End Of Life 2013-07-04 06:28:09 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Petr Šabata 2013-07-04 07:42:42 UTC
F18 and newer don't ship with this package.
Switching back to F17.

Comment 5 JW 2013-07-04 07:49:38 UTC
Version-Release number of selected component (if applicable):
nc6-1.0-16

Comment 6 Petr Šabata 2013-07-04 09:12:05 UTC
nc6 is a different package and doesn't support UNIX sockets at all.
What issue are you having with it?

Comment 7 Petr Šabata 2013-07-31 07:09:26 UTC
*** Bug 846527 has been marked as a duplicate of this bug. ***