[scponly] [PATCH] a bug in sftp support only

Hideyuki KURASHINA rushani at bl.mmtr.or.jp
Sun Dec 5 10:29:49 EST 2004


Hi,

I found an another bug in 4.0.  This problem arises when user builds
scponly as follows to get sftp support only.

  % ./configure --disable-scp-compat --disable-gftp-compat --disable-winscp-compat
  % make
  gcc -g -O2 -I. -I. -DHAVE_CONFIG_H -DDEBUGFILE='"/usr/local/etc/scponly/debuglevel"' -o scponly.o -c scponly.c
  scponly.c:79: error: `PROG_SCP' undeclared here (not in a function)
  scponly.c:79: error: initializer element is not constant
  scponly.c:79: error: (near initialization for `dangerous_args[0].name')
  scponly.c:79: error: initializer element is not constant
  scponly.c:79: error: (near initialization for `dangerous_args[0]')
  scponly.c:80: error: initializer element is not constant
  scponly.c:80: error: (near initialization for `dangerous_args[1]')
  scponly.c:90: error: initializer element is not constant
  scponly.c:90: error: (near initialization for `dangerous_args[2]')
  *** Error code 1

  Stop in /tmp/scponly-4.0.

A patch to fix the problem is attached below.

Regards,

-- rushani

--- scponly.c.orig	Sun Nov 28 10:16:39 2004
+++ scponly.c	Mon Dec  6 00:18:24 2004
@@ -76,7 +76,9 @@
  */
 cmd_arg_t dangerous_args[] =
 {
+#ifdef ENABLE_SCP2
 	{ PROG_SCP, "-S" },
+#endif
 	{ PROG_SFTP_SERVER, "-S" },
 #ifdef UNISON_COMPAT
 	{ PROG_UNISON, "-rshcmd" },



More information about the scponly mailing list