[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e13509468b: Make "rlogin" method obsolete in url*.el
From: |
Stefan Kangas |
Subject: |
master e13509468b: Make "rlogin" method obsolete in url*.el |
Date: |
Sat, 3 Sep 2022 01:23:17 -0400 (EDT) |
branch: master
commit e13509468b7cc733c3511310d999554e6bcda708
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Make "rlogin" method obsolete in url*.el
* lisp/url/url-about.el (url-probe-protocols): Remove "rlogin".
* lisp/url/url-gw.el (url-gateway-rlogin-host)
(url-gateway-rlogin-user-name, url-gateway-rlogin-parameters)
(url-open-rlogin): Make obsolete. (Bug#56891)
(url-open-stream):
* lisp/url/url-misc.el (url-do-terminal-emulator): Warn when using
"rlogin".
(url-rlogin): Make obsolete.
* lisp/url/url-vars.el (url-gateway-method): Remove "rlogin"
choice.
* lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once)
* lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once): New
variables, immediately marked obsolete.
* doc/misc/url.texi (telnet/tn3270): Rename section from
"rlogin/telnet/tn3270".
(Gateways in general, Customization): Don't mention "rlogin"
method.
---
doc/misc/url.texi | 36 +++++++-----------------------------
etc/NEWS | 12 ++++++++++++
lisp/obsolete/url-about.el | 2 +-
lisp/url/url-gw.el | 15 ++++++++++++---
lisp/url/url-misc.el | 8 +++++++-
lisp/url/url-vars.el | 2 --
6 files changed, 39 insertions(+), 36 deletions(-)
diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index 5644027f95..546639b017 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -380,7 +380,7 @@ for specific schemes.
* info:: Emacs "Info" pages.
* mailto:: Sending email.
* news/nntp/snews:: Usenet news.
-* rlogin/telnet/tn3270:: Remote host connectivity.
+* telnet/tn3270:: Remote host connectivity.
* irc:: Internet Relay Chat.
* data:: Embedded data URLs.
* nfs:: Networked File System.
@@ -675,9 +675,8 @@ environment variable @samp{NNTPSERVER}, or @samp{news} if
that
environment variable is unset.
@end defopt
-@node rlogin/telnet/tn3270
-@section rlogin, telnet and tn3270
-@cindex rlogin
+@node telnet/tn3270
+@section telnet and tn3270
@cindex telnet
@cindex tn3270
@cindex terminal emulation
@@ -694,10 +693,10 @@ telnet://@var{user}:@var{password}@@@var{host}:@var{port}
but the @var{password} component is ignored. By default, the
@code{telnet} scheme is handled via Tramp (@pxref{Tramp}).
-To handle rlogin, telnet and tn3270 URLs, a @code{rlogin},
-@code{telnet} or @code{tn3270} (the program names and arguments are
-hardcoded) session is run in a @code{terminal-emulator} buffer.
-Well-known ports are used if the URL does not specify a port.
+To handle telnet and tn3270 URLs, a @code{telnet} or @code{tn3270}
+(the program names and arguments are hardcoded) session is run in a
+@code{terminal-emulator} buffer. Well-known ports are used if the URL
+does not specify a port.
@node irc
@section irc
@@ -1039,12 +1038,6 @@ a list of symbols. Possible values are:
Use this method if you must first telnet and log into a gateway host,
and then run telnet from that host to connect to outside machines.
-@item rlogin
-@cindex @command{rlogin}
-This method is identical to @code{telnet}, but uses @command{rlogin}
-to log into the remote machine without having to send the username and
-password over the wire every time.
-
@item socks
@cindex @sc{socks}
Use if the firewall has a @sc{socks} gateway running on it. The
@@ -1087,19 +1080,6 @@ The password to send when logging in.
This is a regular expression that matches the shell prompt.
@end defopt
-@defopt url-gateway-rlogin-host
-Host to @samp{rlogin} to before telnetting out.
-@end defopt
-@defopt url-gateway-rlogin-parameters
-Parameters to pass to @samp{rsh}.
-@end defopt
-@defopt url-gateway-rlogin-user-name
-User name to use when logging in to the gateway.
-@end defopt
-@defopt url-gateway-prompt-pattern
-This is a regular expression that matches the shell prompt.
-@end defopt
-
@defopt socks-server
This specifies the default server, it takes the form
@w{@code{("Default server" @var{server} @var{port} @var{version})}}
@@ -1327,8 +1307,6 @@ from the local machine. The supported methods are:
@table @code
@item telnet
Run telnet in a subprocess to connect;
-@item rlogin
-Rlogin to another machine to connect;
@item socks
Connect through a socks server;
@item ssl
diff --git a/etc/NEWS b/etc/NEWS
index 5feef9aa63..255d92414f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -356,6 +356,18 @@ the major mode according to 'initial-major-mode', like at
Emacs
startup. Previously, these functions ignored
'initial-scratch-message' and left "*scratch*" in 'fundamental-mode'.
+---
+** The 'rlogin' method in the URL library is now obsolete.
+Emacs will now display a warning if you request a URL like
+"rlogin://foo@example.org".
+
+---
+** Setting 'url-gateway-method' to 'rlogin' is now obsolete.
+Emacs will now display a warning when setting it to that value.
+The user options 'url-gateway-rlogin-host',
+'url-gateway-rlogin-parameters', and 'url-gateway-rlogin-user-name'
+are also obsolete.
+
---
** The autoarg.el library is now marked obsolete.
This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor
diff --git a/lisp/obsolete/url-about.el b/lisp/obsolete/url-about.el
index 608df3f2a5..b9f8732b28 100644
--- a/lisp/obsolete/url-about.el
+++ b/lisp/obsolete/url-about.el
@@ -32,7 +32,7 @@
(or (get 'url-extension-protocols 'probed)
(mapc (lambda (s) (url-scheme-get-property s 'name))
(or (get 'url-extension-protocols 'schemes)
- (let ((schemes '("info" "man" "rlogin" "telnet"
+ (let ((schemes '("info" "man" "telnet"
"tn3270" "data" "snews")))
(mapc (lambda (d)
(mapc (lambda (f)
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index c4a41f56b3..e4d1ca72a0 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -28,8 +28,6 @@
(require 'url-vars)
(require 'url-parse)
-;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program?
-
(autoload 'socks-open-network-stream "socks")
(defgroup url-gateway nil
@@ -51,17 +49,20 @@
"What hostname to actually rlog into before doing a telnet."
:type '(choice (const nil) string)
:group 'url-gateway)
+(make-obsolete-variable 'url-gateway-rlogin-host nil "29.1")
(defcustom url-gateway-rlogin-user-name nil
"Username to log into the remote machine with when using rlogin."
:type '(choice (const nil) string)
:group 'url-gateway)
+(make-obsolete-variable 'url-gateway-rlogin-user-name nil "29.1")
(defcustom url-gateway-rlogin-parameters '("telnet" "-8")
"Parameters to `url-open-rlogin'.
This list will be used as the parameter list given to rsh."
:type '(repeat string)
:group 'url-gateway)
+(make-obsolete-variable 'url-gateway-rlogin-parameters nil "29.1")
(defcustom url-gateway-telnet-host nil
"What hostname to actually login to before doing a telnet."
@@ -141,6 +142,7 @@ linked Emacs under SunOS 4.x."
;; Stolen from red gnus nntp.el
(defun url-open-rlogin (name buffer host service)
"Open a connection using rsh."
+ (declare (obsolete nil "29.1"))
(if (not (stringp service))
(setq service (int-to-string service)))
(let ((proc (if url-gateway-rlogin-user-name
@@ -205,6 +207,9 @@ linked Emacs under SunOS 4.x."
(delete-region (point) (point-max)))
proc)))
+(defvar url-gw-rlogin-obsolete-warned-once nil)
+(make-obsolete-variable url-gw-rlogin-obsolete-warned-once nil "29.1")
+
;;;###autoload
(defun url-open-stream (name buffer host service &optional gateway-method)
"Open a stream to HOST, possibly via a gateway.
@@ -255,7 +260,11 @@ overriding the value of `url-gateway-method'."
('telnet
(url-open-telnet name buffer host service))
('rlogin
- (url-open-rlogin name buffer host service))
+ (unless url-gw-rlogin-obsolete-warned-once
+ (lwarn 'url :error "Setting `url-gateway-method'
to `rlogin' is obsolete")
+ (setq url-gw-rlogin-obsolete-warned-once t))
+ (with-suppressed-warnings ((obsolete
url-open-rlogin))
+ (url-open-rlogin name buffer host service)))
(_
(error "Bad setting of url-gateway-method: %s"
url-gateway-method))))))
diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el
index 479f64c3e0..0c1f79a0c5 100644
--- a/lisp/url/url-misc.el
+++ b/lisp/url/url-misc.el
@@ -47,6 +47,9 @@
(error "Malformed url: %s" (url-recreate-url url)))
nil))
+(defvar url-misc-rlogin-obsolete-warned-once nil)
+(make-obsolete-variable url-misc-rlogin-obsolete-warned-once nil "29.1")
+
(defun url-do-terminal-emulator (type server port user)
(switch-to-buffer
(apply
@@ -58,6 +61,9 @@
(t (error "Unknown terminal emulator required: %s" type)))
nil
(cond ((eq type 'rlogin)
+ (unless url-misc-rlogin-obsolete-warned-once
+ (lwarn 'url :error "Method `rlogin' is obsolete")
+ (setq url-misc-rlogin-obsolete-warned-once t))
(if user (list server "-l" user) (list server)))
((eq type 'telnet)
(if port (list server port) (list server)))
@@ -74,7 +80,7 @@
nil)
;;;###autoload
-(defalias 'url-rlogin 'url-generic-emulator-loader)
+(define-obsolete-function-alias 'url-rlogin #'url-generic-emulator-loader
"29.1")
;;;###autoload
(defalias 'url-telnet 'url-generic-emulator-loader)
;;;###autoload
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 859a5c75ed..4cdca05554 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -350,13 +350,11 @@ Should be a symbol specifying how to get a connection
from the local machine.
Currently supported methods:
`telnet': Run telnet in a subprocess to connect;
-`rlogin': Rlogin to another machine to connect;
`socks': Connect through a socks server;
`tls': Connect with TLS;
`ssl': Connect with SSL (deprecated, use `tls' instead);
`native': Connect directly."
:type '(radio (const :tag "Telnet to gateway host" :value telnet)
- (const :tag "Rlogin to gateway host" :value rlogin)
(const :tag "Use SOCKS proxy" :value socks)
(const :tag "Use SSL/TLS for all connections" :value tls)
(const :tag "Use SSL for all connections (obsolete)" :value ssl)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e13509468b: Make "rlogin" method obsolete in url*.el,
Stefan Kangas <=