tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tramp (2.1.15); base64 may fail on remote systems


From: Klaus Reichl
Subject: tramp (2.1.15); base64 may fail on remote systems
Date: Fri, 12 Nov 2010 14:02:01 +0100

Hi Tramp(s),

I'm running tramp on Linux against an embedded system providing
ssh+friends and base64 (however an older version).

  ilp-node3:~# base64 --version
  base64 (GNU coreutils) 6.0

When tramp checks out the target it uses 
 tramp-remote-coding-commands
 (b64 "base64" "base64 -d")
to check the encode and decoding on the target.

But:
  ilp-node3:~# echo hack | base64 | base64 -d ; echo $?
  hack
  base64: invalid input
  1

This problem of base64 is known and fixed with newer versions like,
  bash> base64 --version
  base64 (GNU coreutils) 7.4
  bash> echo hack | base64 | base64 -d ; echo $?
  hack
  0
however, it may fail, when the target is an older systems.

Using:
 (b64 "base64" "base64 -d -i")
fixes the problem and works on old and new systems.

The switch -i ignores trailing garbage:

   From an old RedHat man page:

   ...
   -i, --ignore-garbage
        When decoding, ignore non-alphabet characters.
   ...
   The data are encoded as described for the base64 alphabet in RFC  3548.
       Decoding  require  compliant  input by default, use --ignore-garbage to
       attempt to recover from non-alphabet characters (such as  newlines)  in
       the encoded stream.
   ...

Best regards,
Klaus
--
Klaus Reichl - TAS Platform Technology   inet:  address@hidden
Thales Austria GmbH                      voice: +43 (0) 1 27711-3884
Scheydgasse 41                           fax:   +43 (0) 1 27711-3884
1210 Vienna, Austria                     http://www.thalesgroup.com
      (FN 278233 t - Handelsgericht Wien/Commercial Court Vienna)         



reply via email to

[Prev in Thread] Current Thread [Next in Thread]