1 # This file was automatically generated by SWIG (http://www.swig.org). 2 # Version 2.0.11 3 # 4 # Do not make changes to this file unless you know what you are doing--modify 5 # the SWIG interface file instead. 6 7 8 9 10 11 from sys import version_info 12 if version_info >= (2,6,0): 13 def swig_import_helper(): 14 from os.path import dirname 15 import imp 16 fp = None 17 try: 18 fp, pathname, description = imp.find_module('_selinux', [dirname(__file__)]) 19 except ImportError: 20 import _selinux 21 return _selinux 22 if fp is not None: 23 try: 24 _mod = imp.load_module('_selinux', fp, pathname, description) 25 finally: 26 fp.close() 27 return _mod 28 _selinux = swig_import_helper() 29 del swig_import_helper 30 else: 31 import _selinux 32 del version_info 33 try: 34 _swig_property = property 35 except NameError: 36 pass # Python < 2.2 doesn't have 'property'. 37 def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 38 if (name == "thisown"): return self.this.own(value) 39 if (name == "this"): 40 if type(value).__name__ == 'SwigPyObject': 41 self.__dict__[name] = value 42 return 43 method = class_type.__swig_setmethods__.get(name,None) 44 if method: return method(self,value) 45 if (not static): 46 self.__dict__[name] = value 47 else: 48 raise AttributeError("You cannot add attributes to %s" % self) 49 50 def _swig_setattr(self,class_type,name,value): 51 return _swig_setattr_nondynamic(self,class_type,name,value,0) 52 53 def _swig_getattr(self,class_type,name): 54 if (name == "thisown"): return self.this.own() 55 method = class_type.__swig_getmethods__.get(name,None) 56 if method: return method(self) 57 raise AttributeError(name) 58 59 def _swig_repr(self): 60 try: strthis = "proxy of " + self.this.__repr__() 61 except: strthis = "" 62 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 63 64 try: 65 _object = object 66 _newclass = 1 67 except AttributeError: 68 class _object : pass 69 _newclass = 0 70 71 72 import shutil, os, errno, stat 73 74 DISABLED = -1 75 PERMISSIVE = 0 76 ENFORCING = 1 77 78 def restorecon(path, recursive=False): 79 """ Restore SELinux context on a given path """ 80 81 try: 82 mode = os.lstat(path)[stat.ST_MODE] 83 status, context = matchpathcon(path, mode) 84 except OSError: 85 path = os.path.realpath(os.path.expanduser(path)) 86 mode = os.lstat(path)[stat.ST_MODE] 87 status, context = matchpathcon(path, mode) 88 89 if status == 0: 90 try: 91 status, oldcontext = lgetfilecon(path) 92 except OSError as e: 93 if e.errno != errno.ENODATA: 94 raise 95 oldcontext = None 96 if context != oldcontext: 97 lsetfilecon(path, context) 98 99 if recursive: 100 for root, dirs, files in os.walk(path): 101 for name in files + dirs: 102 restorecon(os.path.join(root, name)) 103 104 def chcon(path, context, recursive=False): 105 """ Set the SELinux context on a given path """ 106 lsetfilecon(path, context) 107 if recursive: 108 for root, dirs, files in os.walk(path): 109 for name in files + dirs: 110 lsetfilecon(os.path.join(root,name), context) 111 112 def copytree(src, dest): 113 """ An SELinux-friendly shutil.copytree method """ 114 shutil.copytree(src, dest) 115 restorecon(dest, recursive=True) 116 117 def install(src, dest): 118 """ An SELinux-friendly shutil.move method """ 119 shutil.move(src, dest) 120 restorecon(dest, recursive=True) 121 122 class security_id(_object): 123 __swig_setmethods__ = {} 124 __setattr__ = lambda self, name, value: _swig_setattr(self, security_id, name, value) 125 __swig_getmethods__ = {} 126 __getattr__ = lambda self, name: _swig_getattr(self, security_id, name) 127 __repr__ = _swig_repr 128 __swig_setmethods__["ctx"] = _selinux.security_id_ctx_set 129 __swig_getmethods__["ctx"] = _selinux.security_id_ctx_get 130 if _newclass:ctx = _swig_property(_selinux.security_id_ctx_get, _selinux.security_id_ctx_set) 131 __swig_setmethods__["refcnt"] = _selinux.security_id_refcnt_set 132 __swig_getmethods__["refcnt"] = _selinux.security_id_refcnt_get 133 if _newclass:refcnt = _swig_property(_selinux.security_id_refcnt_get, _selinux.security_id_refcnt_set) 134 def __init__(self): 135 this = _selinux.new_security_id() 136 try: self.this.append(this) 137 except: self.this = this 138 __swig_destroy__ = _selinux.delete_security_id 139 __del__ = lambda self : None; 140 security_id_swigregister = _selinux.security_id_swigregister 141 security_id_swigregister(security_id) 142 143 144 def avc_sid_to_context(*args): 145 return _selinux.avc_sid_to_context(*args) 146 avc_sid_to_context = _selinux.avc_sid_to_context 147 148 def avc_sid_to_context_raw(*args): 149 return _selinux.avc_sid_to_context_raw(*args) 150 avc_sid_to_context_raw = _selinux.avc_sid_to_context_raw 151 152 def avc_context_to_sid(*args): 153 return _selinux.avc_context_to_sid(*args) 154 avc_context_to_sid = _selinux.avc_context_to_sid 155 156 def avc_context_to_sid_raw(*args): 157 return _selinux.avc_context_to_sid_raw(*args) 158 avc_context_to_sid_raw = _selinux.avc_context_to_sid_raw 159 160 def sidget(*args): 161 return _selinux.sidget(*args) 162 sidget = _selinux.sidget 163 164 def sidput(*args): 165 return _selinux.sidput(*args) 166 sidput = _selinux.sidput 167 168 def avc_get_initial_sid(*args): 169 return _selinux.avc_get_initial_sid(*args) 170 avc_get_initial_sid = _selinux.avc_get_initial_sid 171 class avc_entry_ref(_object): 172 __swig_setmethods__ = {} 173 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_entry_ref, name, value) 174 __swig_getmethods__ = {} 175 __getattr__ = lambda self, name: _swig_getattr(self, avc_entry_ref, name) 176 __repr__ = _swig_repr 177 __swig_setmethods__["ae"] = _selinux.avc_entry_ref_ae_set 178 __swig_getmethods__["ae"] = _selinux.avc_entry_ref_ae_get 179 if _newclass:ae = _swig_property(_selinux.avc_entry_ref_ae_get, _selinux.avc_entry_ref_ae_set) 180 def __init__(self): 181 this = _selinux.new_avc_entry_ref() 182 try: self.this.append(this) 183 except: self.this = this 184 __swig_destroy__ = _selinux.delete_avc_entry_ref 185 __del__ = lambda self : None; 186 avc_entry_ref_swigregister = _selinux.avc_entry_ref_swigregister 187 avc_entry_ref_swigregister(avc_entry_ref) 188 189 class avc_memory_callback(_object): 190 __swig_setmethods__ = {} 191 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_memory_callback, name, value) 192 __swig_getmethods__ = {} 193 __getattr__ = lambda self, name: _swig_getattr(self, avc_memory_callback, name) 194 __repr__ = _swig_repr 195 __swig_setmethods__["func_malloc"] = _selinux.avc_memory_callback_func_malloc_set 196 __swig_getmethods__["func_malloc"] = _selinux.avc_memory_callback_func_malloc_get 197 if _newclass:func_malloc = _swig_property(_selinux.avc_memory_callback_func_malloc_get, _selinux.avc_memory_callback_func_malloc_set) 198 __swig_setmethods__["func_free"] = _selinux.avc_memory_callback_func_free_set 199 __swig_getmethods__["func_free"] = _selinux.avc_memory_callback_func_free_get 200 if _newclass:func_free = _swig_property(_selinux.avc_memory_callback_func_free_get, _selinux.avc_memory_callback_func_free_set) 201 def __init__(self): 202 this = _selinux.new_avc_memory_callback() 203 try: self.this.append(this) 204 except: self.this = this 205 __swig_destroy__ = _selinux.delete_avc_memory_callback 206 __del__ = lambda self : None; 207 avc_memory_callback_swigregister = _selinux.avc_memory_callback_swigregister 208 avc_memory_callback_swigregister(avc_memory_callback) 209 210 class avc_log_callback(_object): 211 __swig_setmethods__ = {} 212 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_log_callback, name, value) 213 __swig_getmethods__ = {} 214 __getattr__ = lambda self, name: _swig_getattr(self, avc_log_callback, name) 215 __repr__ = _swig_repr 216 __swig_setmethods__["func_log"] = _selinux.avc_log_callback_func_log_set 217 __swig_getmethods__["func_log"] = _selinux.avc_log_callback_func_log_get 218 if _newclass:func_log = _swig_property(_selinux.avc_log_callback_func_log_get, _selinux.avc_log_callback_func_log_set) 219 __swig_setmethods__["func_audit"] = _selinux.avc_log_callback_func_audit_set 220 __swig_getmethods__["func_audit"] = _selinux.avc_log_callback_func_audit_get 221 if _newclass:func_audit = _swig_property(_selinux.avc_log_callback_func_audit_get, _selinux.avc_log_callback_func_audit_set) 222 def __init__(self): 223 this = _selinux.new_avc_log_callback() 224 try: self.this.append(this) 225 except: self.this = this 226 __swig_destroy__ = _selinux.delete_avc_log_callback 227 __del__ = lambda self : None; 228 avc_log_callback_swigregister = _selinux.avc_log_callback_swigregister 229 avc_log_callback_swigregister(avc_log_callback) 230 231 class avc_thread_callback(_object): 232 __swig_setmethods__ = {} 233 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_thread_callback, name, value) 234 __swig_getmethods__ = {} 235 __getattr__ = lambda self, name: _swig_getattr(self, avc_thread_callback, name) 236 __repr__ = _swig_repr 237 __swig_setmethods__["func_create_thread"] = _selinux.avc_thread_callback_func_create_thread_set 238 __swig_getmethods__["func_create_thread"] = _selinux.avc_thread_callback_func_create_thread_get 239 if _newclass:func_create_thread = _swig_property(_selinux.avc_thread_callback_func_create_thread_get, _selinux.avc_thread_callback_func_create_thread_set) 240 __swig_setmethods__["func_stop_thread"] = _selinux.avc_thread_callback_func_stop_thread_set 241 __swig_getmethods__["func_stop_thread"] = _selinux.avc_thread_callback_func_stop_thread_get 242 if _newclass:func_stop_thread = _swig_property(_selinux.avc_thread_callback_func_stop_thread_get, _selinux.avc_thread_callback_func_stop_thread_set) 243 def __init__(self): 244 this = _selinux.new_avc_thread_callback() 245 try: self.this.append(this) 246 except: self.this = this 247 __swig_destroy__ = _selinux.delete_avc_thread_callback 248 __del__ = lambda self : None; 249 avc_thread_callback_swigregister = _selinux.avc_thread_callback_swigregister 250 avc_thread_callback_swigregister(avc_thread_callback) 251 252 class avc_lock_callback(_object): 253 __swig_setmethods__ = {} 254 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_lock_callback, name, value) 255 __swig_getmethods__ = {} 256 __getattr__ = lambda self, name: _swig_getattr(self, avc_lock_callback, name) 257 __repr__ = _swig_repr 258 __swig_setmethods__["func_alloc_lock"] = _selinux.avc_lock_callback_func_alloc_lock_set 259 __swig_getmethods__["func_alloc_lock"] = _selinux.avc_lock_callback_func_alloc_lock_get 260 if _newclass:func_alloc_lock = _swig_property(_selinux.avc_lock_callback_func_alloc_lock_get, _selinux.avc_lock_callback_func_alloc_lock_set) 261 __swig_setmethods__["func_get_lock"] = _selinux.avc_lock_callback_func_get_lock_set 262 __swig_getmethods__["func_get_lock"] = _selinux.avc_lock_callback_func_get_lock_get 263 if _newclass:func_get_lock = _swig_property(_selinux.avc_lock_callback_func_get_lock_get, _selinux.avc_lock_callback_func_get_lock_set) 264 __swig_setmethods__["func_release_lock"] = _selinux.avc_lock_callback_func_release_lock_set 265 __swig_getmethods__["func_release_lock"] = _selinux.avc_lock_callback_func_release_lock_get 266 if _newclass:func_release_lock = _swig_property(_selinux.avc_lock_callback_func_release_lock_get, _selinux.avc_lock_callback_func_release_lock_set) 267 __swig_setmethods__["func_free_lock"] = _selinux.avc_lock_callback_func_free_lock_set 268 __swig_getmethods__["func_free_lock"] = _selinux.avc_lock_callback_func_free_lock_get 269 if _newclass:func_free_lock = _swig_property(_selinux.avc_lock_callback_func_free_lock_get, _selinux.avc_lock_callback_func_free_lock_set) 270 def __init__(self): 271 this = _selinux.new_avc_lock_callback() 272 try: self.this.append(this) 273 except: self.this = this 274 __swig_destroy__ = _selinux.delete_avc_lock_callback 275 __del__ = lambda self : None; 276 avc_lock_callback_swigregister = _selinux.avc_lock_callback_swigregister 277 avc_lock_callback_swigregister(avc_lock_callback) 278 279 AVC_OPT_UNUSED = _selinux.AVC_OPT_UNUSED 280 AVC_OPT_SETENFORCE = _selinux.AVC_OPT_SETENFORCE 281 282 def avc_init(*args): 283 return _selinux.avc_init(*args) 284 avc_init = _selinux.avc_init 285 286 def avc_open(*args): 287 return _selinux.avc_open(*args) 288 avc_open = _selinux.avc_open 289 290 def avc_cleanup(): 291 return _selinux.avc_cleanup() 292 avc_cleanup = _selinux.avc_cleanup 293 294 def avc_reset(): 295 return _selinux.avc_reset() 296 avc_reset = _selinux.avc_reset 297 298 def avc_destroy(): 299 return _selinux.avc_destroy() 300 avc_destroy = _selinux.avc_destroy 301 302 def avc_has_perm_noaudit(*args): 303 return _selinux.avc_has_perm_noaudit(*args) 304 avc_has_perm_noaudit = _selinux.avc_has_perm_noaudit 305 306 def avc_has_perm(*args): 307 return _selinux.avc_has_perm(*args) 308 avc_has_perm = _selinux.avc_has_perm 309 310 def avc_audit(*args): 311 return _selinux.avc_audit(*args) 312 avc_audit = _selinux.avc_audit 313 314 def avc_compute_create(*args): 315 return _selinux.avc_compute_create(*args) 316 avc_compute_create = _selinux.avc_compute_create 317 318 def avc_compute_member(*args): 319 return _selinux.avc_compute_member(*args) 320 avc_compute_member = _selinux.avc_compute_member 321 AVC_CALLBACK_GRANT = _selinux.AVC_CALLBACK_GRANT 322 AVC_CALLBACK_TRY_REVOKE = _selinux.AVC_CALLBACK_TRY_REVOKE 323 AVC_CALLBACK_REVOKE = _selinux.AVC_CALLBACK_REVOKE 324 AVC_CALLBACK_RESET = _selinux.AVC_CALLBACK_RESET 325 AVC_CALLBACK_AUDITALLOW_ENABLE = _selinux.AVC_CALLBACK_AUDITALLOW_ENABLE 326 AVC_CALLBACK_AUDITALLOW_DISABLE = _selinux.AVC_CALLBACK_AUDITALLOW_DISABLE 327 AVC_CALLBACK_AUDITDENY_ENABLE = _selinux.AVC_CALLBACK_AUDITDENY_ENABLE 328 AVC_CALLBACK_AUDITDENY_DISABLE = _selinux.AVC_CALLBACK_AUDITDENY_DISABLE 329 AVC_CACHE_STATS = _selinux.AVC_CACHE_STATS 330 class avc_cache_stats(_object): 331 __swig_setmethods__ = {} 332 __setattr__ = lambda self, name, value: _swig_setattr(self, avc_cache_stats, name, value) 333 __swig_getmethods__ = {} 334 __getattr__ = lambda self, name: _swig_getattr(self, avc_cache_stats, name) 335 __repr__ = _swig_repr 336 __swig_setmethods__["entry_lookups"] = _selinux.avc_cache_stats_entry_lookups_set 337 __swig_getmethods__["entry_lookups"] = _selinux.avc_cache_stats_entry_lookups_get 338 if _newclass:entry_lookups = _swig_property(_selinux.avc_cache_stats_entry_lookups_get, _selinux.avc_cache_stats_entry_lookups_set) 339 __swig_setmethods__["entry_hits"] = _selinux.avc_cache_stats_entry_hits_set 340 __swig_getmethods__["entry_hits"] = _selinux.avc_cache_stats_entry_hits_get 341 if _newclass:entry_hits = _swig_property(_selinux.avc_cache_stats_entry_hits_get, _selinux.avc_cache_stats_entry_hits_set) 342 __swig_setmethods__["entry_misses"] = _selinux.avc_cache_stats_entry_misses_set 343 __swig_getmethods__["entry_misses"] = _selinux.avc_cache_stats_entry_misses_get 344 if _newclass:entry_misses = _swig_property(_selinux.avc_cache_stats_entry_misses_get, _selinux.avc_cache_stats_entry_misses_set) 345 __swig_setmethods__["entry_discards"] = _selinux.avc_cache_stats_entry_discards_set 346 __swig_getmethods__["entry_discards"] = _selinux.avc_cache_stats_entry_discards_get 347 if _newclass:entry_discards = _swig_property(_selinux.avc_cache_stats_entry_discards_get, _selinux.avc_cache_stats_entry_discards_set) 348 __swig_setmethods__["cav_lookups"] = _selinux.avc_cache_stats_cav_lookups_set 349 __swig_getmethods__["cav_lookups"] = _selinux.avc_cache_stats_cav_lookups_get 350 if _newclass:cav_lookups = _swig_property(_selinux.avc_cache_stats_cav_lookups_get, _selinux.avc_cache_stats_cav_lookups_set) 351 __swig_setmethods__["cav_hits"] = _selinux.avc_cache_stats_cav_hits_set 352 __swig_getmethods__["cav_hits"] = _selinux.avc_cache_stats_cav_hits_get 353 if _newclass:cav_hits = _swig_property(_selinux.avc_cache_stats_cav_hits_get, _selinux.avc_cache_stats_cav_hits_set) 354 __swig_setmethods__["cav_probes"] = _selinux.avc_cache_stats_cav_probes_set 355 __swig_getmethods__["cav_probes"] = _selinux.avc_cache_stats_cav_probes_get 356 if _newclass:cav_probes = _swig_property(_selinux.avc_cache_stats_cav_probes_get, _selinux.avc_cache_stats_cav_probes_set) 357 __swig_setmethods__["cav_misses"] = _selinux.avc_cache_stats_cav_misses_set 358 __swig_getmethods__["cav_misses"] = _selinux.avc_cache_stats_cav_misses_get 359 if _newclass:cav_misses = _swig_property(_selinux.avc_cache_stats_cav_misses_get, _selinux.avc_cache_stats_cav_misses_set) 360 def __init__(self): 361 this = _selinux.new_avc_cache_stats() 362 try: self.this.append(this) 363 except: self.this = this 364 __swig_destroy__ = _selinux.delete_avc_cache_stats 365 __del__ = lambda self : None; 366 avc_cache_stats_swigregister = _selinux.avc_cache_stats_swigregister 367 avc_cache_stats_swigregister(avc_cache_stats) 368 369 370 def avc_av_stats(): 371 return _selinux.avc_av_stats() 372 avc_av_stats = _selinux.avc_av_stats 373 374 def avc_sid_stats(): 375 return _selinux.avc_sid_stats() 376 avc_sid_stats = _selinux.avc_sid_stats 377 378 def avc_netlink_open(*args): 379 return _selinux.avc_netlink_open(*args) 380 avc_netlink_open = _selinux.avc_netlink_open 381 382 def avc_netlink_loop(): 383 return _selinux.avc_netlink_loop() 384 avc_netlink_loop = _selinux.avc_netlink_loop 385 386 def avc_netlink_close(): 387 return _selinux.avc_netlink_close() 388 avc_netlink_close = _selinux.avc_netlink_close 389 390 def selinux_status_open(*args): 391 return _selinux.selinux_status_open(*args) 392 selinux_status_open = _selinux.selinux_status_open 393 394 def selinux_status_close(): 395 return _selinux.selinux_status_close() 396 selinux_status_close = _selinux.selinux_status_close 397 398 def selinux_status_updated(): 399 return _selinux.selinux_status_updated() 400 selinux_status_updated = _selinux.selinux_status_updated 401 402 def selinux_status_getenforce(): 403 return _selinux.selinux_status_getenforce() 404 selinux_status_getenforce = _selinux.selinux_status_getenforce 405 406 def selinux_status_policyload(): 407 return _selinux.selinux_status_policyload() 408 selinux_status_policyload = _selinux.selinux_status_policyload 409 410 def selinux_status_deny_unknown(): 411 return _selinux.selinux_status_deny_unknown() 412 selinux_status_deny_unknown = _selinux.selinux_status_deny_unknown 413 class context_s_t(_object): 414 __swig_setmethods__ = {} 415 __setattr__ = lambda self, name, value: _swig_setattr(self, context_s_t, name, value) 416 __swig_getmethods__ = {} 417 __getattr__ = lambda self, name: _swig_getattr(self, context_s_t, name) 418 __repr__ = _swig_repr 419 __swig_setmethods__["ptr"] = _selinux.context_s_t_ptr_set 420 __swig_getmethods__["ptr"] = _selinux.context_s_t_ptr_get 421 if _newclass:ptr = _swig_property(_selinux.context_s_t_ptr_get, _selinux.context_s_t_ptr_set) 422 def __init__(self): 423 this = _selinux.new_context_s_t() 424 try: self.this.append(this) 425 except: self.this = this 426 __swig_destroy__ = _selinux.delete_context_s_t 427 __del__ = lambda self : None; 428 context_s_t_swigregister = _selinux.context_s_t_swigregister 429 context_s_t_swigregister(context_s_t) 430 431 432 def context_new(*args): 433 return _selinux.context_new(*args) 434 context_new = _selinux.context_new 435 436 def context_str(*args): 437 return _selinux.context_str(*args) 438 context_str = _selinux.context_str 439 440 def context_free(*args): 441 return _selinux.context_free(*args) 442 context_free = _selinux.context_free 443 444 def context_type_get(*args): 445 return _selinux.context_type_get(*args) 446 context_type_get = _selinux.context_type_get 447 448 def context_range_get(*args): 449 return _selinux.context_range_get(*args) 450 context_range_get = _selinux.context_range_get 451 452 def context_role_get(*args): 453 return _selinux.context_role_get(*args) 454 context_role_get = _selinux.context_role_get 455 456 def context_user_get(*args): 457 return _selinux.context_user_get(*args) 458 context_user_get = _selinux.context_user_get 459 460 def context_type_set(*args): 461 return _selinux.context_type_set(*args) 462 context_type_set = _selinux.context_type_set 463 464 def context_range_set(*args): 465 return _selinux.context_range_set(*args) 466 context_range_set = _selinux.context_range_set 467 468 def context_role_set(*args): 469 return _selinux.context_role_set(*args) 470 context_role_set = _selinux.context_role_set 471 472 def context_user_set(*args): 473 return _selinux.context_user_set(*args) 474 context_user_set = _selinux.context_user_set 475 SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER 476 477 def get_ordered_context_list(*args): 478 return _selinux.get_ordered_context_list(*args) 479 get_ordered_context_list = _selinux.get_ordered_context_list 480 481 def get_ordered_context_list_with_level(*args): 482 return _selinux.get_ordered_context_list_with_level(*args) 483 get_ordered_context_list_with_level = _selinux.get_ordered_context_list_with_level 484 485 def get_default_context(*args): 486 return _selinux.get_default_context(*args) 487 get_default_context = _selinux.get_default_context 488 489 def get_default_context_with_level(*args): 490 return _selinux.get_default_context_with_level(*args) 491 get_default_context_with_level = _selinux.get_default_context_with_level 492 493 def get_default_context_with_role(*args): 494 return _selinux.get_default_context_with_role(*args) 495 get_default_context_with_role = _selinux.get_default_context_with_role 496 497 def get_default_context_with_rolelevel(*args): 498 return _selinux.get_default_context_with_rolelevel(*args) 499 get_default_context_with_rolelevel = _selinux.get_default_context_with_rolelevel 500 501 def query_user_context(): 502 return _selinux.query_user_context() 503 query_user_context = _selinux.query_user_context 504 505 def manual_user_enter_context(*args): 506 return _selinux.manual_user_enter_context(*args) 507 manual_user_enter_context = _selinux.manual_user_enter_context 508 509 def selinux_default_type_path(): 510 return _selinux.selinux_default_type_path() 511 selinux_default_type_path = _selinux.selinux_default_type_path 512 513 def get_default_type(*args): 514 return _selinux.get_default_type(*args) 515 get_default_type = _selinux.get_default_type 516 SELABEL_CTX_FILE = _selinux.SELABEL_CTX_FILE 517 SELABEL_CTX_MEDIA = _selinux.SELABEL_CTX_MEDIA 518 SELABEL_CTX_X = _selinux.SELABEL_CTX_X 519 SELABEL_CTX_DB = _selinux.SELABEL_CTX_DB 520 SELABEL_CTX_ANDROID_PROP = _selinux.SELABEL_CTX_ANDROID_PROP 521 SELABEL_OPT_UNUSED = _selinux.SELABEL_OPT_UNUSED 522 SELABEL_OPT_VALIDATE = _selinux.SELABEL_OPT_VALIDATE 523 SELABEL_OPT_BASEONLY = _selinux.SELABEL_OPT_BASEONLY 524 SELABEL_OPT_PATH = _selinux.SELABEL_OPT_PATH 525 SELABEL_OPT_SUBSET = _selinux.SELABEL_OPT_SUBSET 526 SELABEL_OPT_DIGEST = _selinux.SELABEL_OPT_DIGEST 527 SELABEL_NOPT = _selinux.SELABEL_NOPT 528 529 def selabel_open(*args): 530 return _selinux.selabel_open(*args) 531 selabel_open = _selinux.selabel_open 532 533 def selabel_close(*args): 534 return _selinux.selabel_close(*args) 535 selabel_close = _selinux.selabel_close 536 537 def selabel_lookup(*args): 538 return _selinux.selabel_lookup(*args) 539 selabel_lookup = _selinux.selabel_lookup 540 541 def selabel_lookup_raw(*args): 542 return _selinux.selabel_lookup_raw(*args) 543 selabel_lookup_raw = _selinux.selabel_lookup_raw 544 545 def selabel_partial_match(*args): 546 return _selinux.selabel_partial_match(*args) 547 selabel_partial_match = _selinux.selabel_partial_match 548 549 def selabel_lookup_best_match(*args): 550 return _selinux.selabel_lookup_best_match(*args) 551 selabel_lookup_best_match = _selinux.selabel_lookup_best_match 552 553 def selabel_lookup_best_match_raw(*args): 554 return _selinux.selabel_lookup_best_match_raw(*args) 555 selabel_lookup_best_match_raw = _selinux.selabel_lookup_best_match_raw 556 557 def selabel_digest(*args): 558 return _selinux.selabel_digest(*args) 559 selabel_digest = _selinux.selabel_digest 560 SELABEL_SUBSET = _selinux.SELABEL_SUBSET 561 SELABEL_EQUAL = _selinux.SELABEL_EQUAL 562 SELABEL_SUPERSET = _selinux.SELABEL_SUPERSET 563 SELABEL_INCOMPARABLE = _selinux.SELABEL_INCOMPARABLE 564 565 def selabel_cmp(*args): 566 return _selinux.selabel_cmp(*args) 567 selabel_cmp = _selinux.selabel_cmp 568 569 def selabel_stats(*args): 570 return _selinux.selabel_stats(*args) 571 selabel_stats = _selinux.selabel_stats 572 SELABEL_X_PROP = _selinux.SELABEL_X_PROP 573 SELABEL_X_EXT = _selinux.SELABEL_X_EXT 574 SELABEL_X_CLIENT = _selinux.SELABEL_X_CLIENT 575 SELABEL_X_EVENT = _selinux.SELABEL_X_EVENT 576 SELABEL_X_SELN = _selinux.SELABEL_X_SELN 577 SELABEL_X_POLYPROP = _selinux.SELABEL_X_POLYPROP 578 SELABEL_X_POLYSELN = _selinux.SELABEL_X_POLYSELN 579 SELABEL_DB_DATABASE = _selinux.SELABEL_DB_DATABASE 580 SELABEL_DB_SCHEMA = _selinux.SELABEL_DB_SCHEMA 581 SELABEL_DB_TABLE = _selinux.SELABEL_DB_TABLE 582 SELABEL_DB_COLUMN = _selinux.SELABEL_DB_COLUMN 583 SELABEL_DB_SEQUENCE = _selinux.SELABEL_DB_SEQUENCE 584 SELABEL_DB_VIEW = _selinux.SELABEL_DB_VIEW 585 SELABEL_DB_PROCEDURE = _selinux.SELABEL_DB_PROCEDURE 586 SELABEL_DB_BLOB = _selinux.SELABEL_DB_BLOB 587 SELABEL_DB_TUPLE = _selinux.SELABEL_DB_TUPLE 588 SELABEL_DB_LANGUAGE = _selinux.SELABEL_DB_LANGUAGE 589 SELABEL_DB_EXCEPTION = _selinux.SELABEL_DB_EXCEPTION 590 SELABEL_DB_DATATYPE = _selinux.SELABEL_DB_DATATYPE 591 592 def is_selinux_enabled(): 593 return _selinux.is_selinux_enabled() 594 is_selinux_enabled = _selinux.is_selinux_enabled 595 596 def is_selinux_mls_enabled(): 597 return _selinux.is_selinux_mls_enabled() 598 is_selinux_mls_enabled = _selinux.is_selinux_mls_enabled 599 600 def getcon(): 601 return _selinux.getcon() 602 getcon = _selinux.getcon 603 604 def getcon_raw(): 605 return _selinux.getcon_raw() 606 getcon_raw = _selinux.getcon_raw 607 608 def setcon(*args): 609 return _selinux.setcon(*args) 610 setcon = _selinux.setcon 611 612 def setcon_raw(*args): 613 return _selinux.setcon_raw(*args) 614 setcon_raw = _selinux.setcon_raw 615 616 def getpidcon(*args): 617 return _selinux.getpidcon(*args) 618 getpidcon = _selinux.getpidcon 619 620 def getpidcon_raw(*args): 621 return _selinux.getpidcon_raw(*args) 622 getpidcon_raw = _selinux.getpidcon_raw 623 624 def getprevcon(): 625 return _selinux.getprevcon() 626 getprevcon = _selinux.getprevcon 627 628 def getprevcon_raw(): 629 return _selinux.getprevcon_raw() 630 getprevcon_raw = _selinux.getprevcon_raw 631 632 def getexeccon(): 633 return _selinux.getexeccon() 634 getexeccon = _selinux.getexeccon 635 636 def getexeccon_raw(): 637 return _selinux.getexeccon_raw() 638 getexeccon_raw = _selinux.getexeccon_raw 639 640 def setexeccon(*args): 641 return _selinux.setexeccon(*args) 642 setexeccon = _selinux.setexeccon 643 644 def setexeccon_raw(*args): 645 return _selinux.setexeccon_raw(*args) 646 setexeccon_raw = _selinux.setexeccon_raw 647 648 def getfscreatecon(): 649 return _selinux.getfscreatecon() 650 getfscreatecon = _selinux.getfscreatecon 651 652 def getfscreatecon_raw(): 653 return _selinux.getfscreatecon_raw() 654 getfscreatecon_raw = _selinux.getfscreatecon_raw 655 656 def setfscreatecon(*args): 657 return _selinux.setfscreatecon(*args) 658 setfscreatecon = _selinux.setfscreatecon 659 660 def setfscreatecon_raw(*args): 661 return _selinux.setfscreatecon_raw(*args) 662 setfscreatecon_raw = _selinux.setfscreatecon_raw 663 664 def getkeycreatecon(): 665 return _selinux.getkeycreatecon() 666 getkeycreatecon = _selinux.getkeycreatecon 667 668 def getkeycreatecon_raw(): 669 return _selinux.getkeycreatecon_raw() 670 getkeycreatecon_raw = _selinux.getkeycreatecon_raw 671 672 def setkeycreatecon(*args): 673 return _selinux.setkeycreatecon(*args) 674 setkeycreatecon = _selinux.setkeycreatecon 675 676 def setkeycreatecon_raw(*args): 677 return _selinux.setkeycreatecon_raw(*args) 678 setkeycreatecon_raw = _selinux.setkeycreatecon_raw 679 680 def getsockcreatecon(): 681 return _selinux.getsockcreatecon() 682 getsockcreatecon = _selinux.getsockcreatecon 683 684 def getsockcreatecon_raw(): 685 return _selinux.getsockcreatecon_raw() 686 getsockcreatecon_raw = _selinux.getsockcreatecon_raw 687 688 def setsockcreatecon(*args): 689 return _selinux.setsockcreatecon(*args) 690 setsockcreatecon = _selinux.setsockcreatecon 691 692 def setsockcreatecon_raw(*args): 693 return _selinux.setsockcreatecon_raw(*args) 694 setsockcreatecon_raw = _selinux.setsockcreatecon_raw 695 696 def getfilecon(*args): 697 return _selinux.getfilecon(*args) 698 getfilecon = _selinux.getfilecon 699 700 def getfilecon_raw(*args): 701 return _selinux.getfilecon_raw(*args) 702 getfilecon_raw = _selinux.getfilecon_raw 703 704 def lgetfilecon(*args): 705 return _selinux.lgetfilecon(*args) 706 lgetfilecon = _selinux.lgetfilecon 707 708 def lgetfilecon_raw(*args): 709 return _selinux.lgetfilecon_raw(*args) 710 lgetfilecon_raw = _selinux.lgetfilecon_raw 711 712 def fgetfilecon(*args): 713 return _selinux.fgetfilecon(*args) 714 fgetfilecon = _selinux.fgetfilecon 715 716 def fgetfilecon_raw(*args): 717 return _selinux.fgetfilecon_raw(*args) 718 fgetfilecon_raw = _selinux.fgetfilecon_raw 719 720 def setfilecon(*args): 721 return _selinux.setfilecon(*args) 722 setfilecon = _selinux.setfilecon 723 724 def setfilecon_raw(*args): 725 return _selinux.setfilecon_raw(*args) 726 setfilecon_raw = _selinux.setfilecon_raw 727 728 def lsetfilecon(*args): 729 return _selinux.lsetfilecon(*args) 730 lsetfilecon = _selinux.lsetfilecon 731 732 def lsetfilecon_raw(*args): 733 return _selinux.lsetfilecon_raw(*args) 734 lsetfilecon_raw = _selinux.lsetfilecon_raw 735 736 def fsetfilecon(*args): 737 return _selinux.fsetfilecon(*args) 738 fsetfilecon = _selinux.fsetfilecon 739 740 def fsetfilecon_raw(*args): 741 return _selinux.fsetfilecon_raw(*args) 742 fsetfilecon_raw = _selinux.fsetfilecon_raw 743 744 def getpeercon(*args): 745 return _selinux.getpeercon(*args) 746 getpeercon = _selinux.getpeercon 747 748 def getpeercon_raw(*args): 749 return _selinux.getpeercon_raw(*args) 750 getpeercon_raw = _selinux.getpeercon_raw 751 class av_decision(_object): 752 __swig_setmethods__ = {} 753 __setattr__ = lambda self, name, value: _swig_setattr(self, av_decision, name, value) 754 __swig_getmethods__ = {} 755 __getattr__ = lambda self, name: _swig_getattr(self, av_decision, name) 756 __repr__ = _swig_repr 757 __swig_setmethods__["allowed"] = _selinux.av_decision_allowed_set 758 __swig_getmethods__["allowed"] = _selinux.av_decision_allowed_get 759 if _newclass:allowed = _swig_property(_selinux.av_decision_allowed_get, _selinux.av_decision_allowed_set) 760 __swig_setmethods__["decided"] = _selinux.av_decision_decided_set 761 __swig_getmethods__["decided"] = _selinux.av_decision_decided_get 762 if _newclass:decided = _swig_property(_selinux.av_decision_decided_get, _selinux.av_decision_decided_set) 763 __swig_setmethods__["auditallow"] = _selinux.av_decision_auditallow_set 764 __swig_getmethods__["auditallow"] = _selinux.av_decision_auditallow_get 765 if _newclass:auditallow = _swig_property(_selinux.av_decision_auditallow_get, _selinux.av_decision_auditallow_set) 766 __swig_setmethods__["auditdeny"] = _selinux.av_decision_auditdeny_set 767 __swig_getmethods__["auditdeny"] = _selinux.av_decision_auditdeny_get 768 if _newclass:auditdeny = _swig_property(_selinux.av_decision_auditdeny_get, _selinux.av_decision_auditdeny_set) 769 __swig_setmethods__["seqno"] = _selinux.av_decision_seqno_set 770 __swig_getmethods__["seqno"] = _selinux.av_decision_seqno_get 771 if _newclass:seqno = _swig_property(_selinux.av_decision_seqno_get, _selinux.av_decision_seqno_set) 772 __swig_setmethods__["flags"] = _selinux.av_decision_flags_set 773 __swig_getmethods__["flags"] = _selinux.av_decision_flags_get 774 if _newclass:flags = _swig_property(_selinux.av_decision_flags_get, _selinux.av_decision_flags_set) 775 def __init__(self): 776 this = _selinux.new_av_decision() 777 try: self.this.append(this) 778 except: self.this = this 779 __swig_destroy__ = _selinux.delete_av_decision 780 __del__ = lambda self : None; 781 av_decision_swigregister = _selinux.av_decision_swigregister 782 av_decision_swigregister(av_decision) 783 784 SELINUX_AVD_FLAGS_PERMISSIVE = _selinux.SELINUX_AVD_FLAGS_PERMISSIVE 785 class selinux_opt(_object): 786 __swig_setmethods__ = {} 787 __setattr__ = lambda self, name, value: _swig_setattr(self, selinux_opt, name, value) 788 __swig_getmethods__ = {} 789 __getattr__ = lambda self, name: _swig_getattr(self, selinux_opt, name) 790 __repr__ = _swig_repr 791 __swig_setmethods__["type"] = _selinux.selinux_opt_type_set 792 __swig_getmethods__["type"] = _selinux.selinux_opt_type_get 793 if _newclass:type = _swig_property(_selinux.selinux_opt_type_get, _selinux.selinux_opt_type_set) 794 __swig_setmethods__["value"] = _selinux.selinux_opt_value_set 795 __swig_getmethods__["value"] = _selinux.selinux_opt_value_get 796 if _newclass:value = _swig_property(_selinux.selinux_opt_value_get, _selinux.selinux_opt_value_set) 797 def __init__(self): 798 this = _selinux.new_selinux_opt() 799 try: self.this.append(this) 800 except: self.this = this 801 __swig_destroy__ = _selinux.delete_selinux_opt 802 __del__ = lambda self : None; 803 selinux_opt_swigregister = _selinux.selinux_opt_swigregister 804 selinux_opt_swigregister(selinux_opt) 805 806 class selinux_callback(_object): 807 __swig_setmethods__ = {} 808 __setattr__ = lambda self, name, value: _swig_setattr(self, selinux_callback, name, value) 809 __swig_getmethods__ = {} 810 __getattr__ = lambda self, name: _swig_getattr(self, selinux_callback, name) 811 __repr__ = _swig_repr 812 __swig_setmethods__["func_log"] = _selinux.selinux_callback_func_log_set 813 __swig_getmethods__["func_log"] = _selinux.selinux_callback_func_log_get 814 if _newclass:func_log = _swig_property(_selinux.selinux_callback_func_log_get, _selinux.selinux_callback_func_log_set) 815 __swig_setmethods__["func_audit"] = _selinux.selinux_callback_func_audit_set 816 __swig_getmethods__["func_audit"] = _selinux.selinux_callback_func_audit_get 817 if _newclass:func_audit = _swig_property(_selinux.selinux_callback_func_audit_get, _selinux.selinux_callback_func_audit_set) 818 __swig_setmethods__["func_validate"] = _selinux.selinux_callback_func_validate_set 819 __swig_getmethods__["func_validate"] = _selinux.selinux_callback_func_validate_get 820 if _newclass:func_validate = _swig_property(_selinux.selinux_callback_func_validate_get, _selinux.selinux_callback_func_validate_set) 821 __swig_setmethods__["func_setenforce"] = _selinux.selinux_callback_func_setenforce_set 822 __swig_getmethods__["func_setenforce"] = _selinux.selinux_callback_func_setenforce_get 823 if _newclass:func_setenforce = _swig_property(_selinux.selinux_callback_func_setenforce_get, _selinux.selinux_callback_func_setenforce_set) 824 __swig_setmethods__["func_policyload"] = _selinux.selinux_callback_func_policyload_set 825 __swig_getmethods__["func_policyload"] = _selinux.selinux_callback_func_policyload_get 826 if _newclass:func_policyload = _swig_property(_selinux.selinux_callback_func_policyload_get, _selinux.selinux_callback_func_policyload_set) 827 def __init__(self): 828 this = _selinux.new_selinux_callback() 829 try: self.this.append(this) 830 except: self.this = this 831 __swig_destroy__ = _selinux.delete_selinux_callback 832 __del__ = lambda self : None; 833 selinux_callback_swigregister = _selinux.selinux_callback_swigregister 834 selinux_callback_swigregister(selinux_callback) 835 836 SELINUX_CB_LOG = _selinux.SELINUX_CB_LOG 837 SELINUX_CB_AUDIT = _selinux.SELINUX_CB_AUDIT 838 SELINUX_CB_VALIDATE = _selinux.SELINUX_CB_VALIDATE 839 SELINUX_CB_SETENFORCE = _selinux.SELINUX_CB_SETENFORCE 840 SELINUX_CB_POLICYLOAD = _selinux.SELINUX_CB_POLICYLOAD 841 842 def selinux_get_callback(*args): 843 return _selinux.selinux_get_callback(*args) 844 selinux_get_callback = _selinux.selinux_get_callback 845 846 def selinux_set_callback(*args): 847 return _selinux.selinux_set_callback(*args) 848 selinux_set_callback = _selinux.selinux_set_callback 849 SELINUX_ERROR = _selinux.SELINUX_ERROR 850 SELINUX_WARNING = _selinux.SELINUX_WARNING 851 SELINUX_INFO = _selinux.SELINUX_INFO 852 SELINUX_AVC = _selinux.SELINUX_AVC 853 SELINUX_TRANS_DIR = _selinux.SELINUX_TRANS_DIR 854 855 def security_compute_av(*args): 856 return _selinux.security_compute_av(*args) 857 security_compute_av = _selinux.security_compute_av 858 859 def security_compute_av_raw(*args): 860 return _selinux.security_compute_av_raw(*args) 861 security_compute_av_raw = _selinux.security_compute_av_raw 862 863 def security_compute_av_flags(*args): 864 return _selinux.security_compute_av_flags(*args) 865 security_compute_av_flags = _selinux.security_compute_av_flags 866 867 def security_compute_av_flags_raw(*args): 868 return _selinux.security_compute_av_flags_raw(*args) 869 security_compute_av_flags_raw = _selinux.security_compute_av_flags_raw 870 871 def security_compute_create(*args): 872 return _selinux.security_compute_create(*args) 873 security_compute_create = _selinux.security_compute_create 874 875 def security_compute_create_raw(*args): 876 return _selinux.security_compute_create_raw(*args) 877 security_compute_create_raw = _selinux.security_compute_create_raw 878 879 def security_compute_create_name(*args): 880 return _selinux.security_compute_create_name(*args) 881 security_compute_create_name = _selinux.security_compute_create_name 882 883 def security_compute_create_name_raw(*args): 884 return _selinux.security_compute_create_name_raw(*args) 885 security_compute_create_name_raw = _selinux.security_compute_create_name_raw 886 887 def security_compute_relabel(*args): 888 return _selinux.security_compute_relabel(*args) 889 security_compute_relabel = _selinux.security_compute_relabel 890 891 def security_compute_relabel_raw(*args): 892 return _selinux.security_compute_relabel_raw(*args) 893 security_compute_relabel_raw = _selinux.security_compute_relabel_raw 894 895 def security_compute_member(*args): 896 return _selinux.security_compute_member(*args) 897 security_compute_member = _selinux.security_compute_member 898 899 def security_compute_member_raw(*args): 900 return _selinux.security_compute_member_raw(*args) 901 security_compute_member_raw = _selinux.security_compute_member_raw 902 903 def security_compute_user(*args): 904 return _selinux.security_compute_user(*args) 905 security_compute_user = _selinux.security_compute_user 906 907 def security_compute_user_raw(*args): 908 return _selinux.security_compute_user_raw(*args) 909 security_compute_user_raw = _selinux.security_compute_user_raw 910 911 def security_load_policy(*args): 912 return _selinux.security_load_policy(*args) 913 security_load_policy = _selinux.security_load_policy 914 915 def security_get_initial_context(*args): 916 return _selinux.security_get_initial_context(*args) 917 security_get_initial_context = _selinux.security_get_initial_context 918 919 def security_get_initial_context_raw(*args): 920 return _selinux.security_get_initial_context_raw(*args) 921 security_get_initial_context_raw = _selinux.security_get_initial_context_raw 922 923 def selinux_mkload_policy(*args): 924 return _selinux.selinux_mkload_policy(*args) 925 selinux_mkload_policy = _selinux.selinux_mkload_policy 926 927 def selinux_init_load_policy(): 928 return _selinux.selinux_init_load_policy() 929 selinux_init_load_policy = _selinux.selinux_init_load_policy 930 class SELboolean(_object): 931 __swig_setmethods__ = {} 932 __setattr__ = lambda self, name, value: _swig_setattr(self, SELboolean, name, value) 933 __swig_getmethods__ = {} 934 __getattr__ = lambda self, name: _swig_getattr(self, SELboolean, name) 935 __repr__ = _swig_repr 936 __swig_setmethods__["name"] = _selinux.SELboolean_name_set 937 __swig_getmethods__["name"] = _selinux.SELboolean_name_get 938 if _newclass:name = _swig_property(_selinux.SELboolean_name_get, _selinux.SELboolean_name_set) 939 __swig_setmethods__["value"] = _selinux.SELboolean_value_set 940 __swig_getmethods__["value"] = _selinux.SELboolean_value_get 941 if _newclass:value = _swig_property(_selinux.SELboolean_value_get, _selinux.SELboolean_value_set) 942 def __init__(self): 943 this = _selinux.new_SELboolean() 944 try: self.this.append(this) 945 except: self.this = this 946 __swig_destroy__ = _selinux.delete_SELboolean 947 __del__ = lambda self : None; 948 SELboolean_swigregister = _selinux.SELboolean_swigregister 949 SELboolean_swigregister(SELboolean) 950 951 952 def security_set_boolean_list(*args): 953 return _selinux.security_set_boolean_list(*args) 954 security_set_boolean_list = _selinux.security_set_boolean_list 955 956 def security_load_booleans(*args): 957 return _selinux.security_load_booleans(*args) 958 security_load_booleans = _selinux.security_load_booleans 959 960 def security_check_context(*args): 961 return _selinux.security_check_context(*args) 962 security_check_context = _selinux.security_check_context 963 964 def security_check_context_raw(*args): 965 return _selinux.security_check_context_raw(*args) 966 security_check_context_raw = _selinux.security_check_context_raw 967 968 def security_canonicalize_context(*args): 969 return _selinux.security_canonicalize_context(*args) 970 security_canonicalize_context = _selinux.security_canonicalize_context 971 972 def security_canonicalize_context_raw(*args): 973 return _selinux.security_canonicalize_context_raw(*args) 974 security_canonicalize_context_raw = _selinux.security_canonicalize_context_raw 975 976 def security_getenforce(): 977 return _selinux.security_getenforce() 978 security_getenforce = _selinux.security_getenforce 979 980 def security_setenforce(*args): 981 return _selinux.security_setenforce(*args) 982 security_setenforce = _selinux.security_setenforce 983 984 def security_deny_unknown(): 985 return _selinux.security_deny_unknown() 986 security_deny_unknown = _selinux.security_deny_unknown 987 988 def security_disable(): 989 return _selinux.security_disable() 990 security_disable = _selinux.security_disable 991 992 def security_policyvers(): 993 return _selinux.security_policyvers() 994 security_policyvers = _selinux.security_policyvers 995 996 def security_get_boolean_names(): 997 return _selinux.security_get_boolean_names() 998 security_get_boolean_names = _selinux.security_get_boolean_names 999 1000 def security_get_boolean_pending(*args): 1001 return _selinux.security_get_boolean_pending(*args) 1002 security_get_boolean_pending = _selinux.security_get_boolean_pending 1003 1004 def security_get_boolean_active(*args): 1005 return _selinux.security_get_boolean_active(*args) 1006 security_get_boolean_active = _selinux.security_get_boolean_active 1007 1008 def security_set_boolean(*args): 1009 return _selinux.security_set_boolean(*args) 1010 security_set_boolean = _selinux.security_set_boolean 1011 1012 def security_commit_booleans(): 1013 return _selinux.security_commit_booleans() 1014 security_commit_booleans = _selinux.security_commit_booleans 1015 class security_class_mapping(_object): 1016 __swig_setmethods__ = {} 1017 __setattr__ = lambda self, name, value: _swig_setattr(self, security_class_mapping, name, value) 1018 __swig_getmethods__ = {} 1019 __getattr__ = lambda self, name: _swig_getattr(self, security_class_mapping, name) 1020 __repr__ = _swig_repr 1021 __swig_setmethods__["name"] = _selinux.security_class_mapping_name_set 1022 __swig_getmethods__["name"] = _selinux.security_class_mapping_name_get 1023 if _newclass:name = _swig_property(_selinux.security_class_mapping_name_get, _selinux.security_class_mapping_name_set) 1024 __swig_setmethods__["perms"] = _selinux.security_class_mapping_perms_set 1025 __swig_getmethods__["perms"] = _selinux.security_class_mapping_perms_get 1026 if _newclass:perms = _swig_property(_selinux.security_class_mapping_perms_get, _selinux.security_class_mapping_perms_set) 1027 def __init__(self): 1028 this = _selinux.new_security_class_mapping() 1029 try: self.this.append(this) 1030 except: self.this = this 1031 __swig_destroy__ = _selinux.delete_security_class_mapping 1032 __del__ = lambda self : None; 1033 security_class_mapping_swigregister = _selinux.security_class_mapping_swigregister 1034 security_class_mapping_swigregister(security_class_mapping) 1035 1036 1037 def selinux_set_mapping(*args): 1038 return _selinux.selinux_set_mapping(*args) 1039 selinux_set_mapping = _selinux.selinux_set_mapping 1040 1041 def mode_to_security_class(*args): 1042 return _selinux.mode_to_security_class(*args) 1043 mode_to_security_class = _selinux.mode_to_security_class 1044 1045 def string_to_security_class(*args): 1046 return _selinux.string_to_security_class(*args) 1047 string_to_security_class = _selinux.string_to_security_class 1048 1049 def security_class_to_string(*args): 1050 return _selinux.security_class_to_string(*args) 1051 security_class_to_string = _selinux.security_class_to_string 1052 1053 def security_av_perm_to_string(*args): 1054 return _selinux.security_av_perm_to_string(*args) 1055 security_av_perm_to_string = _selinux.security_av_perm_to_string 1056 1057 def string_to_av_perm(*args): 1058 return _selinux.string_to_av_perm(*args) 1059 string_to_av_perm = _selinux.string_to_av_perm 1060 1061 def security_av_string(*args): 1062 return _selinux.security_av_string(*args) 1063 security_av_string = _selinux.security_av_string 1064 1065 def print_access_vector(*args): 1066 return _selinux.print_access_vector(*args) 1067 print_access_vector = _selinux.print_access_vector 1068 MATCHPATHCON_BASEONLY = _selinux.MATCHPATHCON_BASEONLY 1069 MATCHPATHCON_NOTRANS = _selinux.MATCHPATHCON_NOTRANS 1070 MATCHPATHCON_VALIDATE = _selinux.MATCHPATHCON_VALIDATE 1071 1072 def set_matchpathcon_flags(*args): 1073 return _selinux.set_matchpathcon_flags(*args) 1074 set_matchpathcon_flags = _selinux.set_matchpathcon_flags 1075 1076 def matchpathcon_init(*args): 1077 return _selinux.matchpathcon_init(*args) 1078 matchpathcon_init = _selinux.matchpathcon_init 1079 1080 def matchpathcon_init_prefix(*args): 1081 return _selinux.matchpathcon_init_prefix(*args) 1082 matchpathcon_init_prefix = _selinux.matchpathcon_init_prefix 1083 1084 def matchpathcon_fini(): 1085 return _selinux.matchpathcon_fini() 1086 matchpathcon_fini = _selinux.matchpathcon_fini 1087 1088 def realpath_not_final(*args): 1089 return _selinux.realpath_not_final(*args) 1090 realpath_not_final = _selinux.realpath_not_final 1091 1092 def matchpathcon(*args): 1093 return _selinux.matchpathcon(*args) 1094 matchpathcon = _selinux.matchpathcon 1095 1096 def matchpathcon_index(*args): 1097 return _selinux.matchpathcon_index(*args) 1098 matchpathcon_index = _selinux.matchpathcon_index 1099 1100 def matchpathcon_filespec_add(*args): 1101 return _selinux.matchpathcon_filespec_add(*args) 1102 matchpathcon_filespec_add = _selinux.matchpathcon_filespec_add 1103 1104 def matchpathcon_filespec_destroy(): 1105 return _selinux.matchpathcon_filespec_destroy() 1106 matchpathcon_filespec_destroy = _selinux.matchpathcon_filespec_destroy 1107 1108 def matchpathcon_filespec_eval(): 1109 return _selinux.matchpathcon_filespec_eval() 1110 matchpathcon_filespec_eval = _selinux.matchpathcon_filespec_eval 1111 1112 def matchpathcon_checkmatches(*args): 1113 return _selinux.matchpathcon_checkmatches(*args) 1114 matchpathcon_checkmatches = _selinux.matchpathcon_checkmatches 1115 1116 def matchmediacon(*args): 1117 return _selinux.matchmediacon(*args) 1118 matchmediacon = _selinux.matchmediacon 1119 1120 def selinux_getenforcemode(): 1121 return _selinux.selinux_getenforcemode() 1122 selinux_getenforcemode = _selinux.selinux_getenforcemode 1123 1124 def selinux_boolean_sub(*args): 1125 return _selinux.selinux_boolean_sub(*args) 1126 selinux_boolean_sub = _selinux.selinux_boolean_sub 1127 1128 def selinux_getpolicytype(): 1129 return _selinux.selinux_getpolicytype() 1130 selinux_getpolicytype = _selinux.selinux_getpolicytype 1131 1132 def selinux_policy_root(): 1133 return _selinux.selinux_policy_root() 1134 selinux_policy_root = _selinux.selinux_policy_root 1135 1136 def selinux_set_policy_root(*args): 1137 return _selinux.selinux_set_policy_root(*args) 1138 selinux_set_policy_root = _selinux.selinux_set_policy_root 1139 1140 def selinux_current_policy_path(): 1141 return _selinux.selinux_current_policy_path() 1142 selinux_current_policy_path = _selinux.selinux_current_policy_path 1143 1144 def selinux_binary_policy_path(): 1145 return _selinux.selinux_binary_policy_path() 1146 selinux_binary_policy_path = _selinux.selinux_binary_policy_path 1147 1148 def selinux_failsafe_context_path(): 1149 return _selinux.selinux_failsafe_context_path() 1150 selinux_failsafe_context_path = _selinux.selinux_failsafe_context_path 1151 1152 def selinux_removable_context_path(): 1153 return _selinux.selinux_removable_context_path() 1154 selinux_removable_context_path = _selinux.selinux_removable_context_path 1155 1156 def selinux_default_context_path(): 1157 return _selinux.selinux_default_context_path() 1158 selinux_default_context_path = _selinux.selinux_default_context_path 1159 1160 def selinux_user_contexts_path(): 1161 return _selinux.selinux_user_contexts_path() 1162 selinux_user_contexts_path = _selinux.selinux_user_contexts_path 1163 1164 def selinux_file_context_path(): 1165 return _selinux.selinux_file_context_path() 1166 selinux_file_context_path = _selinux.selinux_file_context_path 1167 1168 def selinux_file_context_homedir_path(): 1169 return _selinux.selinux_file_context_homedir_path() 1170 selinux_file_context_homedir_path = _selinux.selinux_file_context_homedir_path 1171 1172 def selinux_file_context_local_path(): 1173 return _selinux.selinux_file_context_local_path() 1174 selinux_file_context_local_path = _selinux.selinux_file_context_local_path 1175 1176 def selinux_file_context_subs_path(): 1177 return _selinux.selinux_file_context_subs_path() 1178 selinux_file_context_subs_path = _selinux.selinux_file_context_subs_path 1179 1180 def selinux_file_context_subs_dist_path(): 1181 return _selinux.selinux_file_context_subs_dist_path() 1182 selinux_file_context_subs_dist_path = _selinux.selinux_file_context_subs_dist_path 1183 1184 def selinux_homedir_context_path(): 1185 return _selinux.selinux_homedir_context_path() 1186 selinux_homedir_context_path = _selinux.selinux_homedir_context_path 1187 1188 def selinux_media_context_path(): 1189 return _selinux.selinux_media_context_path() 1190 selinux_media_context_path = _selinux.selinux_media_context_path 1191 1192 def selinux_virtual_domain_context_path(): 1193 return _selinux.selinux_virtual_domain_context_path() 1194 selinux_virtual_domain_context_path = _selinux.selinux_virtual_domain_context_path 1195 1196 def selinux_virtual_image_context_path(): 1197 return _selinux.selinux_virtual_image_context_path() 1198 selinux_virtual_image_context_path = _selinux.selinux_virtual_image_context_path 1199 1200 def selinux_lxc_contexts_path(): 1201 return _selinux.selinux_lxc_contexts_path() 1202 selinux_lxc_contexts_path = _selinux.selinux_lxc_contexts_path 1203 1204 def selinux_x_context_path(): 1205 return _selinux.selinux_x_context_path() 1206 selinux_x_context_path = _selinux.selinux_x_context_path 1207 1208 def selinux_sepgsql_context_path(): 1209 return _selinux.selinux_sepgsql_context_path() 1210 selinux_sepgsql_context_path = _selinux.selinux_sepgsql_context_path 1211 1212 def selinux_openssh_contexts_path(): 1213 return _selinux.selinux_openssh_contexts_path() 1214 selinux_openssh_contexts_path = _selinux.selinux_openssh_contexts_path 1215 1216 def selinux_systemd_contexts_path(): 1217 return _selinux.selinux_systemd_contexts_path() 1218 selinux_systemd_contexts_path = _selinux.selinux_systemd_contexts_path 1219 1220 def selinux_contexts_path(): 1221 return _selinux.selinux_contexts_path() 1222 selinux_contexts_path = _selinux.selinux_contexts_path 1223 1224 def selinux_securetty_types_path(): 1225 return _selinux.selinux_securetty_types_path() 1226 selinux_securetty_types_path = _selinux.selinux_securetty_types_path 1227 1228 def selinux_booleans_subs_path(): 1229 return _selinux.selinux_booleans_subs_path() 1230 selinux_booleans_subs_path = _selinux.selinux_booleans_subs_path 1231 1232 def selinux_booleans_path(): 1233 return _selinux.selinux_booleans_path() 1234 selinux_booleans_path = _selinux.selinux_booleans_path 1235 1236 def selinux_customizable_types_path(): 1237 return _selinux.selinux_customizable_types_path() 1238 selinux_customizable_types_path = _selinux.selinux_customizable_types_path 1239 1240 def selinux_users_path(): 1241 return _selinux.selinux_users_path() 1242 selinux_users_path = _selinux.selinux_users_path 1243 1244 def selinux_usersconf_path(): 1245 return _selinux.selinux_usersconf_path() 1246 selinux_usersconf_path = _selinux.selinux_usersconf_path 1247 1248 def selinux_translations_path(): 1249 return _selinux.selinux_translations_path() 1250 selinux_translations_path = _selinux.selinux_translations_path 1251 1252 def selinux_colors_path(): 1253 return _selinux.selinux_colors_path() 1254 selinux_colors_path = _selinux.selinux_colors_path 1255 1256 def selinux_netfilter_context_path(): 1257 return _selinux.selinux_netfilter_context_path() 1258 selinux_netfilter_context_path = _selinux.selinux_netfilter_context_path 1259 1260 def selinux_path(): 1261 return _selinux.selinux_path() 1262 selinux_path = _selinux.selinux_path 1263 1264 def selinux_check_access(*args): 1265 return _selinux.selinux_check_access(*args) 1266 selinux_check_access = _selinux.selinux_check_access 1267 1268 def selinux_check_passwd_access(*args): 1269 return _selinux.selinux_check_passwd_access(*args) 1270 selinux_check_passwd_access = _selinux.selinux_check_passwd_access 1271 1272 def checkPasswdAccess(*args): 1273 return _selinux.checkPasswdAccess(*args) 1274 checkPasswdAccess = _selinux.checkPasswdAccess 1275 1276 def selinux_check_securetty_context(*args): 1277 return _selinux.selinux_check_securetty_context(*args) 1278 selinux_check_securetty_context = _selinux.selinux_check_securetty_context 1279 1280 def set_selinuxmnt(*args): 1281 return _selinux.set_selinuxmnt(*args) 1282 set_selinuxmnt = _selinux.set_selinuxmnt 1283 1284 def selinuxfs_exists(): 1285 return _selinux.selinuxfs_exists() 1286 selinuxfs_exists = _selinux.selinuxfs_exists 1287 1288 def fini_selinuxmnt(): 1289 return _selinux.fini_selinuxmnt() 1290 fini_selinuxmnt = _selinux.fini_selinuxmnt 1291 1292 def setexecfilecon(*args): 1293 return _selinux.setexecfilecon(*args) 1294 setexecfilecon = _selinux.setexecfilecon 1295 1296 def rpm_execcon(*args): 1297 return _selinux.rpm_execcon(*args) 1298 rpm_execcon = _selinux.rpm_execcon 1299 1300 def is_context_customizable(*args): 1301 return _selinux.is_context_customizable(*args) 1302 is_context_customizable = _selinux.is_context_customizable 1303 1304 def selinux_trans_to_raw_context(*args): 1305 return _selinux.selinux_trans_to_raw_context(*args) 1306 selinux_trans_to_raw_context = _selinux.selinux_trans_to_raw_context 1307 1308 def selinux_raw_to_trans_context(*args): 1309 return _selinux.selinux_raw_to_trans_context(*args) 1310 selinux_raw_to_trans_context = _selinux.selinux_raw_to_trans_context 1311 1312 def selinux_raw_context_to_color(*args): 1313 return _selinux.selinux_raw_context_to_color(*args) 1314 selinux_raw_context_to_color = _selinux.selinux_raw_context_to_color 1315 1316 def getseuserbyname(*args): 1317 return _selinux.getseuserbyname(*args) 1318 getseuserbyname = _selinux.getseuserbyname 1319 1320 def getseuser(*args): 1321 return _selinux.getseuser(*args) 1322 getseuser = _selinux.getseuser 1323 1324 def selinux_file_context_cmp(*args): 1325 return _selinux.selinux_file_context_cmp(*args) 1326 selinux_file_context_cmp = _selinux.selinux_file_context_cmp 1327 1328 def selinux_file_context_verify(*args): 1329 return _selinux.selinux_file_context_verify(*args) 1330 selinux_file_context_verify = _selinux.selinux_file_context_verify 1331 1332 def selinux_lsetfilecon_default(*args): 1333 return _selinux.selinux_lsetfilecon_default(*args) 1334 selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default 1335 1336 def selinux_reset_config(): 1337 return _selinux.selinux_reset_config() 1338 selinux_reset_config = _selinux.selinux_reset_config 1339 # This file is compatible with both classic and new-style classes. 1340 1341 1342