Home | History | Annotate | only in /src/usr.bin/rsh
History log of /src/usr.bin/rsh
RevisionDateAuthorComments
 1.20 14-Apr-2009  lukem Enable WARNS=4 by default for usr.bin, except for:
awk bdes checknr compile_et error gss hxtool kgetcred kinit
klist ldd less lex locale login m4 man menuc mk_cmds
mklocale msgc openssl rpcgen rpcinfo sdiff spell ssh
string2key telnet tn3270 verify_krb5_conf xlint
 1.19 28-May-2007  tls branches: 1.19.20;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.18 23-Mar-2006  wiz Remove some more old kerberos4 code. Simplify usage.
 1.17 16-Oct-2004  christos - Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
- WARNS=3
 1.16 05-Sep-2004  manu Kerberos support is broken in rcommands, thus making -K -k and -x options
unavailable. Remove theses options from the man pages (it won't be very
hard to bring them back if we fix kerberos one day)
 1.15 19-Sep-2002  lukem branches: 1.15.2;
use NETBSDSRCDIR as appropriate
 1.14 14-Jun-2002  wiz WARNS=2
 1.13 18-Oct-2000  simonb Remove INSTALLFLAGS=-fschg, as per change to usr.bin/ssh/ssh/Makefile.
 1.12 24-Oct-1997  lukem branches: 1.12.10;
use CPPFLAGS instead of CFLAGS
 1.11 19-Oct-1997  lukem branches: 1.11.2;
don't define WARNS=1 here
 1.10 06-Jul-1997  christos Fix compiler warnings.
 1.9 02-Jun-1997  mrg rsh is not setuid anymore.
 1.8 08-May-1997  gwr Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
 1.7 06-May-1997  gwr Use .PATH.c: ...
 1.6 24-Feb-1997  mrg oops, rsh is still setuid root for the moment.
 1.5 17-Feb-1997  mrg merge lite2 stuff; fix a bit.
 1.4 16-Feb-1997  mrg merge lite2 changes.
 1.3 09-Jan-1997  tls RCS ID police
 1.2 30-Jul-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 16-Feb-1997  mrg lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11.2.1 08-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.12.10.1 18-Oct-2000  tv Pull up 1.13 [simonb]:
Remove INSTALLFLAGS=-fschg.
 1.15.2.1 12-Nov-2004  jmc Pullup patch (requested by hubert in ticket #928)

- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
 1.19.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2004  christos branches: 1.1.2; 1.1.28;
- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
- WARNS=3
 1.1.28.1 18-May-2008  yamt sync with head.
 1.1.2.2 12-Nov-2004  jmc Pullup rev new (requested by hubert in ticket #928)

- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
 1.1.2.1 16-Oct-2004  jmc file getport.c was added on branch netbsd-2-0 on 2004-11-12 05:51:56 +0000
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 16-Oct-2004  christos branches: 1.1.2; 1.1.28;
- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
- WARNS=3
 1.1.28.1 18-May-2008  yamt sync with head.
 1.1.2.2 12-Nov-2004  jmc Pullup rev new (requested by hubert in ticket #928)

- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
 1.1.2.1 16-Oct-2004  jmc file getport.h was added on branch netbsd-2-0 on 2004-11-12 05:51:58 +0000
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.4 16-Feb-1997  mrg merge lite2 changes.
 1.3 09-Jan-1997  tls RCS ID police
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 16-Feb-1997  mrg lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.21 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.20 11-Mar-2005  ginsbach Support -4 and -6. Approved by christos.
 1.19 05-Sep-2004  wiz Bump date for removal of Kerberos option descriptions.
Remove dots at end of SEE ALSO.
 1.18 05-Sep-2004  manu Kerberos support is broken in rcommands, thus making -K -k and -x options
unavailable. Remove theses options from the man pages (it won't be very
hard to bring them back if we fix kerberos one day)
 1.17 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.16 04-Jul-2003  wiz Remove trailing whitespace.
 1.15 26-May-2003  lukem * Document $RCMD_CMD in environ(7).
* Cross-reference rcmd(1), rcmd(3), and environ(7) as appropriate.

Should fix [bin/21670] from Geoff Wing.
 1.14 07-Apr-2003  wiz Some mdoc fixes; drop some unnecessary whitespace.
 1.13 07-Apr-2003  hubertf Add -p option to rsh and rlogin to allow specifying a non-standard port
number.
 1.12 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.11 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 04-Apr-2001  wiz kerberos(3) -> (8). Sort SEE ALSO.
 1.9 22-Mar-1999  garbled branches: 1.9.10;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.8 26-Nov-1997  tv Add xrefs to new hosts.equiv(5)/rhosts(5) man page.
 1.7 19-Oct-1997  lukem branches: 1.7.2;
fix up .Nm usage
 1.6 05-Jun-1997  mikel fix typo in SYNOPSIS, nuke duplicate RCSid
 1.5 17-Feb-1997  mrg merge lite2 stuff; fix a bit.
 1.4 16-Feb-1997  mrg merge lite2 changes.
 1.3 09-Jan-1997  tls RCS ID police
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 16-Feb-1997  mrg lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.2.1 27-Nov-1997  mellon Pull rev 1.8 up from trunk (tv)
 1.9.10.1 26-Apr-2001  he Pull up revision 1.10 (requested by wiz):
Correct kerberos reference to kerberos(8). Sort SEE ALSO section.
 1.39 13-Apr-2021  mrg more GCC 10 fixes.

mDNSResponder: another wrong return local address

dhcp: ignore a seemingly impossible stringop overflow

hpacel: avoid maybe uninitialised error that is wrong.

rsh: avoid impossible malloc(0)

udf: cast pointers through (uintptr_t) to fool invalid boundary checks
 1.38 26-Nov-2014  enami Changes done in rsh.c rev. 1.36 was incomplete. As chuq pointed
in private mail, it broke rcp(1).

To achieve the documented behavior and to fix long standing incorrect
rsh(1) behavior which I've tried to fix in rev. 1.36, rcmd(1) should have
two operation mode; whether it should relay signal information on
auxiliary channel or not, depending on the argument `fd2p' passed to rcmd(3).
So, make rcmd(1) behave differntly depending on the environment variable and
set it when necessary in rcmd(3) according to how auxiliary channel
is set up by rcmd(3).
 1.37 30-Oct-2014  dholland Drop setuid before execing rlogin. Failure to do so should be
harmless, but is sloppy.
 1.36 08-Jun-2014  enami branches: 1.36.2;
Fix signal delivery to remote process; As described in rcmd(3), a signal
is delivered to the remote process via the secondary channel. So,
the backend driver, rcmd(1), is responsible to watch the file descriptor 2
and transfer the data to the remote process, rather than receiving signal
by itself. Previously, signal generated by tty was sent since rcmd was
incorrectly generated the data, but, for example, signal sent to rsh command
by kill command was ignored.
 1.35 08-Jun-2014  enami Whitespace nits.
 1.34 08-Jun-2014  enami Remove kerberos support code completely. It no longer compiles anyway.
OK'ed by christos on tech-userlevel.
 1.33 29-Aug-2011  joerg branches: 1.33.8; 1.33.18;
static + __dead
 1.32 02-Oct-2010  gson putenv() no longer accepts a const string
 1.31 18-Jan-2009  lukem fix -Wsign-compare issues
 1.30 21-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.29 23-Mar-2006  wiz branches: 1.29.22;
Remove some more old kerberos4 code. Simplify usage.
 1.28 17-Mar-2006  ginsbach Fix Coverity issue 1236, negative return from read() passed to write()
as a large unsigned valued when read() is interrupted (errno == EINTR).
 1.27 11-Mar-2005  ginsbach Add -4 and -6 to usage.
 1.26 11-Mar-2005  ginsbach Support -4 and -6. Approved by christos.
 1.25 13-Jan-2005  ginsbach Whitespace fix-ups.
 1.24 16-Oct-2004  christos remove unused variable
 1.23 16-Oct-2004  christos - Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
- WARNS=3
 1.22 07-Aug-2003  agc branches: 1.22.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.21 23-Jul-2003  itojun include des.h, not kerberosIV/des.h
 1.20 14-Jun-2003  joff use TCP_NODELAY
 1.19 22-May-2003  hubertf set s_proto properly

XXX this doesn't help with rsh insisting on a reserved port, which of course
fails for non root users. and which only seems to happen when given
ports >1023, funny enough. anyone? :/
 1.18 15-May-2003  itojun use strlcpy
 1.17 07-Apr-2003  hubertf Add -p option to rsh and rlogin to allow specifying a non-standard port
number.
 1.16 16-Nov-2002  itojun use strlcpy
 1.15 14-Jun-2002  wiz Remove #ifdef __STDC__. De-__P() and ANSIfy.
 1.14 19-Feb-2001  cgd convert to use getprogname()
 1.13 31-Jan-2000  itojun IPv6 support. (I thought I've committed these but was not yet)
 1.12 20-Jul-1997  christos Add prototype for orcmd.
 1.11 06-Jul-1997  christos Fix compiler warnings.
 1.10 16-Jun-1997  christos - PR/3727: Wolfgang Rupprecht: rsh takes 80% of the cpu
- rsh/rcmd combinations don't die sometimes, and spin in poll loops
+ detect errors from read/write etc, don't ignore them in some cases
+ use INFTIM instead of 0 in poll
+ detect invalid file descriptors in poll
+ use varargs/stdarg as appropriate
+ use posix signal calls
+ EWOULDBLOCK -> EAGAIN
 1.9 05-Jun-1997  mrg fix PR#3710, reported by Tatoku Ogaito <tacha@trap.fukui-med.ac.jp>.
- don't pass pw->pw_name into functions; make a copy.
 1.8 02-Jun-1997  mrg rcmd(1) does not use argv[0] for hostname, like rsh does.
apply patch for pr#3695 from <hannken@ppp-jhi.eis.cs.tu-bs.de>.
 1.7 26-May-1997  mrg add bits to allow this to be compiled as rcmd.
 1.6 19-Mar-1997  mikel use FD_SETSIZE instead of manifest constant for select(2); from Rolf
Grossman in PR bin/3338.
 1.5 16-Feb-1997  mrg merge lite2 changes.
 1.4 09-Jan-1997  tls branches: 1.4.2;
RCS ID police
 1.3 27-Jun-1995  jtc sys/signal.h -> signal.h
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 16-Feb-1997  mrg lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.5 21-May-1997  mrg clean up a bit, and fix a bug in the child rcmd process.
 1.4.2.4 17-Feb-1997  mrg merge lite2 stuff; fix a bit.
 1.4.2.3 16-Feb-1997  mrg remove register; select -> poll
 1.4.2.2 16-Feb-1997  mrg rcmd fixes: oops: -u takes an arg; getpwuid() earlier; -u can be "me".
 1.4.2.1 16-Feb-1997  mrg if #ifdef IN_RCMD, handle being rcmd(1).
 1.22.2.1 12-Nov-2004  jmc Pullup rev 1.23 (requested by hubert in ticket #928)

- Fix bug in port parsing code; s_port must be in network byte order.
- Factor out port parsing code and add error checking to it.
 1.29.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.33.18.1 10-Aug-2014  tls Rebase.
 1.33.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.36.2.1 01-Dec-2014  martin Pull up following revision(s) (requested by enami in ticket #286):
usr.bin/rsh/rsh.c: revision 1.38
lib/libc/net/rcmd.c: revision 1.71
Changes done in rsh.c rev. 1.36 was incomplete. As chuq pointed
in private mail, it broke rcp(1).
To achieve the documented behavior and to fix long standing incorrect
rsh(1) behavior which I've tried to fix in rev. 1.36, rcmd(1) should have
two operation mode; whether it should relay signal information on
auxiliary channel or not, depending on the argument `fd2p' passed to rcmd(3).
So, make rcmd(1) behave differntly depending on the environment variable and
set it when necessary in rcmd(3) according to how auxiliary channel
is set up by rcmd(3).

RSS XML Feed