This file is indexed.

/usr/lib/python2.7/dist-packages/xcffib/xselinux.py is in python-xcffib 0.3.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
import xcffib
import struct
import six
MAJOR_VERSION = 1
MINOR_VERSION = 0
key = xcffib.ExtensionKey("SELinux")
_events = {}
_errors = {}
from . import xproto
class QueryVersionReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.server_major, self.server_minor = unpacker.unpack("xx2x4xHH")
        self.bufsize = unpacker.offset - base
class QueryVersionCookie(xcffib.Cookie):
    reply_type = QueryVersionReply
class GetDeviceCreateContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetDeviceCreateContextCookie(xcffib.Cookie):
    reply_type = GetDeviceCreateContextReply
class GetDeviceContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetDeviceContextCookie(xcffib.Cookie):
    reply_type = GetDeviceContextReply
class GetWindowCreateContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetWindowCreateContextCookie(xcffib.Cookie):
    reply_type = GetWindowCreateContextReply
class GetWindowContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetWindowContextCookie(xcffib.Cookie):
    reply_type = GetWindowContextReply
class ListItem(xcffib.Struct):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Struct.__init__(self, unpacker)
        base = unpacker.offset
        self.name, self.object_context_len, self.data_context_len = unpacker.unpack("III")
        self.object_context = xcffib.List(unpacker, "c", self.object_context_len)
        unpacker.pad("c")
        self.data_context = xcffib.List(unpacker, "c", self.data_context_len)
        self.bufsize = unpacker.offset - base
    def pack(self):
        buf = six.BytesIO()
        buf.write(struct.pack("=III", self.name, self.object_context_len, self.data_context_len))
        buf.write(xcffib.pack_list(self.object_context, "c"))
        buf.write(xcffib.pack_list(self.data_context, "c"))
        return buf.getvalue()
class GetPropertyCreateContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetPropertyCreateContextCookie(xcffib.Cookie):
    reply_type = GetPropertyCreateContextReply
class GetPropertyUseContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetPropertyUseContextCookie(xcffib.Cookie):
    reply_type = GetPropertyUseContextReply
class GetPropertyContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetPropertyContextCookie(xcffib.Cookie):
    reply_type = GetPropertyContextReply
class GetPropertyDataContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetPropertyDataContextCookie(xcffib.Cookie):
    reply_type = GetPropertyDataContextReply
class ListPropertiesReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.properties_len, = unpacker.unpack("xx2x4xI20x")
        self.properties = xcffib.List(unpacker, ListItem, self.properties_len)
        self.bufsize = unpacker.offset - base
class ListPropertiesCookie(xcffib.Cookie):
    reply_type = ListPropertiesReply
class GetSelectionCreateContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetSelectionCreateContextCookie(xcffib.Cookie):
    reply_type = GetSelectionCreateContextReply
class GetSelectionUseContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetSelectionUseContextCookie(xcffib.Cookie):
    reply_type = GetSelectionUseContextReply
class GetSelectionContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetSelectionContextCookie(xcffib.Cookie):
    reply_type = GetSelectionContextReply
class GetSelectionDataContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetSelectionDataContextCookie(xcffib.Cookie):
    reply_type = GetSelectionDataContextReply
class ListSelectionsReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.selections_len, = unpacker.unpack("xx2x4xI20x")
        self.selections = xcffib.List(unpacker, ListItem, self.selections_len)
        self.bufsize = unpacker.offset - base
class ListSelectionsCookie(xcffib.Cookie):
    reply_type = ListSelectionsReply
class GetClientContextReply(xcffib.Reply):
    def __init__(self, unpacker):
        if isinstance(unpacker, xcffib.Protobj):
            unpacker = xcffib.MemoryUnpacker(unpacker.pack())
        xcffib.Reply.__init__(self, unpacker)
        base = unpacker.offset
        self.context_len, = unpacker.unpack("xx2x4xI20x")
        self.context = xcffib.List(unpacker, "c", self.context_len)
        self.bufsize = unpacker.offset - base
class GetClientContextCookie(xcffib.Cookie):
    reply_type = GetClientContextReply
class xselinuxExtension(xcffib.Extension):
    def QueryVersion(self, client_major, client_minor, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xB2xB", client_major, client_minor))
        return self.send_request(0, buf, QueryVersionCookie, is_checked=is_checked)
    def SetDeviceCreateContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(1, buf, is_checked=is_checked)
    def GetDeviceCreateContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(2, buf, GetDeviceCreateContextCookie, is_checked=is_checked)
    def SetDeviceContext(self, device, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xII", device, context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(3, buf, is_checked=is_checked)
    def GetDeviceContext(self, device, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", device))
        return self.send_request(4, buf, GetDeviceContextCookie, is_checked=is_checked)
    def SetWindowCreateContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(5, buf, is_checked=is_checked)
    def GetWindowCreateContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(6, buf, GetWindowCreateContextCookie, is_checked=is_checked)
    def GetWindowContext(self, window, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", window))
        return self.send_request(7, buf, GetWindowContextCookie, is_checked=is_checked)
    def SetPropertyCreateContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(8, buf, is_checked=is_checked)
    def GetPropertyCreateContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(9, buf, GetPropertyCreateContextCookie, is_checked=is_checked)
    def SetPropertyUseContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(10, buf, is_checked=is_checked)
    def GetPropertyUseContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(11, buf, GetPropertyUseContextCookie, is_checked=is_checked)
    def GetPropertyContext(self, window, property, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xII", window, property))
        return self.send_request(12, buf, GetPropertyContextCookie, is_checked=is_checked)
    def GetPropertyDataContext(self, window, property, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xII", window, property))
        return self.send_request(13, buf, GetPropertyDataContextCookie, is_checked=is_checked)
    def ListProperties(self, window, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", window))
        return self.send_request(14, buf, ListPropertiesCookie, is_checked=is_checked)
    def SetSelectionCreateContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(15, buf, is_checked=is_checked)
    def GetSelectionCreateContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(16, buf, GetSelectionCreateContextCookie, is_checked=is_checked)
    def SetSelectionUseContext(self, context_len, context, is_checked=False):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", context_len))
        buf.write(xcffib.pack_list(context, "c"))
        return self.send_request(17, buf, is_checked=is_checked)
    def GetSelectionUseContext(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(18, buf, GetSelectionUseContextCookie, is_checked=is_checked)
    def GetSelectionContext(self, selection, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", selection))
        return self.send_request(19, buf, GetSelectionContextCookie, is_checked=is_checked)
    def GetSelectionDataContext(self, selection, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", selection))
        return self.send_request(20, buf, GetSelectionDataContextCookie, is_checked=is_checked)
    def ListSelections(self, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2x"))
        return self.send_request(21, buf, ListSelectionsCookie, is_checked=is_checked)
    def GetClientContext(self, resource, is_checked=True):
        buf = six.BytesIO()
        buf.write(struct.pack("=xx2xI", resource))
        return self.send_request(22, buf, GetClientContextCookie, is_checked=is_checked)
xcffib._add_ext(key, xselinuxExtension, _events, _errors)