MINA SSHD
  1. MINA SSHD
  2. SSHD-171

ScpCommand block indefinately when using the "-p" flag

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.7.0
    • Labels:
      None

      Description

      When "-p" is specified to preserve the file mode, modification time and access time it will cause a scp client to hang indefinately because the T header is never acknowledged. This is aside from not supporting the flag entirely.

      When it is specified the "T<mtime> 0 <atime> 0" is sent first, followed by the usual Cmmmm <length> <filename>. The switch statement @ line 148 never dealt with the T coming in, as a result, it will keep continuing reading the data and eventually readAck(true) and return -1. This causes the scp client (from cygwin and linux) to hang because it was never acknowledged.

        Activity

        Ken Diep created issue -
        Ken Diep made changes -
        Field Original Value New Value
        Attachment SSHD-171.patch [ 12530231 ]
        Ken Diep made changes -
        Description When "-p" is specified to preserve the file mode, modification time and access time it will cause ScpCommand.java to hang indefinately. This is aside to not supporting the flag entirely.

        When it is specified the "T<mtime> 0 <atime> 0" is sent first, followed by the usual Cmmmm <length> <filename>. The switch statement @ line 148 never dealt with the T coming in, as a result, it will keep continuing reading the data and eventually readAck(true) never return because of the in.read() @ line 430.
        When "-p" is specified to preserve the file mode, modification time and access time it will cause a scp client to hang indefinately because the T header is never acknowledged. This is aside from not supporting the flag entirely.

        When it is specified the "T<mtime> 0 <atime> 0" is sent first, followed by the usual Cmmmm <length> <filename>. The switch statement @ line 148 never dealt with the T coming in, as a result, it will keep continuing reading the data and eventually readAck(true) and return -1. This causes the scp client (from cygwin and linux) to hang because it was never acknowledged.
        Guillaume Nodet made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Guillaume Nodet [ gnt ]
        Fix Version/s 0.7.0 [ 12317953 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Ken Diep
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development