Problems with sftp under SCO OpenServer

Tim Rice tim at multitalents.net
Mon Mar 12 12:53:26 EST 2001


On Sat, 10 Mar 2001 mouring at etoh.eviladmin.org wrote:

> 
> On Sat, 10 Mar 2001, Tim Rice wrote:
> 
> > On Thu, 22 Feb 2001, Greg Jewell wrote:
> > 
> > > Hello,
> > > 
> > > I compiled OpenSSH 2.5.1p1 for SCO OpenServer 5.0.5, HPUX B.11.00, and
> > > SunOS 5.7.  When I sftp into the HP or Sun box, everything works fine.
> > > However, whenever I sftp into the OpenServer box, all remote filenames
> > > are shown as "(null)".  File sizes, owners, etc. display properly.  This
> > > behavior is exhibited from all origination points.
> > 
> > I have verified this problem with 2.5.1p2 and 03/10 CVS.
> > ...
[snip]
> > drwxrwxr-x    4 tim      trr          4096 (null) Aug 28  2000
> 
> There was an off list talk about this.  Since SCO native snprintf()
> does not support %ll concept it does things incorrectly.  However the
> new 64bit development does support %ll.

Too bad it was off list. Would have saved me some time. Oh well.

> 
> The best way to deal with this is to test to see if the
> snprintf() supports %ll and define BROKEN_SNPRINTF if it does
> not.

I just added a sprintf test to configure.in that will show up in
the next SNAP.

For those running openssh-2.5.1p2 on SCO Open Server 5 I've attached
the patch that is now in the CVS.

> 
> - Ben
> 

-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net

-------------- next part --------------

--- configure.in.old	Sat Mar 10 16:52:14 2001
+++ configure.in	Sun Mar 11 16:28:22 2001
@@ -1060,6 +1060,34 @@
 	"x$ac_cv_sizeof_long_int" != "x8" -a \
 	"x$ac_cv_sizeof_long_long_int" = "x0" ; then
 	NO_SFTP='#'
+else
+dnl test snprintf (broken on SCO w/gcc)
+	AC_TRY_RUN(
+		[
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_SNPRINTF
+main()
+{
+	char buf[50];
+	char expected_out[50];
+	int mazsize = 50 ;
+#if (SIZEOF_LONG_INT == 8)
+	long int num = 0x7fffffffffffffff;
+#else
+	long long num = 0x7fffffffffffffff;
+#endif
+	strcpy(expected_out, "9223372036854775807");
+	snprintf(buf, mazsize, "%lld", num);
+	if(strcmp(buf, expected_out) != 0)
+        	exit(1);
+	exit(0);
+}
+#else
+main() { exit(0); }
+#endif
+		], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
+	)
 fi
 AC_SUBST(NO_SFTP)
 


More information about the openssh-unix-dev mailing list