* nntp.el (nntp-via-rlogin-command-switches): New variable.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 28 Jun 2002 11:53:11 +0000 (11:53 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 28 Jun 2002 11:53:11 +0000 (11:53 +0000)
(nntp-open-via-rlogin-and-telnet): Re-revert; use the var above.

* gnus.texi (NNTP): Add nntp-via-rlogin-command-switches.

lisp/ChangeLog
lisp/nntp.el
texi/ChangeLog
texi/gnus.texi

index 678fc77..a9a4e1b 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-28  Katsumi Yamaoka <yamaoka@jpl.org>
+
+       * 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\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * message.el (message-font-lock-keywords): Don't fontify
index 92560b6..023e916 100644 (file)
@@ -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))
index d341985..baaca3a 100644 (file)
@@ -1,3 +1,7 @@
+2002-06-28  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (NNTP): Add nntp-via-rlogin-command-switches.
+
 2002-06-27  Kai Gro\e,b_\e(Bjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * gnus.texi (Mail Back End Variables): Document
index 8a66c32..4518e27 100644 (file)
@@ -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