SUMMARY: openssh sftp server problem

From: Bryan Dunlap <bcd_at_pacific.mps.ohio-state.edu>
Date: Mon, 05 Mar 2001 09:46:49 -0500

Many thanks to Chris Adams and Stanislav S. Anokhin for their replies.

Patch and explanation from Chris:

   Apply this patch:

   diff -urN openssh-2.5.1p1/sftp-server.c openssh/sftp-server.c
   --- openssh-2.5.1p1/sftp-server.c Mon Feb 12 20:40:56 2001
   +++ openssh/sftp-server.c Sun Feb 25 15:56:50 2001
   _at__at_ -684,7 +684,7 _at__at_
           }
           if (sz == 0)
                   tbuf[0] = '\0';
   - snprintf(buf, sizeof buf, "%s %3d %-8.8s %-8.8s %8llu %s %s", mode,
   + snprintf(buf, sizeof buf, "%s %3d %-8.8s %-8.8s %8lu %s %s", mode,
               st->st_nlink, user, group, (unsigned long long)st->st_size, tbuf, name);
           return xstrdup(buf);
    }


   Basically, OpenSSH assumes that st->st_size is a long long (it is
   usually a long, but on Alpha they are the same), and also assumes that
   if long long is recognized, the ll modifier will be recognized (Digital
   Unix's libraries, at least as of 4.0F, do not recognize it).


My original question:

   I recently built OpenSSH 2.5.1p1 on Tru64 4.0E. It works fine except
   for one thing: an sftp connection to it dies upon any attempt at an
   `ls' command. Typical client error is along the lines of "Bad file
   descriptor". I upgraded to 2.5.1p2 with no change. The sftp-server
   works fine on my other platforms (Linux, SunOS 5.x, SunOS 4.1.4).
    
   Has anyone else seen this, or does anyone have any insight? Thanks.


        ==BD
Received on Mon Mar 05 2001 - 14:47:43 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT