summaryrefslogtreecommitdiff
path: root/xhost.man
blob: 0d740a9662e82e41a96ef3eb0156d0bef54e31b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
.\" $Xorg: xhost.man,v 1.4 2001/02/09 02:05:46 xorgcvs Exp $
.\" Copyright 1988, 1998  The Open Group
.\" 
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
.\" 
.\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software.
.\" 
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\" 
.\" Except as contained in this notice, the name of The Open Group shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.\"
.\" $XFree86: xc/programs/xhost/xhost.man,v 1.9 2003/07/09 15:27:41 tsi Exp $
.\"
.TH XHOST 1 __xorgversion__
.SH NAME
xhost \- server access control program for X
.SH SYNOPSIS
.B xhost
[[+\-]name ...]
.SH DESCRIPTION
The \fIxhost\fP program 
is used to add and delete host names or user names to the list allowed
to make connections to the X server.  In the case of hosts, this provides
a rudimentary form of privacy control and security.  It is only sufficient
for a workstation (single user) environment, although it does limit the
worst abuses.  Environments which require more sophisticated measures should
implement the user-based mechanism or use the hooks in the
protocol for passing other authentication data to the server.
.SH OPTIONS
\fIXhost\fP accepts the following command line options described below.  For
security, the options that effect access control may only be run from the
"controlling host".  For workstations, this is the same machine as the
server.  For X terminals, it is the login host.
.TP 8
.B \-help
Prints a usage message.
.TP 8
.BI "[+]" "name"
The given \fIname\fP (the plus sign is optional)
is added to the list allowed to connect to the X server.
The name can be a host name or a user name.
.TP 8
.BI \- "name"
The given \fIname\fP is removed from the list of allowed
to connect to the server.  The name can be a host name or a user name.
Existing connections are not broken, but new
connection attempts will be denied.
Note that the current machine is allowed to be removed; however, further
connections (including attempts to add it back) will not be permitted.
Resetting the server (thereby breaking all connections) 
is the only way to allow local connections again.
.TP 8
.B \+
Access is granted to everyone, even if they aren't on the list
(i.e., access control is turned off).
.TP 8
.B \-
Access is restricted to only those on the list
(i.e., access control is turned on).
.TP 8
.I nothing
If no command line arguments are given,
a message indicating whether or not access control is currently enabled
is printed, followed by the list of those allowed to connect.
This is the only option that may be used from machines other than
the controlling host.
.SH NAMES
A complete name has the syntax
``family:name'' where the families are
as follows:
.PP
.nf
.ta 1i
inet	Internet host (IPv4)
inet6	Internet host (IPv6)
dnet	DECnet host
nis	Secure RPC network name
krb	Kerberos V5 principal
local	contains only one name, the empty string
.fi
.PP
The family is case insensitive.
The format of the name varies with the family.
.PP
When Secure RPC is being used, the
network independent netname (e.g., "nis:unix.\fIuid\fP@\fIdomainname\fP") can
be specified, or a local user can be specified with just the username
and a trailing at-sign (e.g., "nis:pat@").
.PP
For backward compatibility with pre-R6 \fIxhost\fP,
names that contain an at-sign (@) are assumed to be in the nis family.
Otherwise they are assumed to be Internet addresses. If compiled to support
IPv6, then all IPv4 and IPv6 addresses returned by getaddrinfo(3) are added to
the access list in the appropriate inet or inet6 family.
.SH DIAGNOSTICS
For each name added to the access control list,
a line of the form "\fIname\fP being added to access control list"
is printed.
For each name removed from the access control list,
a line of the form "\fIname\fP being removed from access control list"
is printed.
.SH FILES
/etc/X*.hosts
.SH "SEE ALSO"
X(__miscmansuffix__), Xsecurity(__miscmansuffix__), Xserver(1), xdm(1), getaddrinfo(3)
.SH ENVIRONMENT
.TP 8
.B DISPLAY
to get the default host and display to use.
.SH BUGS
.PP
You can't specify a display on the command line because
.B \-display 
is a valid command line argument (indicating that you want
to remove the machine named 
.I ``display''
from the access list).
.PP
The X server stores network addresses, not host names.  This is not
really a bug.  If somehow you change a host's network address while
the server is still running, \fIxhost\fP must be used to add the new
address and/or remove the old address.
.SH AUTHORS
Bob Scheifler, MIT Laboratory for Computer Science,
.br
Jim Gettys, MIT Project Athena (DEC).