xselinux.h revision 6747b715
14642e01fSmrg/************************************************************ 24642e01fSmrg 36747b715SmrgAuthor: Eamon Walsh <ewalsh@tycho.nsa.gov> 44642e01fSmrg 54642e01fSmrgPermission to use, copy, modify, distribute, and sell this software and its 64642e01fSmrgdocumentation for any purpose is hereby granted without fee, provided that 74642e01fSmrgthis permission notice appear in supporting documentation. This permission 84642e01fSmrgnotice shall be included in all copies or substantial portions of the 94642e01fSmrgSoftware. 104642e01fSmrg 114642e01fSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 124642e01fSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 134642e01fSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 144642e01fSmrgAUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 154642e01fSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 164642e01fSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 174642e01fSmrg 184642e01fSmrg********************************************************/ 194642e01fSmrg 204642e01fSmrg#ifndef _XSELINUX_H 214642e01fSmrg#define _XSELINUX_H 224642e01fSmrg 234642e01fSmrg/* Extension info */ 244642e01fSmrg#define SELINUX_EXTENSION_NAME "SELinux" 254642e01fSmrg#define SELINUX_MAJOR_VERSION 1 266747b715Smrg#define SELINUX_MINOR_VERSION 1 274642e01fSmrg#define SELinuxNumberEvents 0 284642e01fSmrg#define SELinuxNumberErrors 0 294642e01fSmrg 304642e01fSmrg/* Extension protocol */ 314642e01fSmrg#define X_SELinuxQueryVersion 0 324642e01fSmrg#define X_SELinuxSetDeviceCreateContext 1 334642e01fSmrg#define X_SELinuxGetDeviceCreateContext 2 344642e01fSmrg#define X_SELinuxSetDeviceContext 3 354642e01fSmrg#define X_SELinuxGetDeviceContext 4 366747b715Smrg#define X_SELinuxSetDrawableCreateContext 5 376747b715Smrg#define X_SELinuxGetDrawableCreateContext 6 386747b715Smrg#define X_SELinuxGetDrawableContext 7 394642e01fSmrg#define X_SELinuxSetPropertyCreateContext 8 404642e01fSmrg#define X_SELinuxGetPropertyCreateContext 9 414642e01fSmrg#define X_SELinuxSetPropertyUseContext 10 424642e01fSmrg#define X_SELinuxGetPropertyUseContext 11 434642e01fSmrg#define X_SELinuxGetPropertyContext 12 444642e01fSmrg#define X_SELinuxGetPropertyDataContext 13 454642e01fSmrg#define X_SELinuxListProperties 14 464642e01fSmrg#define X_SELinuxSetSelectionCreateContext 15 474642e01fSmrg#define X_SELinuxGetSelectionCreateContext 16 484642e01fSmrg#define X_SELinuxSetSelectionUseContext 17 494642e01fSmrg#define X_SELinuxGetSelectionUseContext 18 504642e01fSmrg#define X_SELinuxGetSelectionContext 19 514642e01fSmrg#define X_SELinuxGetSelectionDataContext 20 524642e01fSmrg#define X_SELinuxListSelections 21 534642e01fSmrg#define X_SELinuxGetClientContext 22 544642e01fSmrg 554642e01fSmrgtypedef struct { 564642e01fSmrg CARD8 reqType; 574642e01fSmrg CARD8 SELinuxReqType; 584642e01fSmrg CARD16 length; 594642e01fSmrg CARD8 client_major; 604642e01fSmrg CARD8 client_minor; 614642e01fSmrg} SELinuxQueryVersionReq; 624642e01fSmrg 634642e01fSmrgtypedef struct { 644642e01fSmrg CARD8 type; 654642e01fSmrg CARD8 pad1; 664642e01fSmrg CARD16 sequenceNumber; 674642e01fSmrg CARD32 length; 684642e01fSmrg CARD16 server_major; 694642e01fSmrg CARD16 server_minor; 704642e01fSmrg CARD32 pad2; 714642e01fSmrg CARD32 pad3; 724642e01fSmrg CARD32 pad4; 734642e01fSmrg CARD32 pad5; 744642e01fSmrg CARD32 pad6; 754642e01fSmrg} SELinuxQueryVersionReply; 764642e01fSmrg 774642e01fSmrgtypedef struct { 784642e01fSmrg CARD8 reqType; 794642e01fSmrg CARD8 SELinuxReqType; 804642e01fSmrg CARD16 length; 814642e01fSmrg CARD32 context_len; 824642e01fSmrg} SELinuxSetCreateContextReq; 834642e01fSmrg 844642e01fSmrgtypedef struct { 854642e01fSmrg CARD8 reqType; 864642e01fSmrg CARD8 SELinuxReqType; 874642e01fSmrg CARD16 length; 884642e01fSmrg} SELinuxGetCreateContextReq; 894642e01fSmrg 904642e01fSmrgtypedef struct { 914642e01fSmrg CARD8 reqType; 924642e01fSmrg CARD8 SELinuxReqType; 934642e01fSmrg CARD16 length; 944642e01fSmrg CARD32 id; 954642e01fSmrg CARD32 context_len; 964642e01fSmrg} SELinuxSetContextReq; 974642e01fSmrg 984642e01fSmrgtypedef struct { 994642e01fSmrg CARD8 reqType; 1004642e01fSmrg CARD8 SELinuxReqType; 1014642e01fSmrg CARD16 length; 1024642e01fSmrg CARD32 id; 1034642e01fSmrg} SELinuxGetContextReq; 1044642e01fSmrg 1054642e01fSmrgtypedef struct { 1064642e01fSmrg CARD8 reqType; 1074642e01fSmrg CARD8 SELinuxReqType; 1084642e01fSmrg CARD16 length; 1094642e01fSmrg CARD32 window; 1104642e01fSmrg CARD32 property; 1114642e01fSmrg} SELinuxGetPropertyContextReq; 1124642e01fSmrg 1134642e01fSmrgtypedef struct { 1144642e01fSmrg CARD8 type; 1154642e01fSmrg CARD8 pad1; 1164642e01fSmrg CARD16 sequenceNumber; 1174642e01fSmrg CARD32 length; 1184642e01fSmrg CARD32 context_len; 1194642e01fSmrg CARD32 pad2; 1204642e01fSmrg CARD32 pad3; 1214642e01fSmrg CARD32 pad4; 1224642e01fSmrg CARD32 pad5; 1234642e01fSmrg CARD32 pad6; 1244642e01fSmrg} SELinuxGetContextReply; 1254642e01fSmrg 1264642e01fSmrgtypedef struct { 1274642e01fSmrg CARD8 type; 1284642e01fSmrg CARD8 pad1; 1294642e01fSmrg CARD16 sequenceNumber; 1304642e01fSmrg CARD32 length; 1314642e01fSmrg CARD32 count; 1324642e01fSmrg CARD32 pad2; 1334642e01fSmrg CARD32 pad3; 1344642e01fSmrg CARD32 pad4; 1354642e01fSmrg CARD32 pad5; 1364642e01fSmrg CARD32 pad6; 1374642e01fSmrg} SELinuxListItemsReply; 1384642e01fSmrg 1394642e01fSmrg#endif /* _XSELINUX_H */ 140