Tizen 2.0 Release
[framework/uifw/xorg/util/x11-xserver-utils.git] / xhost / man / xhost.man
1 .\" Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
2 .\"
3 .\" Permission is hereby granted, free of charge, to any person obtaining a
4 .\" copy of this software and associated documentation files (the "Software"),
5 .\" to deal in the Software without restriction, including without limitation
6 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 .\" and/or sell copies of the Software, and to permit persons to whom the
8 .\" Software is furnished to do so, subject to the following conditions:
9 .\"
10 .\" The above copyright notice and this permission notice (including the next
11 .\" paragraph) shall be included in all copies or substantial portions of the
12 .\" Software.
13 .\"
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 .\" DEALINGS IN THE SOFTWARE.
21 .\"
22 .\" Copyright 1988, 1998  The Open Group
23 .\"
24 .\" Permission is hereby granted, free of charge, to any person obtaining a
25 .\" copy of this software and associated documentation files (the
26 .\" "Software"), to deal in the Software without restriction, including
27 .\" without limitation the rights to use, copy, modify, merge, publish,
28 .\" distribute, and/or sell copies of the Software, and to permit persons
29 .\" to whom the Software is furnished to do so, provided that the above
30 .\" copyright notice(s) and this permission notice appear in all copies of
31 .\" the Software and that both the above copyright notice(s) and this
32 .\" permission notice appear in supporting documentation.
33 .\"
34 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
35 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
37 .\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
38 .\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
39 .\" INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
40 .\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
41 .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
42 .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
43 .\"
44 .\" Except as contained in this notice, the name of a copyright holder
45 .\" shall not be used in advertising or otherwise to promote the sale, use
46 .\" or other dealings in this Software without prior written authorization
47 .\" of the copyright holder.
48 .\"
49 .\" X Window System is a trademark of The Open Group.
50 .\"
51 .TH XHOST 1 __xorgversion__
52 .SH NAME
53 xhost \- server access control program for X
54 .SH SYNOPSIS
55 .B xhost
56 [[+\-]name ...]
57 .SH DESCRIPTION
58 The \fIxhost\fP program
59 is used to add and delete host names or user names to the list allowed
60 to make connections to the X server.  In the case of hosts, this provides
61 a rudimentary form of privacy control and security.  It is only sufficient
62 for a workstation (single user) environment, although it does limit the
63 worst abuses.  Environments which require more sophisticated measures should
64 implement the user-based mechanism or use the hooks in the
65 protocol for passing other authentication data to the server.
66 .SH OPTIONS
67 \fIXhost\fP accepts the following command line options described below.  For
68 security, the options that affect access control may only be run from the
69 "controlling host".  For workstations, this is the same machine as the
70 server.  For X terminals, it is the login host.
71 .TP 8
72 .B \-help
73 Prints a usage message.
74 .TP 8
75 .BI "[+]" "name"
76 The given \fIname\fP (the plus sign is optional)
77 is added to the list allowed to connect to the X server.
78 The name can be a host name or a complete name (See
79 .SM
80 .B NAMES
81 for more details).
82 .TP 8
83 .BI \- "name"
84 The given \fIname\fP is removed from the list of allowed
85 to connect to the server.  The name can be a host name or a complete
86 name (See
87 .SM
88 .B NAMES
89 for more details).
90 Existing connections are not broken, but new
91 connection attempts will be denied.
92 Note that the current machine is allowed to be removed; however, further
93 connections (including attempts to add it back) will not be permitted.
94 Resetting the server (thereby breaking all connections)
95 is the only way to allow local connections again.
96 .TP 8
97 .B \+
98 Access is granted to everyone, even if they aren't on the list
99 (i.e., access control is turned off).
100 .TP 8
101 .B \-
102 Access is restricted to only those on the list
103 (i.e., access control is turned on).
104 .TP 8
105 .I nothing
106 If no command line arguments are given,
107 a message indicating whether or not access control is currently enabled
108 is printed, followed by the list of those allowed to connect.
109 This is the only option that may be used from machines other than
110 the controlling host.
111 .SH NAMES
112 A complete name has the syntax
113 ``family:name'' where the families are
114 as follows:
115 .PP
116 .nf
117 .ta 1i
118 inet    Internet host (IPv4)
119 inet6   Internet host (IPv6)
120 dnet    DECnet host
121 nis     Secure RPC network name
122 krb     Kerberos V5 principal
123 local   contains only one name, the empty string
124 si      Server Interpreted
125 .fi
126 .PP
127 The family is case insensitive.
128 The format of the name varies with the family.
129 .PP
130 When Secure RPC is being used, the
131 network independent netname (e.g., "nis:unix.\fIuid\fP@\fIdomainname\fP") can
132 be specified, or a local user can be specified with just the username
133 and a trailing at-sign (e.g., "nis:pat@").
134 .PP
135 For backward compatibility with pre-R6 \fIxhost\fP,
136 names that contain an at-sign (@) are assumed to be in the nis family.
137 Otherwise they are assumed to be Internet addresses. If compiled to support
138 IPv6, then all IPv4 and IPv6 addresses returned by getaddrinfo(__libmansuffix__) are added to
139 the access list in the appropriate inet or inet6 family.
140 .PP
141 The local family specifies all the local connections at once. However,
142 the server interpreted address "si:localuser:\fIusername\fP" can be
143 used to specify a single local user. (See the
144 \fIXsecurity\fP(__miscmansuffix__) manual page for more details.)
145 .PP
146 Server interpreted addresses consist of a case-sensitive type tag and a
147 string representing a given value, separated by a colon.  For example,
148 "si:hostname:almas" is a server interpreted address of type \fIhostname\fP,
149 with a value of \fIalmas\fP.   For more information on the available forms
150 of server interpreted addresses, see the \fIXsecurity\fP(__miscmansuffix__)
151 manual page.
152 .PP
153 The initial access control list for display number \fBn\fP
154 may be set by the file \fI/etc/X\fBn\fI.hosts\fR, where
155 \fBn\fP is the display number of the server.  See \fIXserver\fP(__appmansuffix__)
156 for details.
157 .SH DIAGNOSTICS
158 For each name added to the access control list,
159 a line of the form "\fIname\fP being added to access control list"
160 is printed.
161 For each name removed from the access control list,
162 a line of the form "\fIname\fP being removed from access control list"
163 is printed.
164 .SH "SEE ALSO"
165 X(__miscmansuffix__), Xsecurity(__miscmansuffix__), Xserver(__appmansuffix__), xdm(__appmansuffix__), xauth(__appmansuffix__), getaddrinfo(__libmansuffix__)
166 .SH ENVIRONMENT
167 .TP 8
168 .B DISPLAY
169 to get the default host and display to use.
170 .SH BUGS
171 .PP
172 You can't specify a display on the command line because
173 .B \-display
174 is a valid command line argument (indicating that you want
175 to remove the machine named
176 .I ``display''
177 from the access list).
178 .PP
179 The X server stores network addresses, not host names, unless you use
180 the server-interpreted hostname type address.  If somehow you change a
181 host's network address while the server is still running, and you are
182 using a network-address based form of authentication, \fIxhost\fP must
183 be used to add the new address and/or remove the old address.
184 .SH AUTHORS
185 Bob Scheifler, MIT Laboratory for Computer Science,
186 .br
187 Jim Gettys, MIT Project Athena (DEC).