From fef20e838cf1eeacacdae0491a13727b4ad8b7e9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 18 Mar 2011 17:29:36 +0100 Subject: Support equal (=) signs in command lines --- lib/ssh-forcecommand | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ssh-forcecommand b/lib/ssh-forcecommand index 4d196ad..6352b13 100755 --- a/lib/ssh-forcecommand +++ b/lib/ssh-forcecommand @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright © 2010 by Daniel Friesel +# Copyright © 2010,2011 by Daniel Friesel # License: WTFPL: # 0. You just DO WHAT THE FUCK YOU WANT TO. # @@ -22,7 +22,7 @@ my $input = $ENV{'SSH_ORIGINAL_COMMAND'} or die("No command\n");; open(my $conf, '<', $conffile) or die("Can't open $conffile: $!\n"); while (my $line = <$conf>) { - my ($key, $value) = split(/ \s* = \s* /x, $line); + my ($key, $value) = ($line =~ m{ ^ ([^=]+?) \s* = \s* (.+) $ }x); if ($key and $value) { $commands{$key} = $value; } -- cgit v1.2.3