VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/X11/Xauth.h@ 17236

Last change on this file since 17236 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 3.9 KB
Line 
1/* $Xorg: Xauth.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */
2
3/*
4
5Copyright 1988, 1998 The Open Group
6
7Permission to use, copy, modify, distribute, and sell this software and its
8documentation for any purpose is hereby granted without fee, provided that
9the above copyright notice appear in all copies and that both that
10copyright notice and this permission notice appear in supporting
11documentation.
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23Except as contained in this notice, the name of The Open Group shall not be
24used in advertising or otherwise to promote the sale, use or other dealings
25in this Software without prior written authorization from The Open Group.
26
27*/
28
29/* $XFree86: xc/lib/Xau/Xauth.h,v 1.5 2001/12/14 19:54:36 dawes Exp $ */
30
31#ifndef _Xauth_h
32#define _Xauth_h
33
34typedef struct xauth {
35 unsigned short family;
36 unsigned short address_length;
37 char *address;
38 unsigned short number_length;
39 char *number;
40 unsigned short name_length;
41 char *name;
42 unsigned short data_length;
43 char *data;
44} Xauth;
45
46#ifndef _XAUTH_STRUCT_ONLY
47
48# include <X11/Xfuncproto.h>
49# include <X11/Xfuncs.h>
50
51# include <stdio.h>
52
53# define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
54# define FamilyWild (65535)
55# define FamilyNetname (254) /* not part of X standard */
56# define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
57# define FamilyLocalHost (252) /* for local non-net authentication */
58
59
60_XFUNCPROTOBEGIN
61
62char *XauFileName(void);
63
64Xauth *XauReadAuth(
65FILE* /* auth_file */
66);
67
68int XauLockAuth(
69_Xconst char* /* file_name */,
70int /* retries */,
71int /* timeout */,
72long /* dead */
73);
74
75int XauUnlockAuth(
76_Xconst char* /* file_name */
77);
78
79int XauWriteAuth(
80FILE* /* auth_file */,
81Xauth* /* auth */
82);
83
84Xauth *XauGetAuthByName(
85_Xconst char* /* display_name */
86);
87
88Xauth *XauGetAuthByAddr(
89#if NeedWidePrototypes
90unsigned int /* family */,
91unsigned int /* address_length */,
92#else
93unsigned short /* family */,
94unsigned short /* address_length */,
95#endif
96_Xconst char* /* address */,
97#if NeedWidePrototypes
98unsigned int /* number_length */,
99#else
100unsigned short /* number_length */,
101#endif
102_Xconst char* /* number */,
103#if NeedWidePrototypes
104unsigned int /* name_length */,
105#else
106unsigned short /* name_length */,
107#endif
108_Xconst char* /* name */
109);
110
111Xauth *XauGetBestAuthByAddr(
112#if NeedWidePrototypes
113unsigned int /* family */,
114unsigned int /* address_length */,
115#else
116unsigned short /* family */,
117unsigned short /* address_length */,
118#endif
119_Xconst char* /* address */,
120#if NeedWidePrototypes
121unsigned int /* number_length */,
122#else
123unsigned short /* number_length */,
124#endif
125_Xconst char* /* number */,
126int /* types_length */,
127char** /* type_names */,
128_Xconst int* /* type_lengths */
129);
130
131void XauDisposeAuth(
132Xauth* /* auth */
133);
134
135#ifdef K5AUTH
136#include <krb5/krb5.h>
137/* 9/93: krb5.h leaks some symbols */
138#undef BITS32
139#undef xfree
140
141int XauKrb5Encode(
142 krb5_principal /* princ */,
143 krb5_data * /* outbuf */
144);
145
146int XauKrb5Decode(
147 krb5_data /* inbuf */,
148 krb5_principal * /* princ */
149);
150#endif /* K5AUTH */
151
152_XFUNCPROTOEND
153
154/* Return values from XauLockAuth */
155
156# define LOCK_SUCCESS 0 /* lock succeeded */
157# define LOCK_ERROR 1 /* lock unexpectely failed, check errno */
158# define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
159
160#endif /* _XAUTH_STRUCT_ONLY */
161
162#endif /* _Xauth_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette