1 /* $XConsortium: Xauth.h /main/18 1996/07/31 16:08:18 dpw $ */
5 Copyright (c) 1988 X Consortium
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
33 typedef struct xauth {
34 unsigned short family;
35 unsigned short address_length;
37 unsigned short number_length;
39 unsigned short name_length;
41 unsigned short data_length;
45 #ifndef _XAUTH_STRUCT_ONLY
47 # include <X11/Xfuncproto.h>
48 # include <X11/Xfuncs.h>
52 # define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
53 # define FamilyWild (65535)
54 # define FamilyNetname (254) /* not part of X standard */
55 # define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
56 # define FamilyLocalHost (252) /* for local non-net authentication */
64 #if NeedFunctionPrototypes
70 #if NeedFunctionPrototypes
71 _Xconst char* /* file_name */,
79 #if NeedFunctionPrototypes
80 _Xconst char* /* file_name */
85 #if NeedFunctionPrototypes
86 FILE* /* auth_file */,
91 Xauth *XauGetAuthByName(
92 #if NeedFunctionPrototypes
93 _Xconst char* /* display_name */
97 Xauth *XauGetAuthByAddr(
98 #if NeedFunctionPrototypes
99 #if NeedWidePrototypes
100 unsigned int /* family */,
101 unsigned int /* address_length */,
103 unsigned short /* family */,
104 unsigned short /* address_length */,
106 _Xconst char* /* address */,
107 #if NeedWidePrototypes
108 unsigned int /* number_length */,
110 unsigned short /* number_length */,
112 _Xconst char* /* number */,
113 #if NeedWidePrototypes
114 unsigned int /* name_length */,
116 unsigned short /* name_length */,
118 _Xconst char* /* name */
122 Xauth *XauGetBestAuthByAddr(
123 #if NeedFunctionPrototypes
124 #if NeedWidePrototypes
125 unsigned int /* family */,
126 unsigned int /* address_length */,
128 unsigned short /* family */,
129 unsigned short /* address_length */,
131 _Xconst char* /* address */,
132 #if NeedWidePrototypes
133 unsigned int /* number_length */,
135 unsigned short /* number_length */,
137 _Xconst char* /* number */,
138 int /* types_length */,
139 char** /* type_names */,
140 _Xconst int* /* type_lengths */
145 #if NeedFunctionPrototypes
151 #include <krb5/krb5.h>
152 /* 9/93: krb5.h leaks some symbols */
157 #if NeedFunctionPrototypes
158 krb5_principal /* princ */,
159 krb5_data * /* outbuf */
164 #if NeedFunctionPrototypes
165 krb5_data /* inbuf */,
166 krb5_principal * /* princ */
173 /* Return values from XauLockAuth */
175 # define LOCK_SUCCESS 0 /* lock succeeded */
176 # define LOCK_ERROR 1 /* lock unexpectely failed, check errno */
177 # define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
179 #endif /* _XAUTH_STRUCT_ONLY */
181 #endif /* _Xauth_h */