Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Feb 2026 13:38:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 293060] _PATH_RLOGIN is outdated
Message-ID:  <bug-293060-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293060

            Bug ID: 293060
           Summary: _PATH_RLOGIN is outdated
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: cross@gajendra.net

By way of context, for those that may not remember, the Berkeley "r" commands
(rlogin/rsh/rcp) were early networking utilities that allowed users to login
into, execute commands on, and copy files to and from, remote machines.  They
used per-user and per-host configuration files to determine whether access was
permitted or not, and relied on the client being able to access privileged
("reserved") TCP ports to prevent spoofing (see `rcmd(3)`).  As such, they were
not particularly secure, and once SSH became available and ubiquitous, quickly
fell out of favor.  They were removed from the FreeBSD base distribution many
years ago.

However, for connecting to old systems on closed networks, they can be handy
(at least, the clients, if not the servers), and so there is a package for them
in ports.

Unfortunately, that package relies on symbols from <paths.h> (`_PATH_RLOGIN`,
specifically) that is still refers to their old pathnames from the 4.4BSD days.
 The `rsh` ("remote shell") program, for example, is intended for executing
commands on a remote system, but invoked with no command specified, it will
instead exec "rlogin" locally, allowing one to login to a remote host by
typing, "rsh host".  But this fails since the package attempts to `argv[0] =
"rlogin"; execv(_PATH_RLOGIN, argv);`.

This is easy enough to work around in the port
(https://github.com/jlehen/bsdrcmds/pull/2), but that symbol, along with
_PATH_RSH and _PATH_RCP, should probably be removed from the base system.  I
would argue that the `rcmd` et al library functions should probably also be
removed, or at least moved out of libc and into a compatibility library
(possibly provided by the port) if not.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-293060-227>