From 333858eeedaa4bd692283a051ec05267ed4fb446 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Fri, 28 Jun 2002 11:53:11 +0000 Subject: [PATCH] * nntp.el (nntp-via-rlogin-command-switches): New variable. (nntp-open-via-rlogin-and-telnet): Re-revert; use the var above. * gnus.texi (NNTP): Add nntp-via-rlogin-command-switches. --- lisp/ChangeLog | 5 +++++ lisp/nntp.el | 18 ++++++++++++++---- texi/ChangeLog | 4 ++++ texi/gnus.texi | 10 ++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 678fc77e4..a9a4e1b24 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-06-28 Katsumi Yamaoka + + * nntp.el (nntp-via-rlogin-command-switches): New variable. + (nntp-open-via-rlogin-and-telnet): Re-revert; use the var above. + 2002-06-28 Kai Gro,b_(Bjohann * message.el (message-font-lock-keywords): Don't fontify diff --git a/lisp/nntp.el b/lisp/nntp.el index 92560b678..023e9164b 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -102,6 +102,12 @@ using and indirect connection method (nntp-open-via-*).") This command is used by the `nntp-open-via-rlogin-and-telnet' method. The default is \"rsh\", but \"ssh\" is a popular alternative.") +(defvoo nntp-via-rlogin-command-switches nil + "*Switches given to the rlogin command `nntp-via-rlogin-command'. +Set this to (\"-t\") if you use \"ssh\" for `nntp-via-rlogin-command' and +the telnet command requires a pseudo-tty allocation on an intermediate +host.") + (defvoo nntp-via-telnet-command "telnet" "*Telnet command used to connect to an intermediate host. This command is used by the `nntp-open-via-telnet-and-telnet' method.") @@ -1605,17 +1611,21 @@ Please refer to the following variables to customize the connection: - `nntp-end-of-line'." (let ((command `(,nntp-via-address ,nntp-telnet-command - ,@nntp-telnet-switches - ,nntp-address ,nntp-port-number)) + ,@nntp-telnet-switches)) proc) - (and nntp-via-user-name - (setq command `("-l" ,nntp-via-user-name ,@command))) + (when nntp-via-user-name + (setq command `("-l" ,nntp-via-user-name ,@command))) + (when nntp-via-rlogin-command-switches + (setq command (append nntp-via-rlogin-command-switches command))) (push nntp-via-rlogin-command command) (and nntp-pre-command (push nntp-pre-command command)) (setq proc (apply 'start-process "nntpd" buffer command)) (save-excursion (set-buffer buffer) + (nntp-wait-for-string "^r?telnet") + (process-send-string proc (concat "open " nntp-address + " " nntp-port-number "\n")) (nntp-wait-for-string "^\r*20[01]") (beginning-of-line) (delete-region (point-min) (point)) diff --git a/texi/ChangeLog b/texi/ChangeLog index d34198546..baaca3a21 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2002-06-28 Katsumi Yamaoka + + * gnus.texi (NNTP): Add nntp-via-rlogin-command-switches. + 2002-06-27 Kai Gro,b_(Bjohann * gnus.texi (Mail Back End Variables): Document diff --git a/texi/gnus.texi b/texi/gnus.texi index 8a66c32ba..4518e27d4 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -11560,6 +11560,8 @@ configuration to the example above: (nntp-via-rlogin-command "ssh") @end lisp +See also @code{nntp-via-rlogin-command-switches}. + If you're behind a firewall, but have direct access to the outside world through a wrapper command like "runsocks", you could open a socksified telnet connection to the news server as follows: @@ -12059,6 +12061,14 @@ you need to connect to a firewall machine first. @vindex nntp-via-rlogin-command Command used to log in on the intermediate host. The default is @samp{rsh}, but @samp{ssh} is a popular alternative. + +@item nntp-via-rlogin-command-switches +@vindex nntp-via-rlogin-command-switches +List of strings to be used as the switches to +@code{nntp-via-rlogin-command}. The default is @code{nil}. Set this to +@samp{("-t")} if you use @samp{ssh} for @code{nntp-via-rlogin-command} +and the telnet command requires a pseudo-tty allocation on an +intermediate host. @end table @item nntp-open-via-telnet-and-telnet -- 2.34.1