Bug 168388 - [libc] rcmd(3) recursion when RSH points to rsh
Summary: [libc] rcmd(3) recursion when RSH points to rsh
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-27 20:10 UTC by Darern Reed
Modified: 2018-05-20 23:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darern Reed freebsd_committer freebsd_triage 2012-05-27 20:10:01 UTC
In rcmd(3) the environment variable RSH is used to indicate which
program to execute in lieu of rsh itself. The code path present
in rcmd(3) and rcmdsh() will result in continual execution of
rsh if RSH is set to rsh itself. In fact, the RSH environment
variable can only be safely set to a program that does not use
rcmd(3).

What possibly needs to happen here is for rcmd(3) to clear the
RSH environment variable or otherwise make some effort to ensure
that the program it is about to execute is not the same as the
one that is currently executing.

How-To-Repeat: export RSH=rsh
rsh localhost who
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:50:35 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"