summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-12-02 12:30:04 +0000
committercharnier <charnier@FreeBSD.org>1997-12-02 12:30:04 +0000
commita3ea3db57512d9269c135a0609481f2ac6cae39d (patch)
tree198bc40666bb1ccee25e8ee53812b2977be1fba9 /libexec
parent9f2efa4db96cde0b43aa15421cda1aa2e4a138c1 (diff)
downloadFreeBSD-src-a3ea3db57512d9269c135a0609481f2ac6cae39d.zip
FreeBSD-src-a3ea3db57512d9269c135a0609481f2ac6cae39d.tar.gz
No \n in syslog() strings. Add man page to Xrefs. Change null byte to NUL byte.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rshd/rshd.844
-rw-r--r--libexec/rshd/rshd.c16
2 files changed, 37 insertions, 23 deletions
diff --git a/libexec/rshd/rshd.8 b/libexec/rshd/rshd.8
index 1f2ae32..73995a5 100644
--- a/libexec/rshd/rshd.8
+++ b/libexec/rshd/rshd.8
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)rshd.8 8.1 (Berkeley) 6/4/93
-.\" $Id: rshd.8,v 1.8 1997/04/23 03:06:47 davidn Exp $
+.\" $Id: rshd.8,v 1.9 1997/07/18 21:04:17 wosch Exp $
.\"
.Dd June 4, 1993
.Dt RSHD 8
@@ -43,7 +43,7 @@
.Op Fl alnL
.Sh DESCRIPTION
The
-.Nm rshd
+.Nm
server
is the server for the
.Xr rcmd 3
@@ -53,7 +53,7 @@ program. The server provides remote execution facilities
with authentication based on privileged port numbers from trusted hosts.
.Pp
The
-.Nm rshd
+.Nm
server
listens for service requests at the port indicated in
the ``cmd'' service specification; see
@@ -67,7 +67,9 @@ If the port is not in the range 512-1023, the server
aborts the connection.
.It
The server reads characters from the socket up
-to a null (`\e0') byte. The resultant string is
+to a
+.Tn NUL
+(`\e0') byte. The resultant string is
interpreted as an
.Tn ASCII
number, base 10.
@@ -85,7 +87,7 @@ and requests the corresponding host name (see
.Xr gethostbyaddr 3 ,
.Xr hosts 5
and
-.Xr named 8 ) .
+.Xr named 8 ).
If the hostname cannot be determined,
the dot-notation representation of the host address is used.
If the hostname is in the same domain as the server (according to
@@ -96,7 +98,7 @@ option is given,
the addresses for the hostname are requested,
verifying that the name and address correspond.
If address verification fails, the connection is aborted
-with the message, ``Host address mismatch.''
+with the message: ``Host address mismatch.''.
.It
A null terminated user name of at most 16 characters
is retrieved on the initial socket. This user name
@@ -126,7 +128,9 @@ file found in the user's home directory. The
.Fl l
option prevents
.Xr ruserok 3
-from doing any validation based on the user's ``.rhosts'' file,
+from doing any validation based on the user's
+.Pa .rhosts
+file,
unless the user is the superuser.
.It
If the file
@@ -134,18 +138,23 @@ If the file
exists and the user is not the superuser,
the connection is closed.
The name of the nologin file may be overridden
-using the nologin= capability in login.conf
+using the nologin capability in
+.Pa /etc/login.conf
according to the local user's login class,
-which may also be used to restrict rsh access by
+which may also be used to restrict
+.Xr rsh 1
+access by
login time (times.allow and times.deny capabilities)
and remote host (hosts.allow and hosts.deny capabilities).
.It
-A null byte is returned on the initial socket
+A
+.Tn NUL
+byte is returned on the initial socket
and the command line is passed to the normal login
shell of the user. The
shell inherits the network connections established
by
-.Nm rshd .
+.Nm Ns .
.El
.Pp
Transport-level keepalive messages are enabled unless the
@@ -184,18 +193,20 @@ No password file entry for the user name existed
or the authentication procedure described above failed.
.It Sy Remote directory.
The
-.Xr chdir
-command to the home directory failed.
+.Xr chdir 2
+function to the home directory failed.
.It Sy Logins not available right now.
-Rsh was attempted outside the allowed hours defined in
-login.conf for the local user's login class.
+.Xr Rsh 1
+was attempted outside the allowed hours defined in
+.Pa /etc/login.conf
+for the local user's login class.
.It Sy Can't make pipe.
The pipe needed for the
.Em stderr ,
wasn't created.
.It Sy Can't fork; try again.
A
-.Xr fork
+.Xr fork 2
by the server failed.
.It Sy <shellname>: ...
The user's login shell could not be started. This message is returned
@@ -220,6 +231,7 @@ and is not preceded by a flag byte.
.Bl -tag -width /etc/hosts -compact
.It Pa /etc/hosts
.It Pa /etc/hosts.equiv
+.It Pa /etc/login.conf
.It Pa $HOME/.rhosts
.It Pa /etc/nologin
.El
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c
index a5e8b6e..52e9c52 100644
--- a/libexec/rshd/rshd.c
+++ b/libexec/rshd/rshd.c
@@ -29,8 +29,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id: rshd.c,v 1.18 1997/07/18 21:04:19 wosch Exp $
*/
#ifndef lint
@@ -40,7 +38,11 @@ static const char copyright[] =
#endif /* not lint */
#ifndef lint
+#if 0
static const char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -239,7 +241,7 @@ doit(fromp)
#endif
fromp->sin_port = ntohs((u_short)fromp->sin_port);
if (fromp->sin_family != AF_INET) {
- syslog(LOG_ERR, "malformed \"from\" address (af %d)\n",
+ syslog(LOG_ERR, "malformed \"from\" address (af %d)",
fromp->sin_family);
exit(1);
}
@@ -259,7 +261,7 @@ doit(fromp)
u_char c = optbuf[i];
if (c == IPOPT_LSRR || c == IPOPT_SSRR) {
syslog(LOG_NOTICE,
- "Connection refused from %s with IP option %s",
+ "connection refused from %s with IP option %s",
inet_ntoa(fromp->sin_addr),
c == IPOPT_LSRR ? "LSRR" : "SSRR");
exit(1);
@@ -278,7 +280,7 @@ doit(fromp)
if (fromp->sin_port >= IPPORT_RESERVED ||
fromp->sin_port < IPPORT_RESERVED/2) {
syslog(LOG_NOTICE|LOG_AUTH,
- "Connection from %s on illegal port %u",
+ "connection from %s on illegal port %u",
inet_ntoa(fromp->sin_addr),
fromp->sin_port);
exit(1);
@@ -361,7 +363,7 @@ doit(fromp)
hp = gethostbyname(remotehost);
if (hp == NULL) {
syslog(LOG_INFO,
- "Couldn't look up address for %s",
+ "couldn't look up address for %s",
remotehost);
errorstr =
"Couldn't look up address for your host (%s)\n";
@@ -372,7 +374,7 @@ doit(fromp)
} else for (; ; hp->h_addr_list++) {
if (hp->h_addr_list[0] == NULL) {
syslog(LOG_NOTICE,
- "Host addr %s not listed for host %s",
+ "host addr %s not listed for host %s",
inet_ntoa(fromp->sin_addr),
hp->h_name);
errorstr =
OpenPOWER on IntegriCloud