Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-238

RCommandClient wrongly attempts to use local socket with priviledged port (specifically >511 && <1024)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.0
    • None
    • None
    • None
    • Linux x86_64, Eclipse 3.4, commons-net-2.0

    Description

      I see a few instances of this around:

      int localPort;

      localPort = MAX_CLIENT_PORT;

      for (localPort = MAX_CLIENT_PORT; localPort >= MIN_CLIENT_PORT; --localPort)
      {
      try

      { _socket_ = _socketFactory_.createSocket(host, port, localAddr, localPort); }

      catch (SocketException e)

      { continue; }

      break;
      }

      if (localPort < MIN_CLIENT_PORT)
      throw new BindException("All ports in use or insufficient permssion.");

      Yet, this seems to be an error. I can manually issue the rlogin command on my shell and everything just works. After doing it directly from my shell, a netstat -a reveals that I'm using an unpriviledged port on my client side.... why is RCommandClient attempting to use a priviledged port??

      Attachments

        Activity

          People

            Unassigned Unassigned
            jieryn jieryn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: