From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98380363212384.tru64-unix-managers.marc@archive.invalid> From: Bryan Dunlap Date: Mon, 05 Mar 2001 14:46:49 +0000 To: tru64-unix-managers Subject: SUMMARY: openssh sftp server problem X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98380363212384 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 @@ -684,7 +684,7 @@ } 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