Add patch that contain Mali fixes.
[deb_xorg-server.git] / Xext / securitysrv.h
1 /*
2 Copyright 1996, 1998 The Open Group
3
4 Permission to use, copy, modify, distribute, and sell this software and its
5 documentation for any purpose is hereby granted without fee, provided that
6 the above copyright notice appear in all copies and that both that
7 copyright notice and this permission notice appear in supporting
8 documentation.
9
10 The above copyright notice and this permission notice shall be included
11 in all copies or substantial portions of the Software.
12
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19 OTHER DEALINGS IN THE SOFTWARE.
20
21 Except as contained in this notice, the name of The Open Group shall
22 not be used in advertising or otherwise to promote the sale, use or
23 other dealings in this Software without prior written authorization
24 from The Open Group.
25 */
26
27 /* Xserver internals for Security extension - moved here from
28 _SECURITY_SERVER section of <X11/extensions/security.h> */
29
30 #ifndef _SECURITY_SRV_H
31 #define _SECURITY_SRV_H
32
33 /* Allow client side portions of <X11/extensions/security.h> to compile */
34 #ifndef Status
35 #define Status int
36 #define NEED_UNDEF_Status
37 #endif
38 #ifndef Display
39 #define Display void
40 #define NEED_UNDEF_Display
41 #endif
42
43 #include <X11/extensions/secur.h>
44
45 #ifdef NEED_UNDEF_Status
46 #undef Status
47 #undef NEED_UNDEF_Status
48 #endif
49 #ifdef NEED_UNDEF_Display
50 #undef Display
51 #undef NEED_UNDEF_Display
52 #endif
53
54 #include "input.h" /* for DeviceIntPtr */
55 #include "property.h" /* for PropertyPtr */
56 #include "pixmap.h" /* for DrawablePtr */
57 #include "resource.h" /* for RESTYPE */
58
59 /* resource type to pass in LookupIDByType for authorizations */
60 extern RESTYPE SecurityAuthorizationResType;
61
62 /* this is what we store for an authorization */
63 typedef struct {
64 XID id; /* resource ID */
65 CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
66 unsigned int trustLevel; /* trusted/untrusted */
67 XID group; /* see embedding extension */
68 unsigned int refcnt; /* how many clients connected with this auth */
69 unsigned int secondsRemaining; /* overflow time amount for >49 days */
70 OsTimerPtr timer; /* timer for this auth */
71 struct _OtherClients *eventClients; /* clients wanting events */
72 } SecurityAuthorizationRec, *SecurityAuthorizationPtr;
73
74 typedef struct {
75 XID group; /* the group that was sent in GenerateAuthorization */
76 Bool valid; /* did anyone recognize it? if so, set to TRUE */
77 } SecurityValidateGroupInfoRec;
78
79 /* Give this value or higher to the -audit option to get security messages */
80 #define SECURITY_AUDIT_LEVEL 4
81
82 #endif /* _SECURITY_SRV_H */