don't accept connections from ports below 512
[unix-history] / usr / src / libexec / rlogind / rlogind.8
CommitLineData
9ada66f8
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
14dbbfdc 5.\" @(#)rlogind.8 6.3 (Berkeley) %G%
9ada66f8 6.\"
8859f23f 7.TH RLOGIND 8C ""
9ada66f8
KM
8.UC 5
9.SH NAME
10rlogind \- remote login server
11.SH SYNOPSIS
12.B /etc/rlogind
13[
14.B \-d
15]
16.SH DESCRIPTION
17.I Rlogind
18is the server for the
19.IR rlogin (1C)
20program. The server provides a remote login facility
be1d37d3 21with authentication based on privileged port numbers from trusted hosts.
9ada66f8
KM
22.PP
23.I Rlogind
24listens for service requests at the port indicated in
25the ``login'' service specification; see
26.IR services (5).
27When a service request is received the following protocol
28is initiated:
29.IP 1)
30The server checks the client's source port.
31If the port is not in the range 0-1023, the server
32aborts the connection.
33.IP 2)
14dbbfdc
MK
34The server checks the client's source address
35and requests the corresponding host name (see
be1d37d3
MK
36.IR gethostbyaddr (3N),
37.IR hosts (5)
38and
14dbbfdc
MK
39.IR named (8)).
40If the hostname cannot be determined,
be1d37d3 41the dot-notation representation of the host address is used.
9ada66f8
KM
42.PP
43Once the source port and address have been checked,
44.I rlogind
45allocates a pseudo terminal (see
46.IR pty (4)),
47and manipulates file descriptors so that the slave
48half of the pseudo terminal becomes the
49.B stdin ,
50.B stdout ,
51and
52.B stderr
53for a login process.
54The login process is an instance of the
55.IR login (1)
56program, invoked with the
57.B \-r
58option. The login process then proceeds with the authentication
59process as described in
60.IR rshd (8C),
61but if automatic authentication fails, it reprompts the user
62to login as one finds on a standard terminal line.
63.PP
64The parent of the login process manipulates the master side of
65the pseduo terminal, operating as an intermediary
66between the login process and the client instance of the
67.I rlogin
68program. In normal operation, the packet protocol described
69in
70.IR pty (4)
71is invoked to provide ^S/^Q type facilities and propagate
72interrupt signals to the remote programs. The login process
73propagates the client terminal's baud rate and terminal type,
74as found in the environment variable, ``TERM''; see
75.IR environ (7).
be1d37d3
MK
76The screen or window size of the terminal is requested from the client,
77and window size changes from the client are propagated to the pseudo terminal.
9ada66f8
KM
78.SH DIAGNOSTICS
79All diagnostic messages are returned on the connection
80associated with the
81.BR stderr ,
82after which any network connections are closed.
83An error is indicated by a leading byte with a value of 1.
84.PP
9ada66f8
KM
85.B ``Try again.''
86.br
87A
88.I fork
89by the server failed.
90.PP
91.B ``/bin/sh: ...''
92.br
93The user's login shell could not be started.
94.SH BUGS
95The authentication procedure used here assumes the integrity
96of each client machine and the connecting medium. This is
97insecure, but is useful in an ``open'' environment.
98.PP
99A facility to allow all data exchanges to be encrypted should be
100present.
14dbbfdc
MK
101.PP
102A more extensible protocol should be used.