purge uses of alloca
[unix-history] / usr / src / libexec / rexecd / rexecd.8
CommitLineData
df119935
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
8412ed9b 3.\"
df119935
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8412ed9b 15.\"
df119935
KB
16.\" @(#)rexecd.8 6.3 (Berkeley) %G%
17.\"
18.TH REXECD 8 ""
8412ed9b
KM
19.UC 5
20.SH NAME
21rexecd \- remote execution server
22.SH SYNOPSIS
23.B /etc/rexecd
24.SH DESCRIPTION
25.I Rexecd
26is the server for the
df119935 27.IR rexec (3)
8412ed9b 28routine. The server provides remote execution facilities
e21fbf8d 29with authentication based on user names and
8412ed9b
KM
30passwords.
31.PP
32.I Rexecd
33listens for service requests at the port indicated in
34the ``exec'' service specification; see
35.IR services (5).
36When a service request is received the following protocol
37is initiated:
38.IP 1)
39The server reads characters from the socket up
40to a null (`\e0') byte. The resultant string is
41interpreted as an ASCII number, base 10.
42.IP 2)
43If the number received in step 1 is non-zero,
44it is interpreted as the port number of a secondary
45stream to be used for the
46.BR stderr .
47A second connection is then created to the specified
48port on the client's machine.
49.IP 3)
50A null terminated user name of at most 16 characters
51is retrieved on the initial socket.
52.IP 4)
e21fbf8d 53A null terminated, unencrypted password of at most
8412ed9b
KM
5416 characters is retrieved on the initial socket.
55.IP 5)
56A null terminated command to be passed to a
57shell is retrieved on the initial socket. The length of
58the command is limited by the upper bound on the size of
59the system's argument list.
60.IP 6)
61.I Rexecd
62then validates the user as is done at login time
63and, if the authentication was successful, changes
64to the user's home directory, and establishes the user
65and group protections of the user.
66If any of these steps fail the connection is
67aborted with a diagnostic message returned.
68.IP 7)
e21fbf8d 69A null byte is returned on the initial socket
8412ed9b
KM
70and the command line is passed to the normal login
71shell of the user. The
72shell inherits the network connections established
73by
74.IR rexecd .
75.SH DIAGNOSTICS
e21fbf8d
JL
76Except for the last one listed below,
77all diagnostic messages are returned on the initial socket,
8412ed9b
KM
78after which any network connections are closed.
79An error is indicated by a leading byte with a value of
801 (0 is returned in step 7 above upon successful completion
81of all the steps prior to the command execution).
82.PP
83.B ``username too long''
84.br
85The name is
86longer than 16 characters.
87.PP
88.B ``password too long''
89.br
90The password is longer than 16 characters.
91.PP
92.B ``command too long ''
93.br
94The command line passed exceeds the size of the argument
95list (as configured into the system).
96.PP
97.B ``Login incorrect.''
98.br
99No password file entry for the user name existed.
100.PP
101.B ``Password incorrect.''
102.br
103The wrong was password supplied.
104.PP
105.B ``No remote directory.''
106.br
107The
108.I chdir
109command to the home directory failed.
110.PP
111.B ``Try again.''
112.br
113A
114.I fork
115by the server failed.
116.PP
e21fbf8d 117.B ``<shellname>: ...''
8412ed9b
KM
118.br
119The user's login shell could not be started.
e21fbf8d
JL
120This message is returned
121on the connection associated with the
122.BR stderr ,
123and is not preceded by a flag byte.
124.SH SEE ALSO
df119935 125rexec(3)
8412ed9b
KM
126.SH BUGS
127Indicating ``Login incorrect'' as opposed to ``Password incorrect''
128is a security breach which allows people to probe a system for users
129with null passwords.
130.PP
e21fbf8d 131A facility to allow all data and password exchanges to be encrypted should be
8412ed9b 132present.