Bug 57681 - portrange should only apply to server sockets
portrange should only apply to server sockets
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: amanda (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-18 15:55 EST by John Dalbec
Modified: 2014-08-31 19:24 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.4.4p1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-04 15:15:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Dalbec 2001-12-18 15:55:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.9-12 i686)

Description of problem:
configure.in says:
AC_ARG_WITH(portrange,
    [  --with-portrange=low,high  bind unreserved TCP server sockets to
ports within this range [unlimited]],

but common-src/stream.c stream_client() says
#ifdef PORTRANGE
    if (bind_portrange(client_socket, &claddr, PORTRANGE) == 0)
        goto out;
#endif

so that --with-portrange applies to client sockets too.  This means that
amrecover doesn't work if the portrange is >1023.



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


How reproducible:
Always

Steps to Reproduce:
1.  Rebuild amanda with --with-portrange=<unreserved portrange>
2.  amrecover

Actual Results:  amrecover: did not get a reserved port: <port #>

Expected Results:  amrecover should work

Additional info:

--with-portrange is needed to do amanda backups with strong firewalls in
place.
Comment 1 Trond Eivind Glomsrxd 2002-01-08 18:57:54 EST
We don't build it that way, sounds like a local configuration issue. If you want
to change the ports the server is listening to, you can just change the ports in
the files in /etc/xinetd.d?
Comment 2 John Dalbec 2002-01-09 08:28:24 EST
No, these are (usually high) ports that are used for streaming backup data.  In your configuration amanda chooses any available port regardless of 
the contents of /etc.  But I'm not comfortable opening all ports between these machines, so I rebuilt amanda with the --with-portrange option.  The 
remarks in the configure script indicate that the --portrange option applies to servers only, but as delivered in your SRPM it applies to clients also.  If 
you feel this is not your problem, I can just upstream it.
Comment 3 John Dalbec 2002-01-09 09:05:56 EST
Current amanda CVS takes a different (also effective) approach to my complaint.  From the comments on the last revision:

 Add stream_client_privileged() function to get a
 privileged port and fail if one is not available.
 The older stream_client() function gets a (non-privileged)
 port in the configured portrange, if set and possible,
 else anything available.

 Use stream_client_privileged() in amrecover instead of
 stream_client().

Comment 4 Trond Eivind Glomsrxd 2002-01-17 15:08:38 EST
OK, we'll get that when amanda is updated next.
Comment 5 John Dalbec 2002-04-03 10:21:31 EST
FWIW, the stream_client patch (from CVS) was recently posted to http://www.amanda.org/patches.html.
Comment 6 Jay Fenlason 2003-12-04 15:15:50 EST
Today's the day for cleaning up old bugs.  It looks like this has been 
fixed for a long time now. 

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