[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tramp (2.0.15); /multi:sudo:address@hidden:/ - Args out of range: [], 1
From: |
Sacha Chua |
Subject: |
tramp (2.0.15); /multi:sudo:address@hidden:/ - Args out of range: [], 1 |
Date: |
Thu, 19 Sep 2002 22:08:12 +0800 |
Using the tramp included in CVS Emacs, opening
/multi:sudo:address@hidden:/ results in "Args out of range: [], 1"
/multi:sudo:address@hidden:/var works, although I get the //DIRED// ... lines
at the end.
Also, I had to set my PS1 to '$ ' in order to get it to even connect,
as my normal prompt has ANSI escape codes. =) Maybe this can get fixed
sometime. My user shell may not be bash, too, and sudo -u root -s
actually uses _my_ $SHELL, so you could probably unset that or set it
to whatever shell you prefer. (Or you could just set PS1...) Anyway,
I'm pretty sure you folks can figure it out.
Keep up the great work! Tramp is wonderful, and one of the things I
show off to the few people whom I haven't converted to Emacs yet. =)
--bug report follows this line--
Emacs : GNU Emacs 21.3.50.10 (i586-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-09-18 on sachac
Package: tramp (2.0.15)
current state:
==============
(setq
tramp-ls-command nil
tramp-test-groks-nt nil
tramp-file-exists-command nil
tramp-current-multi-method nil
tramp-current-method nil
tramp-current-user nil
tramp-current-host nil
tramp-auto-save-directory nil
tramp-default-method "ssh"
tramp-rsh-end-of-line "\n"
tramp-remote-path '("/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin"
"/usr/ccs/bin" "/local/bin" "/local/freeware/bin"
"/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin"
"/usr/contrib/bin")
tramp-login-prompt-regexp ".*ogin: *"
tramp-password-prompt-regexp "^.*\\([pP]assword\\|passphrase.*\\):
tramp-wrong-passwd-regexp "^.*\\(Connection \\(closed\\|refused\\)\\|Host key
verification failed\\.\\|Login \\(Incorrect\\|incorrect\\)\\|Name or service
not known\\|Permission denied\\.\\|Sorry, try again\\.\\).*\\|^.*\\(Received
signal [0-9]+\\).*"
tramp-yesno-prompt-regexp "\\(Are you sure you want to continue connecting
(yes/no)\\?\\)\\s-*"
tramp-yn-prompt-regexp "\\(Store key in cache\\? (y/n)\\)\\s-*"
tramp-temp-name-prefix "tramp."
tramp-file-name-structure
'("\\`/\\(\\([a-zA-Z0-9-]+\\):\\)?\\(\\([^:@/]+\\)@\\)?\\([^:/]+\\):\\(.*\\)\\'"
2 4 5 6)
tramp-file-name-regexp "\\`/[^/:]+:"
tramp-multi-file-name-structure
'("\\`/\\(\\([a-zA-Z0-9]+\\)?:\\)\\(\\(%s\\)+\\)\\(.*\\)\\'" 2 3 -1)
tramp-multi-file-name-hop-structure
'("\\([a-zA-z0-9_]+\\):\\([^@:/]+\\)@\\([^:/]+\\):" 1 2 3)
tramp-multi-methods '("multi" "multiu")
tramp-multi-connection-function-alist '(("telnet" tramp-multi-connect-telnet
"telnet %h%n")
("rsh" tramp-multi-connect-rlogin "rsh
%h -l %u%n")
("ssh" tramp-multi-connect-rlogin "ssh
%h -l %u%n")
("su" tramp-multi-connect-su "su -
%u%n")
("sudo" tramp-multi-connect-su "sudo
-u %u -s%n"))
tramp-make-tramp-file-format "/%m:address@hidden:%p"
tramp-end-of-output "/////"
tramp-coding-commands '(("mimencode -b" "mimencode -u -b" base64-encode-region
base64-decode-region)
("mmencode -b" "mmencode -u -b" base64-encode-region
base64-decode-region)
("recode data..base64" "recode base64..data"
base64-encode-region base64-decode-region)
("uuencode xxx" "uudecode -o -" nil
uudecode-decode-region)
("uuencode xxx" "uudecode -p" nil
uudecode-decode-region)
("uuencode xxx" "tramp_uudecode" nil
uudecode-decode-region)
("tramp_encode_with_module" "tramp_decode_with_module"
base64-encode-region
base64-decode-region)
("tramp_encode" "tramp_decode" base64-encode-region
base64-decode-region))
tramp-actions-before-shell '((tramp-password-prompt-regexp
tramp-action-password)
(tramp-login-prompt-regexp tramp-action-login)
(shell-prompt-pattern tramp-action-succeed)
(tramp-shell-prompt-pattern tramp-action-succeed)
(tramp-wrong-passwd-regexp
tramp-action-permission-denied)
(tramp-yesno-prompt-regexp tramp-action-yesno)
(tramp-yn-prompt-regexp tramp-action-yn))
tramp-multi-actions '((tramp-password-prompt-regexp
tramp-multi-action-password)
(tramp-login-prompt-regexp tramp-multi-action-login)
(shell-prompt-pattern tramp-multi-action-succeed)
(tramp-shell-prompt-pattern tramp-multi-action-succeed)
(tramp-wrong-passwd-regexp
tramp-multi-action-permission-denied))
tramp-terminal-type "dumb"
tramp-shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
backup-by-copying nil
backup-by-copying-when-linked nil
backup-by-copying-when-mismatch nil
backup-by-copying-when-privileged-mismatch 200
file-name-handler-alist '(("\\`/[^/:]+:" . tramp-file-name-handler) ("\\`/:" .
file-name-non-special))
)
* Contents of *tramp/multi address@hidden:*
tramp_exit_status 0
* Contents of *debug tramp/multi address@hidden:*
# Opening `multi' connection...
# Waiting 60s for local shell to come up...
sh-2.05b$ # Sending su command `sudo -u root -s'
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Found shell prompt on `localhost'
$ exec /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...
exec /bin/sh
sh-2.05b# # Setting up remote shell environment
stty -inlcr -echo kill '^U'
sh-2.05b# sh-2.05b# # Determining coding system
foo
bar
sh-2.05b# # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
sh-2.05b# # Waiting 30s for `set +o vi +o emacs'
sh-2.05b# # Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
sh-2.05b# # Waiting 30s for `unset CDPATH'
sh-2.05b# # Setting shell prompt
$ PS1='
/////
'; PS2=''; PS3=''
$ echo ~root
/root
# Remote `/bin/sh' groks tilde expansion, good
# Finding command to check if file exists
$ test -e / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ test -e /\ this\ file\ does\ not\ exist\ 2>/dev/null; echo tramp_exit_status
$?
tramp_exit_status 1
# Finding a suitable `ls' command
# Checking remote `/bin/ls' command for `-n' option
$ test -x /bin/ls 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...
$ /bin/ls -lnd / >/dev/null 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
# Testing remote command `/bin/ls' for -n...okay
# Using remote command `/bin/ls' for getting directory listings
$ tramp_set_exit_status () {
return $1
[+]
}
$ test -e /bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/sbin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/sbin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/local/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ ( test -d /usr/local/bin 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
$ test -e /usr/ccs/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /local/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /local/freeware/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /local/gnu/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /usr/freeware/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /usr/pkg/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ test -e /usr/contrib/bin 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 1
$ PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin; export PATH
$ LC_TIME=C; export LC_TIME; echo huhu
huhu
$ mesg n; echo huhu
huhu
$ biff n ; echo huhu
sh: biff: command not found
huhu
$ unalias ls; echo huhu
sh: unalias: ls: not found
huhu
$ ( test / -nt / )
$ tramp_test_nt () {
test -n "`find $1 -prune -newer $2 -print`"
[+]
}
$ tramp_uudecode () {
(echo begin 600 /tmp/tramp.$$; tail +2) | uudecode
cat /tmp/tramp.$$
rm -f /tmp/tramp.$$
[+]
}
$ while read d; do if test -x $d/perl5 -a -f $d/perl5; then echo
tramp_executable $d/perl5; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
$ while read d; do if test -x $d/perl -a -f $d/perl; then echo tramp_executable
$d/perl; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /usr/bin/perl
# Sending the Perl `file-attributes' implementation.
$ tramp_file_attributes () {
/usr/bin/perl -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %d %d (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0]
& 0xffff);' $1 2>/dev/null
[+]
}
# Sending the Perl `mime-encode' implementations.
$ tramp_encode () {
/usr/bin/perl -e '
# This script contributed by Juanma Barranquero <address@hidden>.
# Copyright (C) 2002 Free Software Foundation, Inc.
use strict;
my %trans = do {
my $i = 0;
map {(substr(unpack(q(B8), chr $i++), 2, 6), $_)}
split //,
q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/);
[+]
};
binmode(\*STDIN);
# We read in chunks of 54 bytes, to generate output lines
# of 72 chars (plus end of line)
$/ = \54;
while (my $data = <STDIN>) {
my $pad = q();
# Only for the last chunk, and only if did not fill the last three-byte
packet
if (eof) {
my $mod = length($data) % 3;
$pad = q(=) x (3 - $mod) if $mod;
}
# Not the fastest method, but it is simple: unpack to binary string, split
# by groups of 6 bits and convert back from binary to byte; then map into
# the translation table
print
join q(),
map($trans{$_},
(substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)),
$pad,
qq(\n);
[+]
}
' 2>/dev/null
}
$ tramp_encode_with_module () {
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null
[+]
}
# Sending the Perl `mime-decode' implementations.
$ tramp_decode () {
/usr/bin/perl -e '
# This script contributed by Juanma Barranquero <address@hidden>.
# Copyright (C) 2002 Free Software Foundation, Inc.
use strict;
my %trans = do {
my $i = 0;
map {($_, sprintf(q(%06b), $i++))}
split //,
q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/)
[+]
};
my %bytes = map {(unpack(q(B8), chr $_), chr $_)} 0 .. 255;
binmode(\*STDOUT);
# We are going to accumulate into $pending to accept any line length
# (we do not check they are <= 76 chars as the RFC says)
my $pending = q();
while (my $data = <STDIN>) {
chomp $data;
# If we find one or two =, we have reached the end and
# any following data is to be discarded
my $finished = $data =~ s/(==?).*/$1/;
$pending .= $data;
my $len = length($pending);
my $chunk = substr($pending, 0, $len & ~3, q());
# Easy method: translate from chars to (pregenerated) six-bit packets, join,
# split in 8-bit chunks and convert back to char.
print join q(),
map $bytes{$_},
((join q(), map {$trans{$_} || q()} split //, $chunk) =~ /......../g);
last if $finished;
[+]
}
' 2>/dev/null
}
$ tramp_decode_with_module () {
perl -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null
[+]
}
$ while read d; do if test -x $d/ln -a -f $d/ln; then echo tramp_executable
$d/ln; break; fi; done <<'EOF'
$ /bin
$ /usr/bin
$ /usr/sbin
$ /usr/local/bin
$ /usr/ccs/bin
$ /local/bin
$ /local/freeware/bin
$ /local/gnu/bin
$ /usr/freeware/bin
$ /usr/pkg/bin
$ /usr/contrib/bin
$ EOF
tramp_executable /bin/ln
# Checking remote encoding command `mimencode -b' for sanity
$ ( mimencode -b </dev/null >/dev/null 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 0
# Checking remote decoding command `mimencode -u -b' for sanity
$ ( echo xyzzy | mimencode -b | mimencode -u -b >/dev/null 2>/dev/null; echo
tramp_exit_status $? )
tramp_exit_status 0
# Checking to see if encoding/decoding commands work on remote host...
$ echo xyzzy | mimencode -b | mimencode -u -b
xyzzy
# Checking to see if encoding/decoding commands work on remote host...done
$ ( test -d '' 2>/dev/null; echo tramp_exit_status $? )
tramp_exit_status 1
$ test -e / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ tramp_file_attributes /
(t 19 0 0 (15753 49465) (15743 19102) (15743 19102) 4096 16877 t (0 . 2) (0
770))
$ test -e / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ tramp_file_attributes /
(t 19 0 0 (15753 49465) (15743 19102) (15743 19102) 4096 16877 t (0 . 2) (0
770))
$ test -e / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0
$ test -w / 2>/dev/null; echo tramp_exit_status $?
tramp_exit_status 0