1 | /************************************************************
|
---|
2 |
|
---|
3 | Author: Eamon Walsh <[email protected]>
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | this permission notice appear in supporting documentation. This permission
|
---|
8 | notice shall be included in all copies or substantial portions of the
|
---|
9 | Software.
|
---|
10 |
|
---|
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
14 | AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
15 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
16 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
17 |
|
---|
18 | ********************************************************/
|
---|
19 |
|
---|
20 | #ifndef _XSELINUX_H
|
---|
21 | #define _XSELINUX_H
|
---|
22 |
|
---|
23 | #include "dixaccess.h"
|
---|
24 |
|
---|
25 | /* Extension info */
|
---|
26 | #define SELINUX_EXTENSION_NAME "SELinux"
|
---|
27 | #define SELINUX_MAJOR_VERSION 1
|
---|
28 | #define SELINUX_MINOR_VERSION 0
|
---|
29 | #define SELinuxNumberEvents 0
|
---|
30 | #define SELinuxNumberErrors 0
|
---|
31 |
|
---|
32 | /* Extension protocol */
|
---|
33 | #define X_SELinuxQueryVersion 0
|
---|
34 | #define X_SELinuxSetDeviceCreateContext 1
|
---|
35 | #define X_SELinuxGetDeviceCreateContext 2
|
---|
36 | #define X_SELinuxSetDeviceContext 3
|
---|
37 | #define X_SELinuxGetDeviceContext 4
|
---|
38 | #define X_SELinuxSetWindowCreateContext 5
|
---|
39 | #define X_SELinuxGetWindowCreateContext 6
|
---|
40 | #define X_SELinuxGetWindowContext 7
|
---|
41 | #define X_SELinuxSetPropertyCreateContext 8
|
---|
42 | #define X_SELinuxGetPropertyCreateContext 9
|
---|
43 | #define X_SELinuxSetPropertyUseContext 10
|
---|
44 | #define X_SELinuxGetPropertyUseContext 11
|
---|
45 | #define X_SELinuxGetPropertyContext 12
|
---|
46 | #define X_SELinuxGetPropertyDataContext 13
|
---|
47 | #define X_SELinuxListProperties 14
|
---|
48 | #define X_SELinuxSetSelectionCreateContext 15
|
---|
49 | #define X_SELinuxGetSelectionCreateContext 16
|
---|
50 | #define X_SELinuxSetSelectionUseContext 17
|
---|
51 | #define X_SELinuxGetSelectionUseContext 18
|
---|
52 | #define X_SELinuxGetSelectionContext 19
|
---|
53 | #define X_SELinuxGetSelectionDataContext 20
|
---|
54 | #define X_SELinuxListSelections 21
|
---|
55 | #define X_SELinuxGetClientContext 22
|
---|
56 |
|
---|
57 | typedef struct {
|
---|
58 | CARD8 reqType;
|
---|
59 | CARD8 SELinuxReqType;
|
---|
60 | CARD16 length;
|
---|
61 | CARD8 client_major;
|
---|
62 | CARD8 client_minor;
|
---|
63 | } SELinuxQueryVersionReq;
|
---|
64 |
|
---|
65 | typedef struct {
|
---|
66 | CARD8 type;
|
---|
67 | CARD8 pad1;
|
---|
68 | CARD16 sequenceNumber;
|
---|
69 | CARD32 length;
|
---|
70 | CARD16 server_major;
|
---|
71 | CARD16 server_minor;
|
---|
72 | CARD32 pad2;
|
---|
73 | CARD32 pad3;
|
---|
74 | CARD32 pad4;
|
---|
75 | CARD32 pad5;
|
---|
76 | CARD32 pad6;
|
---|
77 | } SELinuxQueryVersionReply;
|
---|
78 |
|
---|
79 | typedef struct {
|
---|
80 | CARD8 reqType;
|
---|
81 | CARD8 SELinuxReqType;
|
---|
82 | CARD16 length;
|
---|
83 | CARD32 context_len;
|
---|
84 | } SELinuxSetCreateContextReq;
|
---|
85 |
|
---|
86 | typedef struct {
|
---|
87 | CARD8 reqType;
|
---|
88 | CARD8 SELinuxReqType;
|
---|
89 | CARD16 length;
|
---|
90 | } SELinuxGetCreateContextReq;
|
---|
91 |
|
---|
92 | typedef struct {
|
---|
93 | CARD8 reqType;
|
---|
94 | CARD8 SELinuxReqType;
|
---|
95 | CARD16 length;
|
---|
96 | CARD32 id;
|
---|
97 | CARD32 context_len;
|
---|
98 | } SELinuxSetContextReq;
|
---|
99 |
|
---|
100 | typedef struct {
|
---|
101 | CARD8 reqType;
|
---|
102 | CARD8 SELinuxReqType;
|
---|
103 | CARD16 length;
|
---|
104 | CARD32 id;
|
---|
105 | } SELinuxGetContextReq;
|
---|
106 |
|
---|
107 | typedef struct {
|
---|
108 | CARD8 reqType;
|
---|
109 | CARD8 SELinuxReqType;
|
---|
110 | CARD16 length;
|
---|
111 | CARD32 window;
|
---|
112 | CARD32 property;
|
---|
113 | } SELinuxGetPropertyContextReq;
|
---|
114 |
|
---|
115 | typedef struct {
|
---|
116 | CARD8 type;
|
---|
117 | CARD8 pad1;
|
---|
118 | CARD16 sequenceNumber;
|
---|
119 | CARD32 length;
|
---|
120 | CARD32 context_len;
|
---|
121 | CARD32 pad2;
|
---|
122 | CARD32 pad3;
|
---|
123 | CARD32 pad4;
|
---|
124 | CARD32 pad5;
|
---|
125 | CARD32 pad6;
|
---|
126 | } SELinuxGetContextReply;
|
---|
127 |
|
---|
128 | typedef struct {
|
---|
129 | CARD8 type;
|
---|
130 | CARD8 pad1;
|
---|
131 | CARD16 sequenceNumber;
|
---|
132 | CARD32 length;
|
---|
133 | CARD32 count;
|
---|
134 | CARD32 pad2;
|
---|
135 | CARD32 pad3;
|
---|
136 | CARD32 pad4;
|
---|
137 | CARD32 pad5;
|
---|
138 | CARD32 pad6;
|
---|
139 | } SELinuxListItemsReply;
|
---|
140 |
|
---|
141 |
|
---|
142 | /* Private Flask definitions */
|
---|
143 | #define SECCLASS_X_DRAWABLE 1
|
---|
144 | #define SECCLASS_X_SCREEN 2
|
---|
145 | #define SECCLASS_X_GC 3
|
---|
146 | #define SECCLASS_X_FONT 4
|
---|
147 | #define SECCLASS_X_COLORMAP 5
|
---|
148 | #define SECCLASS_X_PROPERTY 6
|
---|
149 | #define SECCLASS_X_SELECTION 7
|
---|
150 | #define SECCLASS_X_CURSOR 8
|
---|
151 | #define SECCLASS_X_CLIENT 9
|
---|
152 | #define SECCLASS_X_DEVICE 10
|
---|
153 | #define SECCLASS_X_SERVER 11
|
---|
154 | #define SECCLASS_X_EXTENSION 12
|
---|
155 | #define SECCLASS_X_EVENT 13
|
---|
156 | #define SECCLASS_X_FAKEEVENT 14
|
---|
157 | #define SECCLASS_X_RESOURCE 15
|
---|
158 |
|
---|
159 | #endif /* _XSELINUX_H */
|
---|