Package: autossh
Version: 1.3-3
Severity: normal
Tags: patch

Autossh doesn't handle -- properly when parsing commandling options. It
checks for and eats the first --, but it still parses the subsequent
commandline arguments.

Attached patch fixes this. Any arguemnts after -- are passed verbaitum
to ssh.  This allows use of the ssh -M option when using autossh.

Paul

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.3-w
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages autossh depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  openssh-client [ssh-client] 1:4.1p1-6    Secure shell client, an rlogin/rsh

autossh recommends no packages.

-- no debconf information
--- autossh.c.old	2005-07-28 02:04:16.000000000 +0100
+++ autossh.c	2005-07-28 02:04:34.000000000 +0100
@@ -396,13 +396,14 @@
 			}
 			done_fwds = 1;
 		}
-        if (argv[i][0] == '-' && argv[i][1] == 'M') {
+        if (!sawargstop && argv[i][0] == '-' && argv[i][1] == 'M') {
             if (argv[i][2] == '\0')
                 i++;
             continue;
         }
 		/* look for -f in option args and strip out */
-		strip_arg(argv[i], 'f', OPTION_STRING);
+		if (!sawargstop)
+		    strip_arg(argv[i], 'f', OPTION_STRING);
 		add_arg(argv[i]);
 	}
 

Reply via email to