Re: Endless sftp ls listings on Tru64

From: Paul A Sand (pas_at_granite.unh.edu)
Date: 05/30/03


Date: Fri, 30 May 2003 14:32:30 +0000 (UTC)

In article <ldo-A3B778.21361430052003@news.wave.co.nz>,
Lawrence DčOliveiro wrote:
> I wonder if anyone else has come across this problem: when you sftp to
> an OpenSSH server (version 3.6.1p2) running on Compaq/HP Tru64 UNIX 5.1
> and try the "ls" command on an NFS-mounted volume, either you get an
> endless repetition of the same directory listing over and over, or it
> seems to hang and return nothing at all.
>
> I managed to track down what the problem was: it's a subtle issue with
> the semantics of the readdir call. When readdir returns NULL, that means
> you've reached the end of the directory. However, it's not clear to me
> what's supposed to happen if you call readdir on the same directory
> handle again. Looking at the code for sftp-server.c, it expects
> subsequent calls to continue returning NULL. On our Linux boxes, this
> works fine for both local volumes and NFS-mounted ones. And on the
> Alphas running Tru64, it works for local volumes. But for NFS-mounted
> ones, it returns NULL once, then starts returning the directory contents
> again from the top.
>
> I came up with a patch to sftp-server.c to work around this, but I'll
> hold off submitting a bug report to the OpenSSH folks until I get an
> opinion from others on where the bug really lies :).

Me too. My patch (a year and a half old now) is here:
http://pubpages.unh.edu/~sysman/openssh.patch

I have a dim recollection that this was only a problem with NFSv3.
I (also) didn't submit a bug report, since I wasn't sure where the
actual bug was.

-- 
-- Paul A. Sand                 | It is error alone which needs the
-- University of New Hampshire  | support of government.  Truth can
-- pas@unh.edu                  | stand by itself.
-- http://pubpages.unh.edu/~pas |     (Thomas Jefferson)


Relevant Pages

  • Endless sftp ls listings on Tru64
    ... I wonder if anyone else has come across this problem: when you sftp to ... and try the "ls" command on an NFS-mounted volume, ... When readdir returns NULL, that means ... hold off submitting a bug report to the OpenSSH folks until I get an ...
    (comp.security.ssh)
  • Re: Linux 2.6.21-rc5
    ... Please try out the patch in the bug report without your patch and see if the issue reproduces. ... Unable to handle kernel NULL pointer dereference at 0000000000000088 RIP: ... That is an 'impossible' scenario for tx descriptors here - the tx ring descriptors are always set up with a valid skb, and their completion is serialized via np->lock. ...
    (Linux-Kernel)
  • Re: Document ID 6220478 "10-Fix Delivered"
    ... >patch will not be put on the public sunsolve area (or on the contract ... >area) until I install the IDR and confirm that the patch indeed fixes the ... The bug report is marked as "integrated in snv_11" which basically is ... to opinions held by my employer, Sun Microsystems. ...
    (comp.unix.solaris)
  • Re: Python bug report on SF, what now?
    ... > I've submitted a bug report on Sourceforge ... As it has a patch associated, ... submitter is willing to do all the work. ... If it is a bug report, and it is not for code that I have ...
    (comp.lang.python)
  • Re: [Bug #10670] BUG: linux-2.6.26-rc1 oops at thinkpad_acpi:led_set_status
    ... Patch available, waiting for Len Brown to merge it. ... the bug report. ... "One disk to rule them all, ...
    (Linux-Kernel)