/[tramp]/tramp/lisp/tramp.el
ViewVC logotype

Diff of /tramp/lisp/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.145 by kai, Sat Jul 27 12:21:55 2002 UTC revision 2.146 by kai, Sat Jul 27 15:26:42 2002 UTC
# Line 174  This variable defaults to CMD.EXE on Win Line 174  This variable defaults to CMD.EXE on Win
174                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
175                (tramp-su-program           nil)                (tramp-su-program           nil)
176                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
177                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
178                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
179       ("scp"   (tramp-connection-function  tramp-open-connection-rsh)       ("scp"   (tramp-connection-function  tramp-open-connection-rsh)
# Line 189  This variable defaults to CMD.EXE on Win Line 185  This variable defaults to CMD.EXE on Win
185                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
186                (tramp-su-program           nil)                (tramp-su-program           nil)
187                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
188                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
189                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
190       ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)       ("scp1"  (tramp-connection-function  tramp-open-connection-rsh)
# Line 204  This variable defaults to CMD.EXE on Win Line 196  This variable defaults to CMD.EXE on Win
196                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
197                (tramp-su-program           nil)                (tramp-su-program           nil)
198                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
199                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
200                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
201       ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)       ("scp2"  (tramp-connection-function  tramp-open-connection-rsh)
# Line 219  This variable defaults to CMD.EXE on Win Line 207  This variable defaults to CMD.EXE on Win
207                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
208                (tramp-su-program           nil)                (tramp-su-program           nil)
209                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
210                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
211                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
212       ("scp-ssh1" (tramp-connection-function  tramp-open-connection-rsh)       ("scp1-old"
213                  (tramp-connection-function  tramp-open-connection-rsh)
214                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
215                (tramp-rcp-program          "scp1")                (tramp-rcp-program          "scp1")
216                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 234  This variable defaults to CMD.EXE on Win Line 219  This variable defaults to CMD.EXE on Win
219                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
220                (tramp-su-program           nil)                (tramp-su-program           nil)
221                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
222                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
223                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
224       ("scp-ssh2"  (tramp-connection-function  tramp-open-connection-rsh)       ("scp2-old"
225                  (tramp-connection-function  tramp-open-connection-rsh)
226                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
227                (tramp-rcp-program          "scp2")                (tramp-rcp-program          "scp2")
228                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 249  This variable defaults to CMD.EXE on Win Line 231  This variable defaults to CMD.EXE on Win
231                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
232                (tramp-su-program           nil)                (tramp-su-program           nil)
233                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
234                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
235                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
236       ("rsync" (tramp-connection-function  tramp-open-connection-rsh)       ("rsync" (tramp-connection-function  tramp-open-connection-rsh)
# Line 264  This variable defaults to CMD.EXE on Win Line 242  This variable defaults to CMD.EXE on Win
242                (tramp-rcp-keep-date-arg    "-t")                (tramp-rcp-keep-date-arg    "-t")
243                (tramp-su-program           nil)                (tramp-su-program           nil)
244                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
245                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
246                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
247       ("ru"    (tramp-connection-function  tramp-open-connection-rsh)       ("rsh"   (tramp-connection-function  tramp-open-connection-rsh)
248                (tramp-rsh-program          "rsh")                (tramp-rsh-program          "rsh")
249                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
250                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 279  This variable defaults to CMD.EXE on Win Line 253  This variable defaults to CMD.EXE on Win
253                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
254                (tramp-su-program           nil)                (tramp-su-program           nil)
255                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
256                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
257                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
258       ("su"    (tramp-connection-function  tramp-open-connection-rsh)       ("ssh"   (tramp-connection-function  tramp-open-connection-rsh)
259                (tramp-rsh-program          "ssh")                (tramp-rsh-program          "ssh")
260                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
261                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 295  This variable defaults to CMD.EXE on Win Line 264  This variable defaults to CMD.EXE on Win
264                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
265                (tramp-su-program           nil)                (tramp-su-program           nil)
266                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
267                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
268                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
269       ("su1"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh1"  (tramp-connection-function  tramp-open-connection-rsh)
270                (tramp-rsh-program          "ssh")                (tramp-rsh-program          "ssh")
271                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
272                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 311  This variable defaults to CMD.EXE on Win Line 275  This variable defaults to CMD.EXE on Win
275                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
276                (tramp-su-program           nil)                (tramp-su-program           nil)
277                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
278                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
279                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
280       ("su2"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh2"  (tramp-connection-function  tramp-open-connection-rsh)
281                (tramp-rsh-program          "ssh")                (tramp-rsh-program          "ssh")
282                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
283                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 327  This variable defaults to CMD.EXE on Win Line 286  This variable defaults to CMD.EXE on Win
286                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
287                (tramp-su-program           nil)                (tramp-su-program           nil)
288                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
289                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
290                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
291       ("su-ssh1"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh1-old"
292                  (tramp-connection-function  tramp-open-connection-rsh)
293                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
294                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
295                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 343  This variable defaults to CMD.EXE on Win Line 298  This variable defaults to CMD.EXE on Win
298                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
299                (tramp-su-program           nil)                (tramp-su-program           nil)
300                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
301                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
302                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
303       ("su-ssh2"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh2-old"
304                  (tramp-connection-function  tramp-open-connection-rsh)
305                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
306                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
307                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 359  This variable defaults to CMD.EXE on Win Line 310  This variable defaults to CMD.EXE on Win
310                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
311                (tramp-su-program           nil)                (tramp-su-program           nil)
312                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("rm"    (tramp-connection-function  tramp-open-connection-rsh)  
               (tramp-rsh-program          "rsh")  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             nil)  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("sm"    (tramp-connection-function  tramp-open-connection-rsh)  
               (tramp-rsh-program          "ssh")  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             ("-e" "none"))  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
313                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
314                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
315       ("smp"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh1-old"
316                (tramp-rsh-program          "ssh")                (tramp-connection-function  tramp-open-connection-rsh)
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             ("-e" "none"))  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "tramp_mimencode")  
               (tramp-decoding-command     "tramp_mimedecode")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil))  
      ("sm1"   (tramp-connection-function  tramp-open-connection-rsh)  
               (tramp-rsh-program          "ssh")  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             ("-1" "-e" "none"))  
               (tramp-rcp-args             ("-1"))  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("sm2"   (tramp-connection-function  tramp-open-connection-rsh)  
               (tramp-rsh-program          "ssh")  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             ("-2" "-e" "none"))  
               (tramp-rcp-args             ("-2"))  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("sm-ssh1"   (tramp-connection-function  tramp-open-connection-rsh)  
317                (tramp-rsh-program          "ssh1")                (tramp-rsh-program          "ssh1")
318                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
319                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 449  This variable defaults to CMD.EXE on Win Line 322  This variable defaults to CMD.EXE on Win
322                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
323                (tramp-su-program           nil)                (tramp-su-program           nil)
324                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
325                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
326                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
327       ("sm-ssh2"   (tramp-connection-function  tramp-open-connection-rsh)       ("ssh2-old"
328                  (tramp-connection-function  tramp-open-connection-rsh)
329                (tramp-rsh-program          "ssh2")                (tramp-rsh-program          "ssh2")
330                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
331                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 464  This variable defaults to CMD.EXE on Win Line 334  This variable defaults to CMD.EXE on Win
334                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
335                (tramp-su-program           nil)                (tramp-su-program           nil)
336                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
337                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
338                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
339       ("tm"    (tramp-connection-function  tramp-open-connection-telnet)       ("telnet"
340                (tramp-rsh-program          nil)                (tramp-connection-function  tramp-open-connection-telnet)
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             nil)  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       "telnet")  
               (tramp-telnet-args          nil))  
      ("tu"    (tramp-connection-function  tramp-open-connection-telnet)  
341                (tramp-rsh-program          nil)                (tramp-rsh-program          nil)
342                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
343                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 494  This variable defaults to CMD.EXE on Win Line 346  This variable defaults to CMD.EXE on Win
346                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
347                (tramp-su-program           nil)                (tramp-su-program           nil)
348                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
349                (tramp-telnet-program       "telnet")                (tramp-telnet-program       "telnet")
350                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
351       ("sum"   (tramp-connection-function  tramp-open-connection-su)       ("su"    (tramp-connection-function  tramp-open-connection-su)
352                (tramp-rsh-program          nil)                (tramp-rsh-program          nil)
353                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
354                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 510  This variable defaults to CMD.EXE on Win Line 357  This variable defaults to CMD.EXE on Win
357                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
358                (tramp-su-program           "su")                (tramp-su-program           "su")
359                (tramp-su-args              ("-" "%u"))                (tramp-su-args              ("-" "%u"))
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
360                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
361                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
362       ("suu"   (tramp-connection-function  tramp-open-connection-su)       ("sudo"  (tramp-connection-function  tramp-open-connection-su)
               (tramp-rsh-program          nil)  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             nil)  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           "su")  
               (tramp-su-args              ("-" "%u"))  
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("sudm"  (tramp-connection-function  tramp-open-connection-su)  
               (tramp-rsh-program          nil)  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             nil)  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           "sudo")  
               (tramp-su-args              ("-u" "%u" "-s"))  
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("sudu"  (tramp-connection-function  tramp-open-connection-su)  
363                (tramp-rsh-program          nil)                (tramp-rsh-program          nil)
364                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
365                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 556  This variable defaults to CMD.EXE on Win Line 368  This variable defaults to CMD.EXE on Win
368                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
369                (tramp-su-program           "sudo")                (tramp-su-program           "sudo")
370                (tramp-su-args              ("-u" "%u" "-s"))                (tramp-su-args              ("-u" "%u" "-s"))
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
371                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
372                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
373       ("multi" (tramp-connection-function  tramp-open-connection-multi)       ("multi" (tramp-connection-function  tramp-open-connection-multi)
# Line 572  This variable defaults to CMD.EXE on Win Line 379  This variable defaults to CMD.EXE on Win
379                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
380                (tramp-su-program           nil)                (tramp-su-program           nil)
381                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("multiu" (tramp-connection-function  tramp-open-connection-multi)  
               (tramp-rsh-program          nil)  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             nil)  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
382                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
383                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
384       ("scpx"  (tramp-connection-function  tramp-open-connection-rsh)       ("scpx"  (tramp-connection-function  tramp-open-connection-rsh)
# Line 601  This variable defaults to CMD.EXE on Win Line 388  This variable defaults to CMD.EXE on Win
388                (tramp-rsh-args             ("-e" "none" "-t" "-t" "/bin/sh"))                (tramp-rsh-args             ("-e" "none" "-t" "-t" "/bin/sh"))
389                (tramp-rcp-args             nil)                (tramp-rcp-args             nil)
390                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
391                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
392                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
393       ("smx"   (tramp-connection-function  tramp-open-connection-rsh)       ("sshx"  (tramp-connection-function  tramp-open-connection-rsh)
394                (tramp-rsh-program          "ssh")                (tramp-rsh-program          "ssh")
395                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
396                (tramp-remote-sh            "/bin/sh")                (tramp-remote-sh            "/bin/sh")
# Line 616  This variable defaults to CMD.EXE on Win Line 399  This variable defaults to CMD.EXE on Win
399                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
400                (tramp-su-program           nil)                (tramp-su-program           nil)
401                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
402                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
403                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
404       ("km"       ("krlogin"
405                (tramp-connection-function  tramp-open-connection-rsh)                (tramp-connection-function  tramp-open-connection-rsh)
406                (tramp-rsh-program          "krlogin")                (tramp-rsh-program          "krlogin")
407                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
# Line 632  This variable defaults to CMD.EXE on Win Line 411  This variable defaults to CMD.EXE on Win
411                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
412                (tramp-su-program           nil)                (tramp-su-program           nil)
413                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
               (tramp-telnet-program       nil)  
               (tramp-telnet-args          nil))  
      ("plinku"  
               (tramp-connection-function  tramp-open-connection-rsh)  
               (tramp-rsh-program          "plink")  
               (tramp-rcp-program          nil)  
               (tramp-remote-sh            "/bin/sh")  
               (tramp-rsh-args             ("-ssh")) ;optionally add "-v"  
               (tramp-rcp-args             nil)  
               (tramp-rcp-keep-date-arg    nil)  
               (tramp-su-program           nil)  
               (tramp-su-args              nil)  
               (tramp-encoding-command     "uuencode xxx")  
               (tramp-decoding-command  
                "( uudecode -o - 2>/dev/null || uudecode -p 2>/dev/null )")  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    uudecode-decode-region)  
414                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
415                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
416       ("plinkm"       ("plink"
417                (tramp-connection-function  tramp-open-connection-rsh)                (tramp-connection-function  tramp-open-connection-rsh)
418                (tramp-rsh-program          "plink")                (tramp-rsh-program          "plink")
419                (tramp-rcp-program          nil)                (tramp-rcp-program          nil)
# Line 665  This variable defaults to CMD.EXE on Win Line 423  This variable defaults to CMD.EXE on Win
423                (tramp-rcp-keep-date-arg    nil)                (tramp-rcp-keep-date-arg    nil)
424                (tramp-su-program           nil)                (tramp-su-program           nil)
425                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     "mimencode -b")  
               (tramp-decoding-command     "mimencode -u -b")  
               (tramp-encoding-function    base64-encode-region)  
               (tramp-decoding-function    base64-decode-region)  
426                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
427                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
428       ("pscp"       ("pscp"
# Line 681  This variable defaults to CMD.EXE on Win Line 435  This variable defaults to CMD.EXE on Win
435                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
436                (tramp-su-program           nil)                (tramp-su-program           nil)
437                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
438                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
439                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
440       ("fcp"         ("fcp"  
# Line 697  This variable defaults to CMD.EXE on Win Line 447  This variable defaults to CMD.EXE on Win
447                (tramp-rcp-keep-date-arg    "-p")                (tramp-rcp-keep-date-arg    "-p")
448                (tramp-su-program           nil)                (tramp-su-program           nil)
449                (tramp-su-args              nil)                (tramp-su-args              nil)
               (tramp-encoding-command     nil)  
               (tramp-decoding-command     nil)  
               (tramp-encoding-function    nil)  
               (tramp-decoding-function    nil)  
450                (tramp-telnet-program       nil)                (tramp-telnet-program       nil)
451                (tramp-telnet-args          nil))                (tramp-telnet-args          nil))
452       )       )
# Line 998  shell from reading its init file." Line 744  shell from reading its init file."
744  ;; File name format.  ;; File name format.
745    
746  (defconst tramp-file-name-structure-unified  (defconst tramp-file-name-structure-unified
747    (list (concat "\\`/\\(\\([a-zA-Z0-9]+\\):\\)?" ;method    (list (concat "\\`/\\(\\([a-zA-Z0-9-]+\\):\\)?" ;method
748                        "\\(\\([^:@/]+\\)@\\)?" ;user                        "\\(\\([^:@/]+\\)@\\)?" ;user
749                        "\\([^:/]+\\):"   ;host                        "\\([^:/]+\\):"   ;host
750                        "\\(.*\\)\\'")    ;path                        "\\(.*\\)\\'")    ;path
# Line 1008  On Emacs (not XEmacs), the Tramp and Ang Line 754  On Emacs (not XEmacs), the Tramp and Ang
754  filename space.  This value is used for this unified namespace.")  filename space.  This value is used for this unified namespace.")
755    
756  (defconst tramp-file-name-structure-separate  (defconst tramp-file-name-structure-separate
757    (list (concat "\\`/\\[\\(\\([a-zA-Z0-9]+\\)/\\)?" ;method    (list (concat "\\`/\\[\\(\\([a-zA-Z0-9-]+\\)/\\)?" ;method
758                  "\\(\\([-a-zA-Z0-9_#/:]+\\)@\\)?" ;user                  "\\(\\([-a-zA-Z0-9_#/:]+\\)@\\)?" ;user
759                  "\\([-a-zA-Z0-9_#/:@.]+\\)\\]" ;host                  "\\([-a-zA-Z0-9_#/:@.]+\\)\\]" ;host
760                  "\\(.*\\)\\'")          ;path                  "\\(.*\\)\\'")          ;path
# Line 1281  but it might be slow on large directorie Line 1027  but it might be slow on large directorie
1027    :group 'tramp    :group 'tramp
1028    :type 'boolean)    :type 'boolean)
1029    
1030    (defcustom tramp-actions-before-shell
1031      '((tramp-password-prompt-regexp tramp-action-password)
1032        (tramp-login-prompt-regexp tramp-action-login)
1033        (shell-prompt-pattern tramp-action-succeed)
1034        (tramp-wrong-passwd-regexp tramp-action-permission-denied))
1035      "List of pattern/action pairs.
1036    Whenever a pattern matches, the corresponding action is performed.
1037    Each item looks like (PATTERN ACTION).
1038    
1039    The PATTERN should be a symbol, a variable.  The value of this
1040    variable gives the regular expression to search for.  Note that the
1041    regexp must match at the end of the buffer, \"\\'\" is implicitly
1042    appended to it.
1043    
1044    The ACTION should also be a symbol, but a function.  When the
1045    corresponding PATTERN matches, the ACTION function is called."
1046      :group 'tramp
1047      :type '(repeat (list variable function)))
1048    
1049    
1050  ;;; Internal Variables:  ;;; Internal Variables:
1051    
1052  (defvar tramp-buffer-file-attributes nil  (defvar tramp-buffer-file-attributes nil
# Line 3668  Returns nil if none was found, else the Line 3434  Returns nil if none was found, else the
3434  ;; -- Functions for establishing connection --  ;; -- Functions for establishing connection --
3435  ;; ------------------------------------------------------------  ;; ------------------------------------------------------------
3436    
3437  (defun tramp-process-actions  ;; The following functions are actions to be taken when seeing certain
3438    (multi-method method user host actions &optional timeout)  ;; prompts from the remote host.  See the variable
3439    "Process given ACTIONS for login specified via first four args.  ;; `tramp-actions-before-shell' for usage of these functions.
3440  ACTIONS is a list of items (REGEXP FUN), where REGEXP specifies what  
3441  output from the remote end to look for, and FUN specifies the action  (defun tramp-action-login (multi-method method user host)
3442  to take when the regexp matches."    "Send the login name."
3443    nil)    (tramp-message 9 "Sending login name `%s'"
3444                     (or user (user-login-name)))
3445      (process-send-string nil (concat (or user (user-login-name))
3446                                       tramp-rsh-end-of-line)))
3447    
3448    (defun tramp-action-password (multi-method method user host)
3449      "Query the user for a password."
3450      (when (tramp-method-out-of-band-p multi-method method)
3451        (kill-process (get-buffer-process (current-buffer)))
3452        (error (concat "Out of band method `%s' not applicable "
3453                       "for remote shell asking for a password")
3454               method))
3455      (tramp-enter-password (match-string 0)))
3456    
3457    (defun tramp-action-succeed (multi-method method user host)
3458      "Signal success in finding shell prompt."
3459      (tramp-message 9 "Found remote shell prompt.")
3460      (throw 'tramp-action 'ok))
3461    
3462    (defun tramp-action-permission-denied (multi-method method user host)
3463      "Signal permission denied."
3464      (tramp-message 9 "Permission denied by remote host.")
3465      (kill-process (get-buffer-process (current-buffer)))
3466      (throw 'tramp-action 'permission-denied))
3467    
3468    ;; Functions for processing the actions.
3469    
3470    (defun tramp-process-one-action (multi-method method user host actions)
3471      "Wait for output from the shell and perform one action."
3472      (let (found item pattern action)
3473        (erase-buffer)
3474        (tramp-message 9 "Waiting 60s for prompt from remote shell")
3475        (with-timeout (60 (throw 'tramp-action 'timeout))
3476          (while (not found)
3477            (accept-process-output (get-buffer-process (current-buffer)) 1)
3478            (goto-char (point-min))
3479            (while actions
3480              (setq item (pop actions))
3481              (setq pattern (symbol-value (nth 0 item)))
3482              (setq action (nth 1 item))
3483              (when (re-search-forward (concat pattern "\\'") nil t)
3484                (setq found (funcall action multi-method method user host)))))
3485          found)))
3486    
3487    (defun tramp-process-actions (multi-method method user host actions)
3488      "Perform actions until success."
3489      (let (exit)
3490        (while (not exit)
3491          (setq exit
3492                (catch 'tramp-action
3493                  (tramp-process-one-action multi-method method user host actions)
3494                  nil)))
3495        (unless (eq exit 'ok)
3496          (error "Login failed"))))
3497    
3498  (defun tramp-open-connection-telnet (multi-method method user host)  (defun tramp-open-connection-telnet (multi-method method user host)
3499    "Open a connection using a telnet METHOD.    "Open a connection using a telnet METHOD.
# Line 3763  Maybe the different regular expressions Line 3582  Maybe the different regular expressions
3582           p multi-method method user host)           p multi-method method user host)
3583          (tramp-post-connection multi-method method user host)))))          (tramp-post-connection multi-method method user host)))))
3584    
 (defvar 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-wrong-passwd-regexp tramp-action-permission-denied))  
   "List of pattern/action pairs.  
 Whenever a pattern matches, the corresponding action is performed.  
 Each item looks like (PATTERN ACTION).  
   
 The PATTERN should be a symbol, a variable.  The value of this  
 variable gives the regular expression to search for.  Note that the  
 regexp must match at the end of the buffer, \"\\'\" is implicitly  
 appended to it.  
   
 The ACTION should also be a symbol, but a function.  When the  
 corresponding PATTERN matches, the ACTION function is called.")  
   
 (defun tramp-action-login (multi-method method user host)  
   "Send the login name."  
   (tramp-message 9 "Sending login name `%s'"  
                  (or user (user-login-name)))  
   (process-send-string nil (concat (or user (user-login-name))  
                                    tramp-rsh-end-of-line)))  
   
 (defun tramp-action-password (multi-method method user host)  
   "Query the user for a password."  
   (when (tramp-method-out-of-band-p multi-method method)  
     (kill-process (get-buffer-process (current-buffer)))  
     (error (concat "Out of band method `%s' not applicable "  
                    "for remote shell asking for a password")  
            method))  
   (tramp-enter-password (match-string 0)))  
   
 (defun tramp-action-succeed (multi-method method user host)  
   "Signal success in finding shell prompt."  
   (tramp-message 9 "Found remote shell prompt.")  
   (throw 'tramp-action 'ok))  
   
 (defun tramp-action-permission-denied (multi-method method user host)  
   "Signal permission denied."  
   (tramp-message 9 "Permission denied by remote host.")  
   (kill-process (get-buffer-process (current-buffer)))  
   (throw 'tramp-action 'permission-denied))  
   
 (defun tramp-process-one-action (multi-method method user host actions)  
   "Wait for output from the shell and perform one action."  
   (let (found item pattern action)  
     (erase-buffer)  
     (tramp-message 9 "Waiting 60s for prompt from remote shell")  
     (with-timeout (60 (throw 'tramp-action 'timeout))  
       (while (not found)  
         (accept-process-output nil 1)  
         (goto-char (point-min))  
         (while actions  
           (setq item (pop actions))  
           (setq pattern (symbol-value (nth 0 item)))  
           (setq action (nth 1 item))  
           (when (re-search-forward (concat pattern "\\'") nil t)  
             (setq found (funcall action multi-method method user host)))))  
       found)))  
   
 (defun tramp-process-actions (multi-method method user host actions)  
   "Perform actions until success."  
   (let (exit)  
     (while (not exit)  
       (setq exit  
             (catch 'tramp-action  
               (tramp-process-one-action multi-method method user host actions)  
               nil)))  
     (unless (eq exit 'ok)  
       (error "Login failed"))))  
3585                            
 ;; HHH: Changed to handle the case when USER is nil.  
3586  (defun tramp-open-connection-rsh (multi-method method user host)  (defun tramp-open-connection-rsh (multi-method method user host)
3587    "Open a connection using an rsh METHOD.    "Open a connection using an rsh METHOD.
3588  This starts the command `rsh HOST -l USER'[*], then waits for a remote  This starts the command `rsh HOST -l USER'[*], then waits for a remote
# Line 3936  arguments, and xx will be used as the ho Line 3683  arguments, and xx will be used as the ho
3683           p multi-method method user host)           p multi-method method user host)
3684          (tramp-post-connection multi-method method user host)))))          (tramp-post-connection multi-method method user host)))))
3685    
 ;; HHH: Changed.  Now utilizes (or user (user-login-name)) instead of USER.  
3686  (defun tramp-open-connection-su (multi-method method user host)  (defun tramp-open-connection-su (multi-method method user host)
3687    "Open a connection using the `su' program with METHOD.    "Open a connection using the `su' program with METHOD.
3688  This starts `su - USER', then waits for a password prompt.  The HOST  This starts `su - USER', then waits for a password prompt.  The HOST
# Line 3970  at all unlikely that this variable is se Line 3716  at all unlikely that this variable is se
3716                                                    (> emacs-major-version 20))                                                    (> emacs-major-version 20))
3717                                         tramp-dos-coding-system))                                         tramp-dos-coding-system))
3718               (p (apply 'start-process               (p (apply 'start-process
3719                         (tramp-buffer-name multi-method method                         (tramp-buffer-name multi-method method user host)
3720                                            user host)                         (tramp-get-buffer multi-method method user host)
                        (tramp-get-buffer multi-method method  
                                          user host)  
3721                         (tramp-get-su-program multi-method method)                         (tramp-get-su-program multi-method method)
3722                         (mapcar                         (mapcar
3723                          '(lambda (x)                          '(lambda (x)
# Line 3982  at all unlikely that this variable is se Line 3726  at all unlikely that this variable is se
3726               (found nil)               (found nil)
3727               (pw nil))               (pw nil))
3728          (process-kill-without-query p)          (process-kill-without-query p)
3729          (tramp-message 9 "Waiting 30s for shell or password prompt...")          (set-buffer (tramp-get-buffer multi-method method user host))
3730          (unless (setq found (tramp-wait-for-regexp          (tramp-process-actions multi-method method user host
3731                               p 30                                 tramp-actions-before-shell)
3732                               (format "\\(%s\\)\\|\\(%s\\)\\'"  
3733                                       tramp-password-prompt-regexp  ;;         (tramp-message 9 "Waiting 30s for shell or password prompt...")
3734                                       shell-prompt-pattern)))  ;;         (unless (setq found (tramp-wait-for-regexp
3735            (pop-to-buffer (buffer-name))  ;;                              p 30
3736            (kill-process p)  ;;                              (format "\\(%s\\)\\|\\(%s\\)\\'"
3737            (error "Couldn't find shell or password prompt"))  ;;                                      tramp-password-prompt-regexp
3738          (when (nth 1 found)  ;;                                      shell-prompt-pattern)))
3739            (erase-buffer)  ;;           (pop-to-buffer (buffer-name))
3740            (setq pw (tramp-read-passwd (car found)))  ;;           (kill-process p)
3741            (tramp-message 9 "Sending password")  ;;           (error "Couldn't find shell or password prompt"))
3742            (process-send-string p (concat pw tramp-rsh-end-of-line))  ;;         (when (nth 1 found)
3743            (tramp-message 9 "Waiting 30s for remote shell to come up...")  ;;           (erase-buffer)
3744            (unless (setq found  ;;           (setq pw (tramp-read-passwd (car found)))
3745                          (tramp-wait-for-regexp  ;;           (tramp-message 9 "Sending password")
3746                           p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;           (process-send-string p (concat pw tramp-rsh-end-of-line))
3747                                        tramp-wrong-passwd-regexp  ;;           (tramp-message 9 "Waiting 30s for remote shell to come up...")
3748                                        shell-prompt-pattern)))  ;;           (unless (setq found
3749              (pop-to-buffer (buffer-name))  ;;                         (tramp-wait-for-regexp
3750              (kill-process p)  ;;                          p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"
3751              (error "Couldn't find remote shell prompt"))  ;;                                       tramp-wrong-passwd-regexp
3752            (when (nth 1 found)  ;;                                       shell-prompt-pattern)))
3753              (pop-to-buffer (buffer-name))  ;;             (pop-to-buffer (buffer-name))
3754              (kill-process p)  ;;             (kill-process p)
3755              (error "`su' failed: %s" (nth 1 found))))  ;;             (error "Couldn't find remote shell prompt"))
3756    ;;           (when (nth 1 found)
3757    ;;             (pop-to-buffer (buffer-name))
3758    ;;             (kill-process p)
3759    ;;             (error "`su' failed: %s" (nth 1 found))))
3760    
3761          (tramp-open-connection-setup-interactive-shell          (tramp-open-connection-setup-interactive-shell
3762           p multi-method method user host)           p multi-method method user host)
3763          (tramp-post-connection multi-method method          (tramp-post-connection multi-method method
# Line 4099  If USER is nil, uses the return value of Line 3848  If USER is nil, uses the return value of
3848      (erase-buffer)      (erase-buffer)
3849      (tramp-message 9 "Sending telnet command `%s'" cmd1)      (tramp-message 9 "Sending telnet command `%s'" cmd1)
3850      (process-send-string p cmd)      (process-send-string p cmd)
3851      (tramp-message 9 "Waiting 30s for login prompt from %s" host)      (tramp-process-actions multi-method method user host
3852      (unless (tramp-wait-for-regexp p 30 tramp-login-prompt-regexp)                             tramp-actions-before-shell)
3853        (pop-to-buffer (buffer-name))  
3854        (kill-process p)  ;;     (tramp-message 9 "Waiting 30s for login prompt from %s" host)
3855        (error "Couldn't find login prompt from host %s" host))  ;;     (unless (tramp-wait-for-regexp p 30 tramp-login-prompt-regexp)
3856      (erase-buffer)  ;;       (pop-to-buffer (buffer-name))
3857      (tramp-message 9 "Sending login name %s" (or user (user-login-name)))  ;;       (kill-process p)
3858      (process-send-string p (concat (or user (user-login-name)) tramp-rsh-end-of-line))  ;;       (error "Couldn't find login prompt from host %s" host))
3859      (tramp-message 9 "Waiting for password prompt")  ;;     (erase-buffer)
3860      (unless (setq found (tramp-wait-for-regexp p nil tramp-password-prompt-regexp))  ;;     (tramp-message 9 "Sending login name %s" (or user (user-login-name)))
3861        (pop-to-buffer (buffer-name))  ;;     (process-send-string p (concat (or user (user-login-name)) tramp-rsh-end-of-line))
3862        (kill-process p)  ;;     (tramp-message 9 "Waiting for password prompt")
3863        (error "Couldn't find password prompt from host %s" host))  ;;     (unless (setq found (tramp-wait-for-regexp p nil tramp-password-prompt-regexp))
3864      (erase-buffer)  ;;       (pop-to-buffer (buffer-name))
3865      (setq pw (tramp-read-passwd  ;;       (kill-process p)
3866                (format "Password for %s@%s, %s" (or user (user-login-name)) host found)))  ;;       (error "Couldn't find password prompt from host %s" host))
3867      (tramp-message 9 "Sending password")  ;;     (erase-buffer)
3868      (process-send-string p (concat pw tramp-rsh-end-of-line))  ;;     (setq pw (tramp-read-passwd
3869      (tramp-message 9 "Waiting 60s for remote shell to come up...")  ;;               (format "Password for %s@%s, %s" (or user (user-login-name)) host found)))
3870      (unless (setq found (tramp-wait-for-regexp  ;;     (tramp-message 9 "Sending password")
3871                           p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;     (process-send-string p (concat pw tramp-rsh-end-of-line))
3872                                        tramp-wrong-passwd-regexp  ;;     (tramp-message 9 "Waiting 60s for remote shell to come up...")
3873                                        shell-prompt-pattern)))  ;;     (unless (setq found (tramp-wait-for-regexp
3874        (pop-to-buffer (buffer-name))  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"
3875        (kill-process p)  ;;                                       tramp-wrong-passwd-regexp
3876        (error "Couldn't find shell prompt from host %s" host))  ;;                                       shell-prompt-pattern)))
3877      (when (nth 1 found)  ;;       (pop-to-buffer (buffer-name))
3878        (pop-to-buffer (buffer-name))  ;;       (kill-process p)
3879        (kill-process p)  ;;       (error "Couldn't find shell prompt from host %s" host))
3880        (error "Login to %s failed: %s" (nth 2 found)))))  ;;     (when (nth 1 found)
3881    ;;       (pop-to-buffer (buffer-name))
3882    ;;       (kill-process p)
3883    ;;       (error "Login to %s failed: %s" (nth 2 found)))
3884        ))
3885    
3886  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
3887  ;;      of no user name provided.  Hack to make it work as it did before:    ;;      of no user name provided.  Hack to make it work as it did before:  
# Line 4153  If USER is nil, uses the return value of Line 3906  If USER is nil, uses the return value of
3906      (erase-buffer)      (erase-buffer)
3907      (tramp-message 9 "Sending rlogin command `%s'" cmd1)      (tramp-message 9 "Sending rlogin command `%s'" cmd1)
3908      (process-send-string p cmd)      (process-send-string p cmd)
3909      (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)      (tramp-process-actions multi-method method user host
3910      (unless (setq found                             tramp-actions-before-shell)
3911                    (tramp-wait-for-regexp p 60  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
3912                                         (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;     (unless (setq found
3913                                                 tramp-password-prompt-regexp  ;;                   (tramp-wait-for-regexp p 60
3914                                                 shell-prompt-pattern)))  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"
3915        (pop-to-buffer (buffer-name))  ;;                                                tramp-password-prompt-regexp
3916        (kill-process p)  ;;                                                shell-prompt-pattern)))
3917        (error "Couldn't find remote shell or passwd prompt"))  ;;       (pop-to-buffer (buffer-name))
3918      (when (nth 1 found)  ;;       (kill-process p)
3919        (erase-buffer)  ;;       (error "Couldn't find remote shell or passwd prompt"))
3920        (tramp-message 9 "Sending password...")  ;;     (when (nth 1 found)
3921        (tramp-enter-password p (nth 1 found))  ;;       (erase-buffer)
3922        (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")  ;;       (tramp-message 9 "Sending password...")
3923        (setq found (tramp-wait-for-regexp p 60  ;;       (tramp-enter-password p (nth 1 found))
3924                                           (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
3925                                                   tramp-wrong-passwd-regexp  ;;       (setq found (tramp-wait-for-regexp p 60
3926                                                   shell-prompt-pattern))))  ;;                                          (format "\\(%s\\)\\|\\(%s\\)\\'"
3927      (unless found  ;;                                                  tramp-wrong-passwd-regexp
3928        (pop-to-buffer (buffer-name))  ;;                                                  shell-prompt-pattern))))
3929        (kill-process p)  ;;     (unless found
3930        (error "Couldn't find remote shell prompt"))  ;;       (pop-to-buffer (buffer-name))
3931      (when (nth 1 found)  ;;       (kill-process p)
3932        (pop-to-buffer (buffer-name))  ;;       (error "Couldn't find remote shell prompt"))
3933        (kill-process p)  ;;     (when (nth 1 found)
3934        (error "Login failed: %s" (nth 1 found)))))  ;;       (pop-to-buffer (buffer-name))
3935    ;;       (kill-process p)
3936    ;;       (error "Login failed: %s" (nth 1 found)))
3937        ))
3938    
3939  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case  ;; HHH: Changed.  Multi method.  Don't know how to handle this in the case
3940  ;;      of no user name provided.  Hack to make it work as it did before:    ;;      of no user name provided.  Hack to make it work as it did before:  
# Line 4204  character." Line 3960  character."
3960      (erase-buffer)      (erase-buffer)
3961      (tramp-message 9 "Sending su command `%s'" cmd1)      (tramp-message 9 "Sending su command `%s'" cmd1)
3962      (process-send-string p cmd)      (process-send-string p cmd)
3963      (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or user (user-login-name)))      (tramp-process-actions multi-method method user host
3964      (unless (setq found (tramp-wait-for-regexp                             tramp-actions-before-shell)
3965                           p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or user (user-login-name)))
3966                                        tramp-password-prompt-regexp  ;;     (unless (setq found (tramp-wait-for-regexp
3967                                        shell-prompt-pattern)))  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"
3968        (pop-to-buffer (buffer-name))  ;;                                       tramp-password-prompt-regexp
3969        (kill-process p)  ;;                                       shell-prompt-pattern)))
3970        (error "Couldn't find shell or passwd prompt for %s"  ;;       (pop-to-buffer (buffer-name))
3971               (or user (user-login-name))))  ;;       (kill-process p)
3972      (when (nth 1 found)  ;;       (error "Couldn't find shell or passwd prompt for %s"
3973        (tramp-message 9 "Sending password...")  ;;           (or user (user-login-name))))
3974        (tramp-enter-password p (nth 1 found))  ;;     (when (nth 1 found)
3975        (erase-buffer)  ;;       (tramp-message 9 "Sending password...")
3976        (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")  ;;       (tramp-enter-password p (nth 1 found))
3977        (setq found (tramp-wait-for-regexp p 60  ;;       (erase-buffer)
3978                                         (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
3979                                                 tramp-wrong-passwd-regexp  ;;       (setq found (tramp-wait-for-regexp p 60
3980                                                 shell-prompt-pattern))))  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"
3981      (unless found  ;;                                                tramp-wrong-passwd-regexp
3982        (pop-to-buffer (buffer-name))  ;;                                                shell-prompt-pattern))))
3983        (kill-process p)  ;;     (unless found
3984        (error "Couldn't find remote shell prompt"))  ;;       (pop-to-buffer (buffer-name))
3985      (when (nth 1 found)  ;;       (kill-process p)
3986        (pop-to-buffer (buffer-name))  ;;       (error "Couldn't find remote shell prompt"))
3987        (kill-process p)  ;;     (when (nth 1 found)
3988        (error "Login failed: %s" (nth 1 found)))))  ;;       (pop-to-buffer (buffer-name))
3989    ;;       (kill-process p)
3990    ;;       (error "Login failed: %s" (nth 1 found)))
3991        ))
3992    
3993  ;; Utility functions.  ;; Utility functions.
3994    

Legend:
Removed from v.2.145  
changed lines
  Added in v.2.146

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26