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 |
|
---|
55 | #include "input.h" /* for DeviceIntPtr */
|
---|
56 | #include "property.h" /* for PropertyPtr */
|
---|
57 | #include "pixmap.h" /* for DrawablePtr */
|
---|
58 | #include "resource.h" /* for RESTYPE */
|
---|
59 |
|
---|
60 | /* resource type to pass in LookupIDByType for authorizations */
|
---|
61 | extern RESTYPE SecurityAuthorizationResType;
|
---|
62 |
|
---|
63 | /* this is what we store for an authorization */
|
---|
64 | typedef struct {
|
---|
65 | XID id; /* resource ID */
|
---|
66 | CARD32 timeout; /* how long to live in seconds after refcnt == 0 */
|
---|
67 | unsigned int trustLevel; /* trusted/untrusted */
|
---|
68 | XID group; /* see embedding extension */
|
---|
69 | unsigned int refcnt; /* how many clients connected with this auth */
|
---|
70 | unsigned int secondsRemaining; /* overflow time amount for >49 days */
|
---|
71 | OsTimerPtr timer; /* timer for this auth */
|
---|
72 | struct _OtherClients *eventClients; /* clients wanting events */
|
---|
73 | } SecurityAuthorizationRec, *SecurityAuthorizationPtr;
|
---|
74 |
|
---|
75 | typedef struct {
|
---|
76 | XID group; /* the group that was sent in GenerateAuthorization */
|
---|
77 | Bool valid; /* did anyone recognize it? if so, set to TRUE */
|
---|
78 | } SecurityValidateGroupInfoRec;
|
---|
79 |
|
---|
80 | /* Give this value or higher to the -audit option to get security messages */
|
---|
81 | #define SECURITY_AUDIT_LEVEL 4
|
---|
82 |
|
---|
83 | #endif /* _SECURITY_SRV_H */
|
---|