History log of /openbsd-current/lib/libc/net/rcmdsh.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.19 28-May-2016 millert

Use getaddrinfo() instead of the non-standard gethostbyname2().
OK deraadt@ jca@ jung@ florian@


Revision tags: OPENBSD_5_9_BASE
# 1.18 24-Nov-2015 millert

Use reentrant versions of getpw{nam,uid} and getgr{nam,gid} within
libc to avoid reusing the static buffers returned by the non-reentrant
versions. Since this is inside libc we can use constants for the
buffer sizes instead of having to call sysconf().
OK guenther@ deraadt@


# 1.17 01-Nov-2015 guenther

delete old lint ARGSUSED comments


# 1.16 23-Oct-2015 guenther

Use waitpid() instead of wait() to avoid returning early from another child
exiting, and loop the waitpid() on EINTR

ok deraadt@ millert@


# 1.15 12-Sep-2015 guenther

Wrap <unistd.h> so that internal calls go direct and they're all weak symbols
Delete unused 'fd' argument from internal function oldttyname()


Revision tags: OPENBSD_5_8_BASE
# 1.14 23-Mar-2015 halex

Make rcmdsh(3) not fail if it is passed a non resolvable hostname.
Instead, silently ignore the fact and instead let the underlying
ssh (or $RSH) command handle it.

ok millert@


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
# 1.13 24-Apr-2014 jmc

uses ssh these days, not rsh; ok tedu


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.12 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.11 06-Aug-2005 espie

zap rcsid.
split functions off res_debug.c so that getnetnamadr.c does not pull it
all when it's used.

okay deraadt@, krw@


# 1.10 25-Mar-2005 otto

ansify. ok deraadt@ moritz@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.9 01-Apr-2004 marc

let rcmdsh work on hosts that don't have an ipv4 address.
If it works it is fine with me -- millert@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.8 05-May-2003 millert

Add support for command line args in rshprog, e.g. "ssh -C".


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.7 12-Mar-2002 millert

Tack on MagniComp (BSD) license since this originally came from rdist.


# 1.6 02-Jan-2002 deraadt

more pid_t use


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.5 25-Apr-1998 millert

Use PF_UNSPEC as proto in socketpair() instead of just 0 for clarity.


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.4 23-Jul-1997 millert

Don't do a gethostbyname() on "localhost" since we need it to
be unmolested when we test whether or not to use a local shell
instead of rsh.


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE
# 1.3 15-Sep-1996 tholo

Remove dead code
Remove unused variables
Silence some warnings
lint(1) is your friend


# 1.2 01-Sep-1996 millert

Don't dup stderr, you lose error messages and rsh does it for us anyway.


# 1.1 22-Aug-1996 millert

Adds rcmdsh() -- rcmd-alike using rsh (or specified shell).