diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 0737a21..dfea434 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1189,7 +1189,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_internal.h libsel hidden_proto(selinux_user_contexts_path) diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.79/src/selinux.py --- nsalibselinux/src/selinux.py 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.79/src/selinux.py 2009-03-27 14:21:40.000000000 -0400 ++++ libselinux-2.0.79/src/selinux.py 2009-03-27 16:31:56.000000000 -0400 @@ -1,12 +1,26 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 @@ -1255,7 +1255,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 import shutil, os, stat -@@ -61,46 +73,175 @@ +@@ -61,46 +73,1507 @@ map(restorecon, [os.path.join(dirname, fname) for fname in fnames]), None) @@ -1270,6 +1270,1338 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 + restorecon(dest, recursive=True) + ++def avc_sid_to_context(*args): ++ return _selinux.avc_sid_to_context(*args) ++avc_sid_to_context = _selinux.avc_sid_to_context ++ ++def avc_sid_to_context_raw(*args): ++ return _selinux.avc_sid_to_context_raw(*args) ++avc_sid_to_context_raw = _selinux.avc_sid_to_context_raw ++ ++def avc_context_to_sid(*args): ++ return _selinux.avc_context_to_sid(*args) ++avc_context_to_sid = _selinux.avc_context_to_sid ++ ++def avc_context_to_sid_raw(*args): ++ return _selinux.avc_context_to_sid_raw(*args) ++avc_context_to_sid_raw = _selinux.avc_context_to_sid_raw ++ ++def sidget(*args): ++ return _selinux.sidget(*args) ++sidget = _selinux.sidget ++ ++def sidput(*args): ++ return _selinux.sidput(*args) ++sidput = _selinux.sidput ++ ++def avc_get_initial_sid(*args): ++ return _selinux.avc_get_initial_sid(*args) ++avc_get_initial_sid = _selinux.avc_get_initial_sid ++AVC_OPT_UNUSED = _selinux.AVC_OPT_UNUSED ++AVC_OPT_SETENFORCE = _selinux.AVC_OPT_SETENFORCE ++ ++def avc_init(*args): ++ return _selinux.avc_init(*args) ++avc_init = _selinux.avc_init ++ ++def avc_open(*args): ++ return _selinux.avc_open(*args) ++avc_open = _selinux.avc_open ++ ++def avc_reset(): ++ return _selinux.avc_reset() ++avc_reset = _selinux.avc_reset ++ ++def avc_has_perm_noaudit(*args): ++ return _selinux.avc_has_perm_noaudit(*args) ++avc_has_perm_noaudit = _selinux.avc_has_perm_noaudit ++ ++def avc_has_perm(*args): ++ return _selinux.avc_has_perm(*args) ++avc_has_perm = _selinux.avc_has_perm ++ ++def avc_compute_create(*args): ++ return _selinux.avc_compute_create(*args) ++avc_compute_create = _selinux.avc_compute_create ++ ++def avc_compute_member(*args): ++ return _selinux.avc_compute_member(*args) ++avc_compute_member = _selinux.avc_compute_member ++AVC_CALLBACK_GRANT = _selinux.AVC_CALLBACK_GRANT ++AVC_CALLBACK_TRY_REVOKE = _selinux.AVC_CALLBACK_TRY_REVOKE ++AVC_CALLBACK_REVOKE = _selinux.AVC_CALLBACK_REVOKE ++AVC_CALLBACK_RESET = _selinux.AVC_CALLBACK_RESET ++AVC_CALLBACK_AUDITALLOW_ENABLE = _selinux.AVC_CALLBACK_AUDITALLOW_ENABLE ++AVC_CALLBACK_AUDITALLOW_DISABLE = _selinux.AVC_CALLBACK_AUDITALLOW_DISABLE ++AVC_CALLBACK_AUDITDENY_ENABLE = _selinux.AVC_CALLBACK_AUDITDENY_ENABLE ++AVC_CALLBACK_AUDITDENY_DISABLE = _selinux.AVC_CALLBACK_AUDITDENY_DISABLE ++AVC_CACHE_STATS = _selinux.AVC_CACHE_STATS ++COMMON_FILE__IOCTL = _selinux.COMMON_FILE__IOCTL ++COMMON_FILE__READ = _selinux.COMMON_FILE__READ ++COMMON_FILE__WRITE = _selinux.COMMON_FILE__WRITE ++COMMON_FILE__CREATE = _selinux.COMMON_FILE__CREATE ++COMMON_FILE__GETATTR = _selinux.COMMON_FILE__GETATTR ++COMMON_FILE__SETATTR = _selinux.COMMON_FILE__SETATTR ++COMMON_FILE__LOCK = _selinux.COMMON_FILE__LOCK ++COMMON_FILE__RELABELFROM = _selinux.COMMON_FILE__RELABELFROM ++COMMON_FILE__RELABELTO = _selinux.COMMON_FILE__RELABELTO ++COMMON_FILE__APPEND = _selinux.COMMON_FILE__APPEND ++COMMON_FILE__UNLINK = _selinux.COMMON_FILE__UNLINK ++COMMON_FILE__LINK = _selinux.COMMON_FILE__LINK ++COMMON_FILE__RENAME = _selinux.COMMON_FILE__RENAME ++COMMON_FILE__EXECUTE = _selinux.COMMON_FILE__EXECUTE ++COMMON_FILE__SWAPON = _selinux.COMMON_FILE__SWAPON ++COMMON_FILE__QUOTAON = _selinux.COMMON_FILE__QUOTAON ++COMMON_FILE__MOUNTON = _selinux.COMMON_FILE__MOUNTON ++COMMON_SOCKET__IOCTL = _selinux.COMMON_SOCKET__IOCTL ++COMMON_SOCKET__READ = _selinux.COMMON_SOCKET__READ ++COMMON_SOCKET__WRITE = _selinux.COMMON_SOCKET__WRITE ++COMMON_SOCKET__CREATE = _selinux.COMMON_SOCKET__CREATE ++COMMON_SOCKET__GETATTR = _selinux.COMMON_SOCKET__GETATTR ++COMMON_SOCKET__SETATTR = _selinux.COMMON_SOCKET__SETATTR ++COMMON_SOCKET__LOCK = _selinux.COMMON_SOCKET__LOCK ++COMMON_SOCKET__RELABELFROM = _selinux.COMMON_SOCKET__RELABELFROM ++COMMON_SOCKET__RELABELTO = _selinux.COMMON_SOCKET__RELABELTO ++COMMON_SOCKET__APPEND = _selinux.COMMON_SOCKET__APPEND ++COMMON_SOCKET__BIND = _selinux.COMMON_SOCKET__BIND ++COMMON_SOCKET__CONNECT = _selinux.COMMON_SOCKET__CONNECT ++COMMON_SOCKET__LISTEN = _selinux.COMMON_SOCKET__LISTEN ++COMMON_SOCKET__ACCEPT = _selinux.COMMON_SOCKET__ACCEPT ++COMMON_SOCKET__GETOPT = _selinux.COMMON_SOCKET__GETOPT ++COMMON_SOCKET__SETOPT = _selinux.COMMON_SOCKET__SETOPT ++COMMON_SOCKET__SHUTDOWN = _selinux.COMMON_SOCKET__SHUTDOWN ++COMMON_SOCKET__RECVFROM = _selinux.COMMON_SOCKET__RECVFROM ++COMMON_SOCKET__SENDTO = _selinux.COMMON_SOCKET__SENDTO ++COMMON_SOCKET__RECV_MSG = _selinux.COMMON_SOCKET__RECV_MSG ++COMMON_SOCKET__SEND_MSG = _selinux.COMMON_SOCKET__SEND_MSG ++COMMON_SOCKET__NAME_BIND = _selinux.COMMON_SOCKET__NAME_BIND ++COMMON_IPC__CREATE = _selinux.COMMON_IPC__CREATE ++COMMON_IPC__DESTROY = _selinux.COMMON_IPC__DESTROY ++COMMON_IPC__GETATTR = _selinux.COMMON_IPC__GETATTR ++COMMON_IPC__SETATTR = _selinux.COMMON_IPC__SETATTR ++COMMON_IPC__READ = _selinux.COMMON_IPC__READ ++COMMON_IPC__WRITE = _selinux.COMMON_IPC__WRITE ++COMMON_IPC__ASSOCIATE = _selinux.COMMON_IPC__ASSOCIATE ++COMMON_IPC__UNIX_READ = _selinux.COMMON_IPC__UNIX_READ ++COMMON_IPC__UNIX_WRITE = _selinux.COMMON_IPC__UNIX_WRITE ++COMMON_DATABASE__CREATE = _selinux.COMMON_DATABASE__CREATE ++COMMON_DATABASE__DROP = _selinux.COMMON_DATABASE__DROP ++COMMON_DATABASE__GETATTR = _selinux.COMMON_DATABASE__GETATTR ++COMMON_DATABASE__SETATTR = _selinux.COMMON_DATABASE__SETATTR ++COMMON_DATABASE__RELABELFROM = _selinux.COMMON_DATABASE__RELABELFROM ++COMMON_DATABASE__RELABELTO = _selinux.COMMON_DATABASE__RELABELTO ++FILESYSTEM__MOUNT = _selinux.FILESYSTEM__MOUNT ++FILESYSTEM__REMOUNT = _selinux.FILESYSTEM__REMOUNT ++FILESYSTEM__UNMOUNT = _selinux.FILESYSTEM__UNMOUNT ++FILESYSTEM__GETATTR = _selinux.FILESYSTEM__GETATTR ++FILESYSTEM__RELABELFROM = _selinux.FILESYSTEM__RELABELFROM ++FILESYSTEM__RELABELTO = _selinux.FILESYSTEM__RELABELTO ++FILESYSTEM__TRANSITION = _selinux.FILESYSTEM__TRANSITION ++FILESYSTEM__ASSOCIATE = _selinux.FILESYSTEM__ASSOCIATE ++FILESYSTEM__QUOTAMOD = _selinux.FILESYSTEM__QUOTAMOD ++FILESYSTEM__QUOTAGET = _selinux.FILESYSTEM__QUOTAGET ++DIR__IOCTL = _selinux.DIR__IOCTL ++DIR__READ = _selinux.DIR__READ ++DIR__WRITE = _selinux.DIR__WRITE ++DIR__CREATE = _selinux.DIR__CREATE ++DIR__GETATTR = _selinux.DIR__GETATTR ++DIR__SETATTR = _selinux.DIR__SETATTR ++DIR__LOCK = _selinux.DIR__LOCK ++DIR__RELABELFROM = _selinux.DIR__RELABELFROM ++DIR__RELABELTO = _selinux.DIR__RELABELTO ++DIR__APPEND = _selinux.DIR__APPEND ++DIR__UNLINK = _selinux.DIR__UNLINK ++DIR__LINK = _selinux.DIR__LINK ++DIR__RENAME = _selinux.DIR__RENAME ++DIR__EXECUTE = _selinux.DIR__EXECUTE ++DIR__SWAPON = _selinux.DIR__SWAPON ++DIR__QUOTAON = _selinux.DIR__QUOTAON ++DIR__MOUNTON = _selinux.DIR__MOUNTON ++DIR__ADD_NAME = _selinux.DIR__ADD_NAME ++DIR__REMOVE_NAME = _selinux.DIR__REMOVE_NAME ++DIR__REPARENT = _selinux.DIR__REPARENT ++DIR__SEARCH = _selinux.DIR__SEARCH ++DIR__RMDIR = _selinux.DIR__RMDIR ++DIR__OPEN = _selinux.DIR__OPEN ++FILE__IOCTL = _selinux.FILE__IOCTL ++FILE__READ = _selinux.FILE__READ ++FILE__WRITE = _selinux.FILE__WRITE ++FILE__CREATE = _selinux.FILE__CREATE ++FILE__GETATTR = _selinux.FILE__GETATTR ++FILE__SETATTR = _selinux.FILE__SETATTR ++FILE__LOCK = _selinux.FILE__LOCK ++FILE__RELABELFROM = _selinux.FILE__RELABELFROM ++FILE__RELABELTO = _selinux.FILE__RELABELTO ++FILE__APPEND = _selinux.FILE__APPEND ++FILE__UNLINK = _selinux.FILE__UNLINK ++FILE__LINK = _selinux.FILE__LINK ++FILE__RENAME = _selinux.FILE__RENAME ++FILE__EXECUTE = _selinux.FILE__EXECUTE ++FILE__SWAPON = _selinux.FILE__SWAPON ++FILE__QUOTAON = _selinux.FILE__QUOTAON ++FILE__MOUNTON = _selinux.FILE__MOUNTON ++FILE__EXECUTE_NO_TRANS = _selinux.FILE__EXECUTE_NO_TRANS ++FILE__ENTRYPOINT = _selinux.FILE__ENTRYPOINT ++FILE__EXECMOD = _selinux.FILE__EXECMOD ++FILE__OPEN = _selinux.FILE__OPEN ++LNK_FILE__IOCTL = _selinux.LNK_FILE__IOCTL ++LNK_FILE__READ = _selinux.LNK_FILE__READ ++LNK_FILE__WRITE = _selinux.LNK_FILE__WRITE ++LNK_FILE__CREATE = _selinux.LNK_FILE__CREATE ++LNK_FILE__GETATTR = _selinux.LNK_FILE__GETATTR ++LNK_FILE__SETATTR = _selinux.LNK_FILE__SETATTR ++LNK_FILE__LOCK = _selinux.LNK_FILE__LOCK ++LNK_FILE__RELABELFROM = _selinux.LNK_FILE__RELABELFROM ++LNK_FILE__RELABELTO = _selinux.LNK_FILE__RELABELTO ++LNK_FILE__APPEND = _selinux.LNK_FILE__APPEND ++LNK_FILE__UNLINK = _selinux.LNK_FILE__UNLINK ++LNK_FILE__LINK = _selinux.LNK_FILE__LINK ++LNK_FILE__RENAME = _selinux.LNK_FILE__RENAME ++LNK_FILE__EXECUTE = _selinux.LNK_FILE__EXECUTE ++LNK_FILE__SWAPON = _selinux.LNK_FILE__SWAPON ++LNK_FILE__QUOTAON = _selinux.LNK_FILE__QUOTAON ++LNK_FILE__MOUNTON = _selinux.LNK_FILE__MOUNTON ++CHR_FILE__IOCTL = _selinux.CHR_FILE__IOCTL ++CHR_FILE__READ = _selinux.CHR_FILE__READ ++CHR_FILE__WRITE = _selinux.CHR_FILE__WRITE ++CHR_FILE__CREATE = _selinux.CHR_FILE__CREATE ++CHR_FILE__GETATTR = _selinux.CHR_FILE__GETATTR ++CHR_FILE__SETATTR = _selinux.CHR_FILE__SETATTR ++CHR_FILE__LOCK = _selinux.CHR_FILE__LOCK ++CHR_FILE__RELABELFROM = _selinux.CHR_FILE__RELABELFROM ++CHR_FILE__RELABELTO = _selinux.CHR_FILE__RELABELTO ++CHR_FILE__APPEND = _selinux.CHR_FILE__APPEND ++CHR_FILE__UNLINK = _selinux.CHR_FILE__UNLINK ++CHR_FILE__LINK = _selinux.CHR_FILE__LINK ++CHR_FILE__RENAME = _selinux.CHR_FILE__RENAME ++CHR_FILE__EXECUTE = _selinux.CHR_FILE__EXECUTE ++CHR_FILE__SWAPON = _selinux.CHR_FILE__SWAPON ++CHR_FILE__QUOTAON = _selinux.CHR_FILE__QUOTAON ++CHR_FILE__MOUNTON = _selinux.CHR_FILE__MOUNTON ++CHR_FILE__EXECUTE_NO_TRANS = _selinux.CHR_FILE__EXECUTE_NO_TRANS ++CHR_FILE__ENTRYPOINT = _selinux.CHR_FILE__ENTRYPOINT ++CHR_FILE__EXECMOD = _selinux.CHR_FILE__EXECMOD ++CHR_FILE__OPEN = _selinux.CHR_FILE__OPEN ++BLK_FILE__IOCTL = _selinux.BLK_FILE__IOCTL ++BLK_FILE__READ = _selinux.BLK_FILE__READ ++BLK_FILE__WRITE = _selinux.BLK_FILE__WRITE ++BLK_FILE__CREATE = _selinux.BLK_FILE__CREATE ++BLK_FILE__GETATTR = _selinux.BLK_FILE__GETATTR ++BLK_FILE__SETATTR = _selinux.BLK_FILE__SETATTR ++BLK_FILE__LOCK = _selinux.BLK_FILE__LOCK ++BLK_FILE__RELABELFROM = _selinux.BLK_FILE__RELABELFROM ++BLK_FILE__RELABELTO = _selinux.BLK_FILE__RELABELTO ++BLK_FILE__APPEND = _selinux.BLK_FILE__APPEND ++BLK_FILE__UNLINK = _selinux.BLK_FILE__UNLINK ++BLK_FILE__LINK = _selinux.BLK_FILE__LINK ++BLK_FILE__RENAME = _selinux.BLK_FILE__RENAME ++BLK_FILE__EXECUTE = _selinux.BLK_FILE__EXECUTE ++BLK_FILE__SWAPON = _selinux.BLK_FILE__SWAPON ++BLK_FILE__QUOTAON = _selinux.BLK_FILE__QUOTAON ++BLK_FILE__MOUNTON = _selinux.BLK_FILE__MOUNTON ++BLK_FILE__OPEN = _selinux.BLK_FILE__OPEN ++SOCK_FILE__IOCTL = _selinux.SOCK_FILE__IOCTL ++SOCK_FILE__READ = _selinux.SOCK_FILE__READ ++SOCK_FILE__WRITE = _selinux.SOCK_FILE__WRITE ++SOCK_FILE__CREATE = _selinux.SOCK_FILE__CREATE ++SOCK_FILE__GETATTR = _selinux.SOCK_FILE__GETATTR ++SOCK_FILE__SETATTR = _selinux.SOCK_FILE__SETATTR ++SOCK_FILE__LOCK = _selinux.SOCK_FILE__LOCK ++SOCK_FILE__RELABELFROM = _selinux.SOCK_FILE__RELABELFROM ++SOCK_FILE__RELABELTO = _selinux.SOCK_FILE__RELABELTO ++SOCK_FILE__APPEND = _selinux.SOCK_FILE__APPEND ++SOCK_FILE__UNLINK = _selinux.SOCK_FILE__UNLINK ++SOCK_FILE__LINK = _selinux.SOCK_FILE__LINK ++SOCK_FILE__RENAME = _selinux.SOCK_FILE__RENAME ++SOCK_FILE__EXECUTE = _selinux.SOCK_FILE__EXECUTE ++SOCK_FILE__SWAPON = _selinux.SOCK_FILE__SWAPON ++SOCK_FILE__QUOTAON = _selinux.SOCK_FILE__QUOTAON ++SOCK_FILE__MOUNTON = _selinux.SOCK_FILE__MOUNTON ++FIFO_FILE__IOCTL = _selinux.FIFO_FILE__IOCTL ++FIFO_FILE__READ = _selinux.FIFO_FILE__READ ++FIFO_FILE__WRITE = _selinux.FIFO_FILE__WRITE ++FIFO_FILE__CREATE = _selinux.FIFO_FILE__CREATE ++FIFO_FILE__GETATTR = _selinux.FIFO_FILE__GETATTR ++FIFO_FILE__SETATTR = _selinux.FIFO_FILE__SETATTR ++FIFO_FILE__LOCK = _selinux.FIFO_FILE__LOCK ++FIFO_FILE__RELABELFROM = _selinux.FIFO_FILE__RELABELFROM ++FIFO_FILE__RELABELTO = _selinux.FIFO_FILE__RELABELTO ++FIFO_FILE__APPEND = _selinux.FIFO_FILE__APPEND ++FIFO_FILE__UNLINK = _selinux.FIFO_FILE__UNLINK ++FIFO_FILE__LINK = _selinux.FIFO_FILE__LINK ++FIFO_FILE__RENAME = _selinux.FIFO_FILE__RENAME ++FIFO_FILE__EXECUTE = _selinux.FIFO_FILE__EXECUTE ++FIFO_FILE__SWAPON = _selinux.FIFO_FILE__SWAPON ++FIFO_FILE__QUOTAON = _selinux.FIFO_FILE__QUOTAON ++FIFO_FILE__MOUNTON = _selinux.FIFO_FILE__MOUNTON ++FIFO_FILE__OPEN = _selinux.FIFO_FILE__OPEN ++FD__USE = _selinux.FD__USE ++SOCKET__IOCTL = _selinux.SOCKET__IOCTL ++SOCKET__READ = _selinux.SOCKET__READ ++SOCKET__WRITE = _selinux.SOCKET__WRITE ++SOCKET__CREATE = _selinux.SOCKET__CREATE ++SOCKET__GETATTR = _selinux.SOCKET__GETATTR ++SOCKET__SETATTR = _selinux.SOCKET__SETATTR ++SOCKET__LOCK = _selinux.SOCKET__LOCK ++SOCKET__RELABELFROM = _selinux.SOCKET__RELABELFROM ++SOCKET__RELABELTO = _selinux.SOCKET__RELABELTO ++SOCKET__APPEND = _selinux.SOCKET__APPEND ++SOCKET__BIND = _selinux.SOCKET__BIND ++SOCKET__CONNECT = _selinux.SOCKET__CONNECT ++SOCKET__LISTEN = _selinux.SOCKET__LISTEN ++SOCKET__ACCEPT = _selinux.SOCKET__ACCEPT ++SOCKET__GETOPT = _selinux.SOCKET__GETOPT ++SOCKET__SETOPT = _selinux.SOCKET__SETOPT ++SOCKET__SHUTDOWN = _selinux.SOCKET__SHUTDOWN ++SOCKET__RECVFROM = _selinux.SOCKET__RECVFROM ++SOCKET__SENDTO = _selinux.SOCKET__SENDTO ++SOCKET__RECV_MSG = _selinux.SOCKET__RECV_MSG ++SOCKET__SEND_MSG = _selinux.SOCKET__SEND_MSG ++SOCKET__NAME_BIND = _selinux.SOCKET__NAME_BIND ++TCP_SOCKET__IOCTL = _selinux.TCP_SOCKET__IOCTL ++TCP_SOCKET__READ = _selinux.TCP_SOCKET__READ ++TCP_SOCKET__WRITE = _selinux.TCP_SOCKET__WRITE ++TCP_SOCKET__CREATE = _selinux.TCP_SOCKET__CREATE ++TCP_SOCKET__GETATTR = _selinux.TCP_SOCKET__GETATTR ++TCP_SOCKET__SETATTR = _selinux.TCP_SOCKET__SETATTR ++TCP_SOCKET__LOCK = _selinux.TCP_SOCKET__LOCK ++TCP_SOCKET__RELABELFROM = _selinux.TCP_SOCKET__RELABELFROM ++TCP_SOCKET__RELABELTO = _selinux.TCP_SOCKET__RELABELTO ++TCP_SOCKET__APPEND = _selinux.TCP_SOCKET__APPEND ++TCP_SOCKET__BIND = _selinux.TCP_SOCKET__BIND ++TCP_SOCKET__CONNECT = _selinux.TCP_SOCKET__CONNECT ++TCP_SOCKET__LISTEN = _selinux.TCP_SOCKET__LISTEN ++TCP_SOCKET__ACCEPT = _selinux.TCP_SOCKET__ACCEPT ++TCP_SOCKET__GETOPT = _selinux.TCP_SOCKET__GETOPT ++TCP_SOCKET__SETOPT = _selinux.TCP_SOCKET__SETOPT ++TCP_SOCKET__SHUTDOWN = _selinux.TCP_SOCKET__SHUTDOWN ++TCP_SOCKET__RECVFROM = _selinux.TCP_SOCKET__RECVFROM ++TCP_SOCKET__SENDTO = _selinux.TCP_SOCKET__SENDTO ++TCP_SOCKET__RECV_MSG = _selinux.TCP_SOCKET__RECV_MSG ++TCP_SOCKET__SEND_MSG = _selinux.TCP_SOCKET__SEND_MSG ++TCP_SOCKET__NAME_BIND = _selinux.TCP_SOCKET__NAME_BIND ++TCP_SOCKET__CONNECTTO = _selinux.TCP_SOCKET__CONNECTTO ++TCP_SOCKET__NEWCONN = _selinux.TCP_SOCKET__NEWCONN ++TCP_SOCKET__ACCEPTFROM = _selinux.TCP_SOCKET__ACCEPTFROM ++TCP_SOCKET__NODE_BIND = _selinux.TCP_SOCKET__NODE_BIND ++TCP_SOCKET__NAME_CONNECT = _selinux.TCP_SOCKET__NAME_CONNECT ++UDP_SOCKET__IOCTL = _selinux.UDP_SOCKET__IOCTL ++UDP_SOCKET__READ = _selinux.UDP_SOCKET__READ ++UDP_SOCKET__WRITE = _selinux.UDP_SOCKET__WRITE ++UDP_SOCKET__CREATE = _selinux.UDP_SOCKET__CREATE ++UDP_SOCKET__GETATTR = _selinux.UDP_SOCKET__GETATTR ++UDP_SOCKET__SETATTR = _selinux.UDP_SOCKET__SETATTR ++UDP_SOCKET__LOCK = _selinux.UDP_SOCKET__LOCK ++UDP_SOCKET__RELABELFROM = _selinux.UDP_SOCKET__RELABELFROM ++UDP_SOCKET__RELABELTO = _selinux.UDP_SOCKET__RELABELTO ++UDP_SOCKET__APPEND = _selinux.UDP_SOCKET__APPEND ++UDP_SOCKET__BIND = _selinux.UDP_SOCKET__BIND ++UDP_SOCKET__CONNECT = _selinux.UDP_SOCKET__CONNECT ++UDP_SOCKET__LISTEN = _selinux.UDP_SOCKET__LISTEN ++UDP_SOCKET__ACCEPT = _selinux.UDP_SOCKET__ACCEPT ++UDP_SOCKET__GETOPT = _selinux.UDP_SOCKET__GETOPT ++UDP_SOCKET__SETOPT = _selinux.UDP_SOCKET__SETOPT ++UDP_SOCKET__SHUTDOWN = _selinux.UDP_SOCKET__SHUTDOWN ++UDP_SOCKET__RECVFROM = _selinux.UDP_SOCKET__RECVFROM ++UDP_SOCKET__SENDTO = _selinux.UDP_SOCKET__SENDTO ++UDP_SOCKET__RECV_MSG = _selinux.UDP_SOCKET__RECV_MSG ++UDP_SOCKET__SEND_MSG = _selinux.UDP_SOCKET__SEND_MSG ++UDP_SOCKET__NAME_BIND = _selinux.UDP_SOCKET__NAME_BIND ++UDP_SOCKET__NODE_BIND = _selinux.UDP_SOCKET__NODE_BIND ++RAWIP_SOCKET__IOCTL = _selinux.RAWIP_SOCKET__IOCTL ++RAWIP_SOCKET__READ = _selinux.RAWIP_SOCKET__READ ++RAWIP_SOCKET__WRITE = _selinux.RAWIP_SOCKET__WRITE ++RAWIP_SOCKET__CREATE = _selinux.RAWIP_SOCKET__CREATE ++RAWIP_SOCKET__GETATTR = _selinux.RAWIP_SOCKET__GETATTR ++RAWIP_SOCKET__SETATTR = _selinux.RAWIP_SOCKET__SETATTR ++RAWIP_SOCKET__LOCK = _selinux.RAWIP_SOCKET__LOCK ++RAWIP_SOCKET__RELABELFROM = _selinux.RAWIP_SOCKET__RELABELFROM ++RAWIP_SOCKET__RELABELTO = _selinux.RAWIP_SOCKET__RELABELTO ++RAWIP_SOCKET__APPEND = _selinux.RAWIP_SOCKET__APPEND ++RAWIP_SOCKET__BIND = _selinux.RAWIP_SOCKET__BIND ++RAWIP_SOCKET__CONNECT = _selinux.RAWIP_SOCKET__CONNECT ++RAWIP_SOCKET__LISTEN = _selinux.RAWIP_SOCKET__LISTEN ++RAWIP_SOCKET__ACCEPT = _selinux.RAWIP_SOCKET__ACCEPT ++RAWIP_SOCKET__GETOPT = _selinux.RAWIP_SOCKET__GETOPT ++RAWIP_SOCKET__SETOPT = _selinux.RAWIP_SOCKET__SETOPT ++RAWIP_SOCKET__SHUTDOWN = _selinux.RAWIP_SOCKET__SHUTDOWN ++RAWIP_SOCKET__RECVFROM = _selinux.RAWIP_SOCKET__RECVFROM ++RAWIP_SOCKET__SENDTO = _selinux.RAWIP_SOCKET__SENDTO ++RAWIP_SOCKET__RECV_MSG = _selinux.RAWIP_SOCKET__RECV_MSG ++RAWIP_SOCKET__SEND_MSG = _selinux.RAWIP_SOCKET__SEND_MSG ++RAWIP_SOCKET__NAME_BIND = _selinux.RAWIP_SOCKET__NAME_BIND ++RAWIP_SOCKET__NODE_BIND = _selinux.RAWIP_SOCKET__NODE_BIND ++NODE__TCP_RECV = _selinux.NODE__TCP_RECV ++NODE__TCP_SEND = _selinux.NODE__TCP_SEND ++NODE__UDP_RECV = _selinux.NODE__UDP_RECV ++NODE__UDP_SEND = _selinux.NODE__UDP_SEND ++NODE__RAWIP_RECV = _selinux.NODE__RAWIP_RECV ++NODE__RAWIP_SEND = _selinux.NODE__RAWIP_SEND ++NODE__ENFORCE_DEST = _selinux.NODE__ENFORCE_DEST ++NODE__DCCP_RECV = _selinux.NODE__DCCP_RECV ++NODE__DCCP_SEND = _selinux.NODE__DCCP_SEND ++NODE__RECVFROM = _selinux.NODE__RECVFROM ++NODE__SENDTO = _selinux.NODE__SENDTO ++NETIF__TCP_RECV = _selinux.NETIF__TCP_RECV ++NETIF__TCP_SEND = _selinux.NETIF__TCP_SEND ++NETIF__UDP_RECV = _selinux.NETIF__UDP_RECV ++NETIF__UDP_SEND = _selinux.NETIF__UDP_SEND ++NETIF__RAWIP_RECV = _selinux.NETIF__RAWIP_RECV ++NETIF__RAWIP_SEND = _selinux.NETIF__RAWIP_SEND ++NETIF__DCCP_RECV = _selinux.NETIF__DCCP_RECV ++NETIF__DCCP_SEND = _selinux.NETIF__DCCP_SEND ++NETIF__INGRESS = _selinux.NETIF__INGRESS ++NETIF__EGRESS = _selinux.NETIF__EGRESS ++NETLINK_SOCKET__IOCTL = _selinux.NETLINK_SOCKET__IOCTL ++NETLINK_SOCKET__READ = _selinux.NETLINK_SOCKET__READ ++NETLINK_SOCKET__WRITE = _selinux.NETLINK_SOCKET__WRITE ++NETLINK_SOCKET__CREATE = _selinux.NETLINK_SOCKET__CREATE ++NETLINK_SOCKET__GETATTR = _selinux.NETLINK_SOCKET__GETATTR ++NETLINK_SOCKET__SETATTR = _selinux.NETLINK_SOCKET__SETATTR ++NETLINK_SOCKET__LOCK = _selinux.NETLINK_SOCKET__LOCK ++NETLINK_SOCKET__RELABELFROM = _selinux.NETLINK_SOCKET__RELABELFROM ++NETLINK_SOCKET__RELABELTO = _selinux.NETLINK_SOCKET__RELABELTO ++NETLINK_SOCKET__APPEND = _selinux.NETLINK_SOCKET__APPEND ++NETLINK_SOCKET__BIND = _selinux.NETLINK_SOCKET__BIND ++NETLINK_SOCKET__CONNECT = _selinux.NETLINK_SOCKET__CONNECT ++NETLINK_SOCKET__LISTEN = _selinux.NETLINK_SOCKET__LISTEN ++NETLINK_SOCKET__ACCEPT = _selinux.NETLINK_SOCKET__ACCEPT ++NETLINK_SOCKET__GETOPT = _selinux.NETLINK_SOCKET__GETOPT ++NETLINK_SOCKET__SETOPT = _selinux.NETLINK_SOCKET__SETOPT ++NETLINK_SOCKET__SHUTDOWN = _selinux.NETLINK_SOCKET__SHUTDOWN ++NETLINK_SOCKET__RECVFROM = _selinux.NETLINK_SOCKET__RECVFROM ++NETLINK_SOCKET__SENDTO = _selinux.NETLINK_SOCKET__SENDTO ++NETLINK_SOCKET__RECV_MSG = _selinux.NETLINK_SOCKET__RECV_MSG ++NETLINK_SOCKET__SEND_MSG = _selinux.NETLINK_SOCKET__SEND_MSG ++NETLINK_SOCKET__NAME_BIND = _selinux.NETLINK_SOCKET__NAME_BIND ++PACKET_SOCKET__IOCTL = _selinux.PACKET_SOCKET__IOCTL ++PACKET_SOCKET__READ = _selinux.PACKET_SOCKET__READ ++PACKET_SOCKET__WRITE = _selinux.PACKET_SOCKET__WRITE ++PACKET_SOCKET__CREATE = _selinux.PACKET_SOCKET__CREATE ++PACKET_SOCKET__GETATTR = _selinux.PACKET_SOCKET__GETATTR ++PACKET_SOCKET__SETATTR = _selinux.PACKET_SOCKET__SETATTR ++PACKET_SOCKET__LOCK = _selinux.PACKET_SOCKET__LOCK ++PACKET_SOCKET__RELABELFROM = _selinux.PACKET_SOCKET__RELABELFROM ++PACKET_SOCKET__RELABELTO = _selinux.PACKET_SOCKET__RELABELTO ++PACKET_SOCKET__APPEND = _selinux.PACKET_SOCKET__APPEND ++PACKET_SOCKET__BIND = _selinux.PACKET_SOCKET__BIND ++PACKET_SOCKET__CONNECT = _selinux.PACKET_SOCKET__CONNECT ++PACKET_SOCKET__LISTEN = _selinux.PACKET_SOCKET__LISTEN ++PACKET_SOCKET__ACCEPT = _selinux.PACKET_SOCKET__ACCEPT ++PACKET_SOCKET__GETOPT = _selinux.PACKET_SOCKET__GETOPT ++PACKET_SOCKET__SETOPT = _selinux.PACKET_SOCKET__SETOPT ++PACKET_SOCKET__SHUTDOWN = _selinux.PACKET_SOCKET__SHUTDOWN ++PACKET_SOCKET__RECVFROM = _selinux.PACKET_SOCKET__RECVFROM ++PACKET_SOCKET__SENDTO = _selinux.PACKET_SOCKET__SENDTO ++PACKET_SOCKET__RECV_MSG = _selinux.PACKET_SOCKET__RECV_MSG ++PACKET_SOCKET__SEND_MSG = _selinux.PACKET_SOCKET__SEND_MSG ++PACKET_SOCKET__NAME_BIND = _selinux.PACKET_SOCKET__NAME_BIND ++KEY_SOCKET__IOCTL = _selinux.KEY_SOCKET__IOCTL ++KEY_SOCKET__READ = _selinux.KEY_SOCKET__READ ++KEY_SOCKET__WRITE = _selinux.KEY_SOCKET__WRITE ++KEY_SOCKET__CREATE = _selinux.KEY_SOCKET__CREATE ++KEY_SOCKET__GETATTR = _selinux.KEY_SOCKET__GETATTR ++KEY_SOCKET__SETATTR = _selinux.KEY_SOCKET__SETATTR ++KEY_SOCKET__LOCK = _selinux.KEY_SOCKET__LOCK ++KEY_SOCKET__RELABELFROM = _selinux.KEY_SOCKET__RELABELFROM ++KEY_SOCKET__RELABELTO = _selinux.KEY_SOCKET__RELABELTO ++KEY_SOCKET__APPEND = _selinux.KEY_SOCKET__APPEND ++KEY_SOCKET__BIND = _selinux.KEY_SOCKET__BIND ++KEY_SOCKET__CONNECT = _selinux.KEY_SOCKET__CONNECT ++KEY_SOCKET__LISTEN = _selinux.KEY_SOCKET__LISTEN ++KEY_SOCKET__ACCEPT = _selinux.KEY_SOCKET__ACCEPT ++KEY_SOCKET__GETOPT = _selinux.KEY_SOCKET__GETOPT ++KEY_SOCKET__SETOPT = _selinux.KEY_SOCKET__SETOPT ++KEY_SOCKET__SHUTDOWN = _selinux.KEY_SOCKET__SHUTDOWN ++KEY_SOCKET__RECVFROM = _selinux.KEY_SOCKET__RECVFROM ++KEY_SOCKET__SENDTO = _selinux.KEY_SOCKET__SENDTO ++KEY_SOCKET__RECV_MSG = _selinux.KEY_SOCKET__RECV_MSG ++KEY_SOCKET__SEND_MSG = _selinux.KEY_SOCKET__SEND_MSG ++KEY_SOCKET__NAME_BIND = _selinux.KEY_SOCKET__NAME_BIND ++UNIX_STREAM_SOCKET__IOCTL = _selinux.UNIX_STREAM_SOCKET__IOCTL ++UNIX_STREAM_SOCKET__READ = _selinux.UNIX_STREAM_SOCKET__READ ++UNIX_STREAM_SOCKET__WRITE = _selinux.UNIX_STREAM_SOCKET__WRITE ++UNIX_STREAM_SOCKET__CREATE = _selinux.UNIX_STREAM_SOCKET__CREATE ++UNIX_STREAM_SOCKET__GETATTR = _selinux.UNIX_STREAM_SOCKET__GETATTR ++UNIX_STREAM_SOCKET__SETATTR = _selinux.UNIX_STREAM_SOCKET__SETATTR ++UNIX_STREAM_SOCKET__LOCK = _selinux.UNIX_STREAM_SOCKET__LOCK ++UNIX_STREAM_SOCKET__RELABELFROM = _selinux.UNIX_STREAM_SOCKET__RELABELFROM ++UNIX_STREAM_SOCKET__RELABELTO = _selinux.UNIX_STREAM_SOCKET__RELABELTO ++UNIX_STREAM_SOCKET__APPEND = _selinux.UNIX_STREAM_SOCKET__APPEND ++UNIX_STREAM_SOCKET__BIND = _selinux.UNIX_STREAM_SOCKET__BIND ++UNIX_STREAM_SOCKET__CONNECT = _selinux.UNIX_STREAM_SOCKET__CONNECT ++UNIX_STREAM_SOCKET__LISTEN = _selinux.UNIX_STREAM_SOCKET__LISTEN ++UNIX_STREAM_SOCKET__ACCEPT = _selinux.UNIX_STREAM_SOCKET__ACCEPT ++UNIX_STREAM_SOCKET__GETOPT = _selinux.UNIX_STREAM_SOCKET__GETOPT ++UNIX_STREAM_SOCKET__SETOPT = _selinux.UNIX_STREAM_SOCKET__SETOPT ++UNIX_STREAM_SOCKET__SHUTDOWN = _selinux.UNIX_STREAM_SOCKET__SHUTDOWN ++UNIX_STREAM_SOCKET__RECVFROM = _selinux.UNIX_STREAM_SOCKET__RECVFROM ++UNIX_STREAM_SOCKET__SENDTO = _selinux.UNIX_STREAM_SOCKET__SENDTO ++UNIX_STREAM_SOCKET__RECV_MSG = _selinux.UNIX_STREAM_SOCKET__RECV_MSG ++UNIX_STREAM_SOCKET__SEND_MSG = _selinux.UNIX_STREAM_SOCKET__SEND_MSG ++UNIX_STREAM_SOCKET__NAME_BIND = _selinux.UNIX_STREAM_SOCKET__NAME_BIND ++UNIX_STREAM_SOCKET__CONNECTTO = _selinux.UNIX_STREAM_SOCKET__CONNECTTO ++UNIX_STREAM_SOCKET__NEWCONN = _selinux.UNIX_STREAM_SOCKET__NEWCONN ++UNIX_STREAM_SOCKET__ACCEPTFROM = _selinux.UNIX_STREAM_SOCKET__ACCEPTFROM ++UNIX_DGRAM_SOCKET__IOCTL = _selinux.UNIX_DGRAM_SOCKET__IOCTL ++UNIX_DGRAM_SOCKET__READ = _selinux.UNIX_DGRAM_SOCKET__READ ++UNIX_DGRAM_SOCKET__WRITE = _selinux.UNIX_DGRAM_SOCKET__WRITE ++UNIX_DGRAM_SOCKET__CREATE = _selinux.UNIX_DGRAM_SOCKET__CREATE ++UNIX_DGRAM_SOCKET__GETATTR = _selinux.UNIX_DGRAM_SOCKET__GETATTR ++UNIX_DGRAM_SOCKET__SETATTR = _selinux.UNIX_DGRAM_SOCKET__SETATTR ++UNIX_DGRAM_SOCKET__LOCK = _selinux.UNIX_DGRAM_SOCKET__LOCK ++UNIX_DGRAM_SOCKET__RELABELFROM = _selinux.UNIX_DGRAM_SOCKET__RELABELFROM ++UNIX_DGRAM_SOCKET__RELABELTO = _selinux.UNIX_DGRAM_SOCKET__RELABELTO ++UNIX_DGRAM_SOCKET__APPEND = _selinux.UNIX_DGRAM_SOCKET__APPEND ++UNIX_DGRAM_SOCKET__BIND = _selinux.UNIX_DGRAM_SOCKET__BIND ++UNIX_DGRAM_SOCKET__CONNECT = _selinux.UNIX_DGRAM_SOCKET__CONNECT ++UNIX_DGRAM_SOCKET__LISTEN = _selinux.UNIX_DGRAM_SOCKET__LISTEN ++UNIX_DGRAM_SOCKET__ACCEPT = _selinux.UNIX_DGRAM_SOCKET__ACCEPT ++UNIX_DGRAM_SOCKET__GETOPT = _selinux.UNIX_DGRAM_SOCKET__GETOPT ++UNIX_DGRAM_SOCKET__SETOPT = _selinux.UNIX_DGRAM_SOCKET__SETOPT ++UNIX_DGRAM_SOCKET__SHUTDOWN = _selinux.UNIX_DGRAM_SOCKET__SHUTDOWN ++UNIX_DGRAM_SOCKET__RECVFROM = _selinux.UNIX_DGRAM_SOCKET__RECVFROM ++UNIX_DGRAM_SOCKET__SENDTO = _selinux.UNIX_DGRAM_SOCKET__SENDTO ++UNIX_DGRAM_SOCKET__RECV_MSG = _selinux.UNIX_DGRAM_SOCKET__RECV_MSG ++UNIX_DGRAM_SOCKET__SEND_MSG = _selinux.UNIX_DGRAM_SOCKET__SEND_MSG ++UNIX_DGRAM_SOCKET__NAME_BIND = _selinux.UNIX_DGRAM_SOCKET__NAME_BIND ++PROCESS__FORK = _selinux.PROCESS__FORK ++PROCESS__TRANSITION = _selinux.PROCESS__TRANSITION ++PROCESS__SIGCHLD = _selinux.PROCESS__SIGCHLD ++PROCESS__SIGKILL = _selinux.PROCESS__SIGKILL ++PROCESS__SIGSTOP = _selinux.PROCESS__SIGSTOP ++PROCESS__SIGNULL = _selinux.PROCESS__SIGNULL ++PROCESS__SIGNAL = _selinux.PROCESS__SIGNAL ++PROCESS__PTRACE = _selinux.PROCESS__PTRACE ++PROCESS__GETSCHED = _selinux.PROCESS__GETSCHED ++PROCESS__SETSCHED = _selinux.PROCESS__SETSCHED ++PROCESS__GETSESSION = _selinux.PROCESS__GETSESSION ++PROCESS__GETPGID = _selinux.PROCESS__GETPGID ++PROCESS__SETPGID = _selinux.PROCESS__SETPGID ++PROCESS__GETCAP = _selinux.PROCESS__GETCAP ++PROCESS__SETCAP = _selinux.PROCESS__SETCAP ++PROCESS__SHARE = _selinux.PROCESS__SHARE ++PROCESS__GETATTR = _selinux.PROCESS__GETATTR ++PROCESS__SETEXEC = _selinux.PROCESS__SETEXEC ++PROCESS__SETFSCREATE = _selinux.PROCESS__SETFSCREATE ++PROCESS__NOATSECURE = _selinux.PROCESS__NOATSECURE ++PROCESS__SIGINH = _selinux.PROCESS__SIGINH ++PROCESS__SETRLIMIT = _selinux.PROCESS__SETRLIMIT ++PROCESS__RLIMITINH = _selinux.PROCESS__RLIMITINH ++PROCESS__DYNTRANSITION = _selinux.PROCESS__DYNTRANSITION ++PROCESS__SETCURRENT = _selinux.PROCESS__SETCURRENT ++PROCESS__EXECMEM = _selinux.PROCESS__EXECMEM ++PROCESS__EXECSTACK = _selinux.PROCESS__EXECSTACK ++PROCESS__EXECHEAP = _selinux.PROCESS__EXECHEAP ++PROCESS__SETKEYCREATE = _selinux.PROCESS__SETKEYCREATE ++PROCESS__SETSOCKCREATE = _selinux.PROCESS__SETSOCKCREATE ++IPC__CREATE = _selinux.IPC__CREATE ++IPC__DESTROY = _selinux.IPC__DESTROY ++IPC__GETATTR = _selinux.IPC__GETATTR ++IPC__SETATTR = _selinux.IPC__SETATTR ++IPC__READ = _selinux.IPC__READ ++IPC__WRITE = _selinux.IPC__WRITE ++IPC__ASSOCIATE = _selinux.IPC__ASSOCIATE ++IPC__UNIX_READ = _selinux.IPC__UNIX_READ ++IPC__UNIX_WRITE = _selinux.IPC__UNIX_WRITE ++SEM__CREATE = _selinux.SEM__CREATE ++SEM__DESTROY = _selinux.SEM__DESTROY ++SEM__GETATTR = _selinux.SEM__GETATTR ++SEM__SETATTR = _selinux.SEM__SETATTR ++SEM__READ = _selinux.SEM__READ ++SEM__WRITE = _selinux.SEM__WRITE ++SEM__ASSOCIATE = _selinux.SEM__ASSOCIATE ++SEM__UNIX_READ = _selinux.SEM__UNIX_READ ++SEM__UNIX_WRITE = _selinux.SEM__UNIX_WRITE ++MSGQ__CREATE = _selinux.MSGQ__CREATE ++MSGQ__DESTROY = _selinux.MSGQ__DESTROY ++MSGQ__GETATTR = _selinux.MSGQ__GETATTR ++MSGQ__SETATTR = _selinux.MSGQ__SETATTR ++MSGQ__READ = _selinux.MSGQ__READ ++MSGQ__WRITE = _selinux.MSGQ__WRITE ++MSGQ__ASSOCIATE = _selinux.MSGQ__ASSOCIATE ++MSGQ__UNIX_READ = _selinux.MSGQ__UNIX_READ ++MSGQ__UNIX_WRITE = _selinux.MSGQ__UNIX_WRITE ++MSGQ__ENQUEUE = _selinux.MSGQ__ENQUEUE ++MSG__SEND = _selinux.MSG__SEND ++MSG__RECEIVE = _selinux.MSG__RECEIVE ++SHM__CREATE = _selinux.SHM__CREATE ++SHM__DESTROY = _selinux.SHM__DESTROY ++SHM__GETATTR = _selinux.SHM__GETATTR ++SHM__SETATTR = _selinux.SHM__SETATTR ++SHM__READ = _selinux.SHM__READ ++SHM__WRITE = _selinux.SHM__WRITE ++SHM__ASSOCIATE = _selinux.SHM__ASSOCIATE ++SHM__UNIX_READ = _selinux.SHM__UNIX_READ ++SHM__UNIX_WRITE = _selinux.SHM__UNIX_WRITE ++SHM__LOCK = _selinux.SHM__LOCK ++SECURITY__COMPUTE_AV = _selinux.SECURITY__COMPUTE_AV ++SECURITY__COMPUTE_CREATE = _selinux.SECURITY__COMPUTE_CREATE ++SECURITY__COMPUTE_MEMBER = _selinux.SECURITY__COMPUTE_MEMBER ++SECURITY__CHECK_CONTEXT = _selinux.SECURITY__CHECK_CONTEXT ++SECURITY__LOAD_POLICY = _selinux.SECURITY__LOAD_POLICY ++SECURITY__COMPUTE_RELABEL = _selinux.SECURITY__COMPUTE_RELABEL ++SECURITY__COMPUTE_USER = _selinux.SECURITY__COMPUTE_USER ++SECURITY__SETENFORCE = _selinux.SECURITY__SETENFORCE ++SECURITY__SETBOOL = _selinux.SECURITY__SETBOOL ++SECURITY__SETSECPARAM = _selinux.SECURITY__SETSECPARAM ++SECURITY__SETCHECKREQPROT = _selinux.SECURITY__SETCHECKREQPROT ++SYSTEM__IPC_INFO = _selinux.SYSTEM__IPC_INFO ++SYSTEM__SYSLOG_READ = _selinux.SYSTEM__SYSLOG_READ ++SYSTEM__SYSLOG_MOD = _selinux.SYSTEM__SYSLOG_MOD ++SYSTEM__SYSLOG_CONSOLE = _selinux.SYSTEM__SYSLOG_CONSOLE ++CAPABILITY__CHOWN = _selinux.CAPABILITY__CHOWN ++CAPABILITY__DAC_OVERRIDE = _selinux.CAPABILITY__DAC_OVERRIDE ++CAPABILITY__DAC_READ_SEARCH = _selinux.CAPABILITY__DAC_READ_SEARCH ++CAPABILITY__FOWNER = _selinux.CAPABILITY__FOWNER ++CAPABILITY__FSETID = _selinux.CAPABILITY__FSETID ++CAPABILITY__KILL = _selinux.CAPABILITY__KILL ++CAPABILITY__SETGID = _selinux.CAPABILITY__SETGID ++CAPABILITY__SETUID = _selinux.CAPABILITY__SETUID ++CAPABILITY__SETPCAP = _selinux.CAPABILITY__SETPCAP ++CAPABILITY__LINUX_IMMUTABLE = _selinux.CAPABILITY__LINUX_IMMUTABLE ++CAPABILITY__NET_BIND_SERVICE = _selinux.CAPABILITY__NET_BIND_SERVICE ++CAPABILITY__NET_BROADCAST = _selinux.CAPABILITY__NET_BROADCAST ++CAPABILITY__NET_ADMIN = _selinux.CAPABILITY__NET_ADMIN ++CAPABILITY__NET_RAW = _selinux.CAPABILITY__NET_RAW ++CAPABILITY__IPC_LOCK = _selinux.CAPABILITY__IPC_LOCK ++CAPABILITY__IPC_OWNER = _selinux.CAPABILITY__IPC_OWNER ++CAPABILITY__SYS_MODULE = _selinux.CAPABILITY__SYS_MODULE ++CAPABILITY__SYS_RAWIO = _selinux.CAPABILITY__SYS_RAWIO ++CAPABILITY__SYS_CHROOT = _selinux.CAPABILITY__SYS_CHROOT ++CAPABILITY__SYS_PTRACE = _selinux.CAPABILITY__SYS_PTRACE ++CAPABILITY__SYS_PACCT = _selinux.CAPABILITY__SYS_PACCT ++CAPABILITY__SYS_ADMIN = _selinux.CAPABILITY__SYS_ADMIN ++CAPABILITY__SYS_BOOT = _selinux.CAPABILITY__SYS_BOOT ++CAPABILITY__SYS_NICE = _selinux.CAPABILITY__SYS_NICE ++CAPABILITY__SYS_RESOURCE = _selinux.CAPABILITY__SYS_RESOURCE ++CAPABILITY__SYS_TIME = _selinux.CAPABILITY__SYS_TIME ++CAPABILITY__SYS_TTY_CONFIG = _selinux.CAPABILITY__SYS_TTY_CONFIG ++CAPABILITY__MKNOD = _selinux.CAPABILITY__MKNOD ++CAPABILITY__LEASE = _selinux.CAPABILITY__LEASE ++CAPABILITY__AUDIT_WRITE = _selinux.CAPABILITY__AUDIT_WRITE ++CAPABILITY__AUDIT_CONTROL = _selinux.CAPABILITY__AUDIT_CONTROL ++CAPABILITY__SETFCAP = _selinux.CAPABILITY__SETFCAP ++CAPABILITY2__MAC_OVERRIDE = _selinux.CAPABILITY2__MAC_OVERRIDE ++CAPABILITY2__MAC_ADMIN = _selinux.CAPABILITY2__MAC_ADMIN ++PASSWD__PASSWD = _selinux.PASSWD__PASSWD ++PASSWD__CHFN = _selinux.PASSWD__CHFN ++PASSWD__CHSH = _selinux.PASSWD__CHSH ++PASSWD__ROOTOK = _selinux.PASSWD__ROOTOK ++PASSWD__CRONTAB = _selinux.PASSWD__CRONTAB ++X_DRAWABLE__CREATE = _selinux.X_DRAWABLE__CREATE ++X_DRAWABLE__DESTROY = _selinux.X_DRAWABLE__DESTROY ++X_DRAWABLE__READ = _selinux.X_DRAWABLE__READ ++X_DRAWABLE__WRITE = _selinux.X_DRAWABLE__WRITE ++X_DRAWABLE__BLEND = _selinux.X_DRAWABLE__BLEND ++X_DRAWABLE__GETATTR = _selinux.X_DRAWABLE__GETATTR ++X_DRAWABLE__SETATTR = _selinux.X_DRAWABLE__SETATTR ++X_DRAWABLE__LIST_CHILD = _selinux.X_DRAWABLE__LIST_CHILD ++X_DRAWABLE__ADD_CHILD = _selinux.X_DRAWABLE__ADD_CHILD ++X_DRAWABLE__REMOVE_CHILD = _selinux.X_DRAWABLE__REMOVE_CHILD ++X_DRAWABLE__LIST_PROPERTY = _selinux.X_DRAWABLE__LIST_PROPERTY ++X_DRAWABLE__GET_PROPERTY = _selinux.X_DRAWABLE__GET_PROPERTY ++X_DRAWABLE__SET_PROPERTY = _selinux.X_DRAWABLE__SET_PROPERTY ++X_DRAWABLE__MANAGE = _selinux.X_DRAWABLE__MANAGE ++X_DRAWABLE__OVERRIDE = _selinux.X_DRAWABLE__OVERRIDE ++X_DRAWABLE__SHOW = _selinux.X_DRAWABLE__SHOW ++X_DRAWABLE__HIDE = _selinux.X_DRAWABLE__HIDE ++X_DRAWABLE__SEND = _selinux.X_DRAWABLE__SEND ++X_DRAWABLE__RECEIVE = _selinux.X_DRAWABLE__RECEIVE ++X_SCREEN__GETATTR = _selinux.X_SCREEN__GETATTR ++X_SCREEN__SETATTR = _selinux.X_SCREEN__SETATTR ++X_SCREEN__HIDE_CURSOR = _selinux.X_SCREEN__HIDE_CURSOR ++X_SCREEN__SHOW_CURSOR = _selinux.X_SCREEN__SHOW_CURSOR ++X_SCREEN__SAVER_GETATTR = _selinux.X_SCREEN__SAVER_GETATTR ++X_SCREEN__SAVER_SETATTR = _selinux.X_SCREEN__SAVER_SETATTR ++X_SCREEN__SAVER_HIDE = _selinux.X_SCREEN__SAVER_HIDE ++X_SCREEN__SAVER_SHOW = _selinux.X_SCREEN__SAVER_SHOW ++X_GC__CREATE = _selinux.X_GC__CREATE ++X_GC__DESTROY = _selinux.X_GC__DESTROY ++X_GC__GETATTR = _selinux.X_GC__GETATTR ++X_GC__SETATTR = _selinux.X_GC__SETATTR ++X_GC__USE = _selinux.X_GC__USE ++X_FONT__CREATE = _selinux.X_FONT__CREATE ++X_FONT__DESTROY = _selinux.X_FONT__DESTROY ++X_FONT__GETATTR = _selinux.X_FONT__GETATTR ++X_FONT__ADD_GLYPH = _selinux.X_FONT__ADD_GLYPH ++X_FONT__REMOVE_GLYPH = _selinux.X_FONT__REMOVE_GLYPH ++X_FONT__USE = _selinux.X_FONT__USE ++X_COLORMAP__CREATE = _selinux.X_COLORMAP__CREATE ++X_COLORMAP__DESTROY = _selinux.X_COLORMAP__DESTROY ++X_COLORMAP__READ = _selinux.X_COLORMAP__READ ++X_COLORMAP__WRITE = _selinux.X_COLORMAP__WRITE ++X_COLORMAP__GETATTR = _selinux.X_COLORMAP__GETATTR ++X_COLORMAP__ADD_COLOR = _selinux.X_COLORMAP__ADD_COLOR ++X_COLORMAP__REMOVE_COLOR = _selinux.X_COLORMAP__REMOVE_COLOR ++X_COLORMAP__INSTALL = _selinux.X_COLORMAP__INSTALL ++X_COLORMAP__UNINSTALL = _selinux.X_COLORMAP__UNINSTALL ++X_COLORMAP__USE = _selinux.X_COLORMAP__USE ++X_PROPERTY__CREATE = _selinux.X_PROPERTY__CREATE ++X_PROPERTY__DESTROY = _selinux.X_PROPERTY__DESTROY ++X_PROPERTY__READ = _selinux.X_PROPERTY__READ ++X_PROPERTY__WRITE = _selinux.X_PROPERTY__WRITE ++X_PROPERTY__APPEND = _selinux.X_PROPERTY__APPEND ++X_PROPERTY__GETATTR = _selinux.X_PROPERTY__GETATTR ++X_PROPERTY__SETATTR = _selinux.X_PROPERTY__SETATTR ++X_SELECTION__READ = _selinux.X_SELECTION__READ ++X_SELECTION__WRITE = _selinux.X_SELECTION__WRITE ++X_SELECTION__GETATTR = _selinux.X_SELECTION__GETATTR ++X_SELECTION__SETATTR = _selinux.X_SELECTION__SETATTR ++X_CURSOR__CREATE = _selinux.X_CURSOR__CREATE ++X_CURSOR__DESTROY = _selinux.X_CURSOR__DESTROY ++X_CURSOR__READ = _selinux.X_CURSOR__READ ++X_CURSOR__WRITE = _selinux.X_CURSOR__WRITE ++X_CURSOR__GETATTR = _selinux.X_CURSOR__GETATTR ++X_CURSOR__SETATTR = _selinux.X_CURSOR__SETATTR ++X_CURSOR__USE = _selinux.X_CURSOR__USE ++X_CLIENT__DESTROY = _selinux.X_CLIENT__DESTROY ++X_CLIENT__GETATTR = _selinux.X_CLIENT__GETATTR ++X_CLIENT__SETATTR = _selinux.X_CLIENT__SETATTR ++X_CLIENT__MANAGE = _selinux.X_CLIENT__MANAGE ++X_DEVICE__GETATTR = _selinux.X_DEVICE__GETATTR ++X_DEVICE__SETATTR = _selinux.X_DEVICE__SETATTR ++X_DEVICE__USE = _selinux.X_DEVICE__USE ++X_DEVICE__READ = _selinux.X_DEVICE__READ ++X_DEVICE__WRITE = _selinux.X_DEVICE__WRITE ++X_DEVICE__GETFOCUS = _selinux.X_DEVICE__GETFOCUS ++X_DEVICE__SETFOCUS = _selinux.X_DEVICE__SETFOCUS ++X_DEVICE__BELL = _selinux.X_DEVICE__BELL ++X_DEVICE__FORCE_CURSOR = _selinux.X_DEVICE__FORCE_CURSOR ++X_DEVICE__FREEZE = _selinux.X_DEVICE__FREEZE ++X_DEVICE__GRAB = _selinux.X_DEVICE__GRAB ++X_DEVICE__MANAGE = _selinux.X_DEVICE__MANAGE ++X_SERVER__GETATTR = _selinux.X_SERVER__GETATTR ++X_SERVER__SETATTR = _selinux.X_SERVER__SETATTR ++X_SERVER__RECORD = _selinux.X_SERVER__RECORD ++X_SERVER__DEBUG = _selinux.X_SERVER__DEBUG ++X_SERVER__GRAB = _selinux.X_SERVER__GRAB ++X_SERVER__MANAGE = _selinux.X_SERVER__MANAGE ++X_EXTENSION__QUERY = _selinux.X_EXTENSION__QUERY ++X_EXTENSION__USE = _selinux.X_EXTENSION__USE ++X_RESOURCE__READ = _selinux.X_RESOURCE__READ ++X_RESOURCE__WRITE = _selinux.X_RESOURCE__WRITE ++X_EVENT__SEND = _selinux.X_EVENT__SEND ++X_EVENT__RECEIVE = _selinux.X_EVENT__RECEIVE ++X_SYNTHETIC_EVENT__SEND = _selinux.X_SYNTHETIC_EVENT__SEND ++X_SYNTHETIC_EVENT__RECEIVE = _selinux.X_SYNTHETIC_EVENT__RECEIVE ++NETLINK_ROUTE_SOCKET__IOCTL = _selinux.NETLINK_ROUTE_SOCKET__IOCTL ++NETLINK_ROUTE_SOCKET__READ = _selinux.NETLINK_ROUTE_SOCKET__READ ++NETLINK_ROUTE_SOCKET__WRITE = _selinux.NETLINK_ROUTE_SOCKET__WRITE ++NETLINK_ROUTE_SOCKET__CREATE = _selinux.NETLINK_ROUTE_SOCKET__CREATE ++NETLINK_ROUTE_SOCKET__GETATTR = _selinux.NETLINK_ROUTE_SOCKET__GETATTR ++NETLINK_ROUTE_SOCKET__SETATTR = _selinux.NETLINK_ROUTE_SOCKET__SETATTR ++NETLINK_ROUTE_SOCKET__LOCK = _selinux.NETLINK_ROUTE_SOCKET__LOCK ++NETLINK_ROUTE_SOCKET__RELABELFROM = _selinux.NETLINK_ROUTE_SOCKET__RELABELFROM ++NETLINK_ROUTE_SOCKET__RELABELTO = _selinux.NETLINK_ROUTE_SOCKET__RELABELTO ++NETLINK_ROUTE_SOCKET__APPEND = _selinux.NETLINK_ROUTE_SOCKET__APPEND ++NETLINK_ROUTE_SOCKET__BIND = _selinux.NETLINK_ROUTE_SOCKET__BIND ++NETLINK_ROUTE_SOCKET__CONNECT = _selinux.NETLINK_ROUTE_SOCKET__CONNECT ++NETLINK_ROUTE_SOCKET__LISTEN = _selinux.NETLINK_ROUTE_SOCKET__LISTEN ++NETLINK_ROUTE_SOCKET__ACCEPT = _selinux.NETLINK_ROUTE_SOCKET__ACCEPT ++NETLINK_ROUTE_SOCKET__GETOPT = _selinux.NETLINK_ROUTE_SOCKET__GETOPT ++NETLINK_ROUTE_SOCKET__SETOPT = _selinux.NETLINK_ROUTE_SOCKET__SETOPT ++NETLINK_ROUTE_SOCKET__SHUTDOWN = _selinux.NETLINK_ROUTE_SOCKET__SHUTDOWN ++NETLINK_ROUTE_SOCKET__RECVFROM = _selinux.NETLINK_ROUTE_SOCKET__RECVFROM ++NETLINK_ROUTE_SOCKET__SENDTO = _selinux.NETLINK_ROUTE_SOCKET__SENDTO ++NETLINK_ROUTE_SOCKET__RECV_MSG = _selinux.NETLINK_ROUTE_SOCKET__RECV_MSG ++NETLINK_ROUTE_SOCKET__SEND_MSG = _selinux.NETLINK_ROUTE_SOCKET__SEND_MSG ++NETLINK_ROUTE_SOCKET__NAME_BIND = _selinux.NETLINK_ROUTE_SOCKET__NAME_BIND ++NETLINK_ROUTE_SOCKET__NLMSG_READ = _selinux.NETLINK_ROUTE_SOCKET__NLMSG_READ ++NETLINK_ROUTE_SOCKET__NLMSG_WRITE = _selinux.NETLINK_ROUTE_SOCKET__NLMSG_WRITE ++NETLINK_FIREWALL_SOCKET__IOCTL = _selinux.NETLINK_FIREWALL_SOCKET__IOCTL ++NETLINK_FIREWALL_SOCKET__READ = _selinux.NETLINK_FIREWALL_SOCKET__READ ++NETLINK_FIREWALL_SOCKET__WRITE = _selinux.NETLINK_FIREWALL_SOCKET__WRITE ++NETLINK_FIREWALL_SOCKET__CREATE = _selinux.NETLINK_FIREWALL_SOCKET__CREATE ++NETLINK_FIREWALL_SOCKET__GETATTR = _selinux.NETLINK_FIREWALL_SOCKET__GETATTR ++NETLINK_FIREWALL_SOCKET__SETATTR = _selinux.NETLINK_FIREWALL_SOCKET__SETATTR ++NETLINK_FIREWALL_SOCKET__LOCK = _selinux.NETLINK_FIREWALL_SOCKET__LOCK ++NETLINK_FIREWALL_SOCKET__RELABELFROM = _selinux.NETLINK_FIREWALL_SOCKET__RELABELFROM ++NETLINK_FIREWALL_SOCKET__RELABELTO = _selinux.NETLINK_FIREWALL_SOCKET__RELABELTO ++NETLINK_FIREWALL_SOCKET__APPEND = _selinux.NETLINK_FIREWALL_SOCKET__APPEND ++NETLINK_FIREWALL_SOCKET__BIND = _selinux.NETLINK_FIREWALL_SOCKET__BIND ++NETLINK_FIREWALL_SOCKET__CONNECT = _selinux.NETLINK_FIREWALL_SOCKET__CONNECT ++NETLINK_FIREWALL_SOCKET__LISTEN = _selinux.NETLINK_FIREWALL_SOCKET__LISTEN ++NETLINK_FIREWALL_SOCKET__ACCEPT = _selinux.NETLINK_FIREWALL_SOCKET__ACCEPT ++NETLINK_FIREWALL_SOCKET__GETOPT = _selinux.NETLINK_FIREWALL_SOCKET__GETOPT ++NETLINK_FIREWALL_SOCKET__SETOPT = _selinux.NETLINK_FIREWALL_SOCKET__SETOPT ++NETLINK_FIREWALL_SOCKET__SHUTDOWN = _selinux.NETLINK_FIREWALL_SOCKET__SHUTDOWN ++NETLINK_FIREWALL_SOCKET__RECVFROM = _selinux.NETLINK_FIREWALL_SOCKET__RECVFROM ++NETLINK_FIREWALL_SOCKET__SENDTO = _selinux.NETLINK_FIREWALL_SOCKET__SENDTO ++NETLINK_FIREWALL_SOCKET__RECV_MSG = _selinux.NETLINK_FIREWALL_SOCKET__RECV_MSG ++NETLINK_FIREWALL_SOCKET__SEND_MSG = _selinux.NETLINK_FIREWALL_SOCKET__SEND_MSG ++NETLINK_FIREWALL_SOCKET__NAME_BIND = _selinux.NETLINK_FIREWALL_SOCKET__NAME_BIND ++NETLINK_FIREWALL_SOCKET__NLMSG_READ = _selinux.NETLINK_FIREWALL_SOCKET__NLMSG_READ ++NETLINK_FIREWALL_SOCKET__NLMSG_WRITE = _selinux.NETLINK_FIREWALL_SOCKET__NLMSG_WRITE ++NETLINK_TCPDIAG_SOCKET__IOCTL = _selinux.NETLINK_TCPDIAG_SOCKET__IOCTL ++NETLINK_TCPDIAG_SOCKET__READ = _selinux.NETLINK_TCPDIAG_SOCKET__READ ++NETLINK_TCPDIAG_SOCKET__WRITE = _selinux.NETLINK_TCPDIAG_SOCKET__WRITE ++NETLINK_TCPDIAG_SOCKET__CREATE = _selinux.NETLINK_TCPDIAG_SOCKET__CREATE ++NETLINK_TCPDIAG_SOCKET__GETATTR = _selinux.NETLINK_TCPDIAG_SOCKET__GETATTR ++NETLINK_TCPDIAG_SOCKET__SETATTR = _selinux.NETLINK_TCPDIAG_SOCKET__SETATTR ++NETLINK_TCPDIAG_SOCKET__LOCK = _selinux.NETLINK_TCPDIAG_SOCKET__LOCK ++NETLINK_TCPDIAG_SOCKET__RELABELFROM = _selinux.NETLINK_TCPDIAG_SOCKET__RELABELFROM ++NETLINK_TCPDIAG_SOCKET__RELABELTO = _selinux.NETLINK_TCPDIAG_SOCKET__RELABELTO ++NETLINK_TCPDIAG_SOCKET__APPEND = _selinux.NETLINK_TCPDIAG_SOCKET__APPEND ++NETLINK_TCPDIAG_SOCKET__BIND = _selinux.NETLINK_TCPDIAG_SOCKET__BIND ++NETLINK_TCPDIAG_SOCKET__CONNECT = _selinux.NETLINK_TCPDIAG_SOCKET__CONNECT ++NETLINK_TCPDIAG_SOCKET__LISTEN = _selinux.NETLINK_TCPDIAG_SOCKET__LISTEN ++NETLINK_TCPDIAG_SOCKET__ACCEPT = _selinux.NETLINK_TCPDIAG_SOCKET__ACCEPT ++NETLINK_TCPDIAG_SOCKET__GETOPT = _selinux.NETLINK_TCPDIAG_SOCKET__GETOPT ++NETLINK_TCPDIAG_SOCKET__SETOPT = _selinux.NETLINK_TCPDIAG_SOCKET__SETOPT ++NETLINK_TCPDIAG_SOCKET__SHUTDOWN = _selinux.NETLINK_TCPDIAG_SOCKET__SHUTDOWN ++NETLINK_TCPDIAG_SOCKET__RECVFROM = _selinux.NETLINK_TCPDIAG_SOCKET__RECVFROM ++NETLINK_TCPDIAG_SOCKET__SENDTO = _selinux.NETLINK_TCPDIAG_SOCKET__SENDTO ++NETLINK_TCPDIAG_SOCKET__RECV_MSG = _selinux.NETLINK_TCPDIAG_SOCKET__RECV_MSG ++NETLINK_TCPDIAG_SOCKET__SEND_MSG = _selinux.NETLINK_TCPDIAG_SOCKET__SEND_MSG ++NETLINK_TCPDIAG_SOCKET__NAME_BIND = _selinux.NETLINK_TCPDIAG_SOCKET__NAME_BIND ++NETLINK_TCPDIAG_SOCKET__NLMSG_READ = _selinux.NETLINK_TCPDIAG_SOCKET__NLMSG_READ ++NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE = _selinux.NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE ++NETLINK_NFLOG_SOCKET__IOCTL = _selinux.NETLINK_NFLOG_SOCKET__IOCTL ++NETLINK_NFLOG_SOCKET__READ = _selinux.NETLINK_NFLOG_SOCKET__READ ++NETLINK_NFLOG_SOCKET__WRITE = _selinux.NETLINK_NFLOG_SOCKET__WRITE ++NETLINK_NFLOG_SOCKET__CREATE = _selinux.NETLINK_NFLOG_SOCKET__CREATE ++NETLINK_NFLOG_SOCKET__GETATTR = _selinux.NETLINK_NFLOG_SOCKET__GETATTR ++NETLINK_NFLOG_SOCKET__SETATTR = _selinux.NETLINK_NFLOG_SOCKET__SETATTR ++NETLINK_NFLOG_SOCKET__LOCK = _selinux.NETLINK_NFLOG_SOCKET__LOCK ++NETLINK_NFLOG_SOCKET__RELABELFROM = _selinux.NETLINK_NFLOG_SOCKET__RELABELFROM ++NETLINK_NFLOG_SOCKET__RELABELTO = _selinux.NETLINK_NFLOG_SOCKET__RELABELTO ++NETLINK_NFLOG_SOCKET__APPEND = _selinux.NETLINK_NFLOG_SOCKET__APPEND ++NETLINK_NFLOG_SOCKET__BIND = _selinux.NETLINK_NFLOG_SOCKET__BIND ++NETLINK_NFLOG_SOCKET__CONNECT = _selinux.NETLINK_NFLOG_SOCKET__CONNECT ++NETLINK_NFLOG_SOCKET__LISTEN = _selinux.NETLINK_NFLOG_SOCKET__LISTEN ++NETLINK_NFLOG_SOCKET__ACCEPT = _selinux.NETLINK_NFLOG_SOCKET__ACCEPT ++NETLINK_NFLOG_SOCKET__GETOPT = _selinux.NETLINK_NFLOG_SOCKET__GETOPT ++NETLINK_NFLOG_SOCKET__SETOPT = _selinux.NETLINK_NFLOG_SOCKET__SETOPT ++NETLINK_NFLOG_SOCKET__SHUTDOWN = _selinux.NETLINK_NFLOG_SOCKET__SHUTDOWN ++NETLINK_NFLOG_SOCKET__RECVFROM = _selinux.NETLINK_NFLOG_SOCKET__RECVFROM ++NETLINK_NFLOG_SOCKET__SENDTO = _selinux.NETLINK_NFLOG_SOCKET__SENDTO ++NETLINK_NFLOG_SOCKET__RECV_MSG = _selinux.NETLINK_NFLOG_SOCKET__RECV_MSG ++NETLINK_NFLOG_SOCKET__SEND_MSG = _selinux.NETLINK_NFLOG_SOCKET__SEND_MSG ++NETLINK_NFLOG_SOCKET__NAME_BIND = _selinux.NETLINK_NFLOG_SOCKET__NAME_BIND ++NETLINK_XFRM_SOCKET__IOCTL = _selinux.NETLINK_XFRM_SOCKET__IOCTL ++NETLINK_XFRM_SOCKET__READ = _selinux.NETLINK_XFRM_SOCKET__READ ++NETLINK_XFRM_SOCKET__WRITE = _selinux.NETLINK_XFRM_SOCKET__WRITE ++NETLINK_XFRM_SOCKET__CREATE = _selinux.NETLINK_XFRM_SOCKET__CREATE ++NETLINK_XFRM_SOCKET__GETATTR = _selinux.NETLINK_XFRM_SOCKET__GETATTR ++NETLINK_XFRM_SOCKET__SETATTR = _selinux.NETLINK_XFRM_SOCKET__SETATTR ++NETLINK_XFRM_SOCKET__LOCK = _selinux.NETLINK_XFRM_SOCKET__LOCK ++NETLINK_XFRM_SOCKET__RELABELFROM = _selinux.NETLINK_XFRM_SOCKET__RELABELFROM ++NETLINK_XFRM_SOCKET__RELABELTO = _selinux.NETLINK_XFRM_SOCKET__RELABELTO ++NETLINK_XFRM_SOCKET__APPEND = _selinux.NETLINK_XFRM_SOCKET__APPEND ++NETLINK_XFRM_SOCKET__BIND = _selinux.NETLINK_XFRM_SOCKET__BIND ++NETLINK_XFRM_SOCKET__CONNECT = _selinux.NETLINK_XFRM_SOCKET__CONNECT ++NETLINK_XFRM_SOCKET__LISTEN = _selinux.NETLINK_XFRM_SOCKET__LISTEN ++NETLINK_XFRM_SOCKET__ACCEPT = _selinux.NETLINK_XFRM_SOCKET__ACCEPT ++NETLINK_XFRM_SOCKET__GETOPT = _selinux.NETLINK_XFRM_SOCKET__GETOPT ++NETLINK_XFRM_SOCKET__SETOPT = _selinux.NETLINK_XFRM_SOCKET__SETOPT ++NETLINK_XFRM_SOCKET__SHUTDOWN = _selinux.NETLINK_XFRM_SOCKET__SHUTDOWN ++NETLINK_XFRM_SOCKET__RECVFROM = _selinux.NETLINK_XFRM_SOCKET__RECVFROM ++NETLINK_XFRM_SOCKET__SENDTO = _selinux.NETLINK_XFRM_SOCKET__SENDTO ++NETLINK_XFRM_SOCKET__RECV_MSG = _selinux.NETLINK_XFRM_SOCKET__RECV_MSG ++NETLINK_XFRM_SOCKET__SEND_MSG = _selinux.NETLINK_XFRM_SOCKET__SEND_MSG ++NETLINK_XFRM_SOCKET__NAME_BIND = _selinux.NETLINK_XFRM_SOCKET__NAME_BIND ++NETLINK_XFRM_SOCKET__NLMSG_READ = _selinux.NETLINK_XFRM_SOCKET__NLMSG_READ ++NETLINK_XFRM_SOCKET__NLMSG_WRITE = _selinux.NETLINK_XFRM_SOCKET__NLMSG_WRITE ++NETLINK_SELINUX_SOCKET__IOCTL = _selinux.NETLINK_SELINUX_SOCKET__IOCTL ++NETLINK_SELINUX_SOCKET__READ = _selinux.NETLINK_SELINUX_SOCKET__READ ++NETLINK_SELINUX_SOCKET__WRITE = _selinux.NETLINK_SELINUX_SOCKET__WRITE ++NETLINK_SELINUX_SOCKET__CREATE = _selinux.NETLINK_SELINUX_SOCKET__CREATE ++NETLINK_SELINUX_SOCKET__GETATTR = _selinux.NETLINK_SELINUX_SOCKET__GETATTR ++NETLINK_SELINUX_SOCKET__SETATTR = _selinux.NETLINK_SELINUX_SOCKET__SETATTR ++NETLINK_SELINUX_SOCKET__LOCK = _selinux.NETLINK_SELINUX_SOCKET__LOCK ++NETLINK_SELINUX_SOCKET__RELABELFROM = _selinux.NETLINK_SELINUX_SOCKET__RELABELFROM ++NETLINK_SELINUX_SOCKET__RELABELTO = _selinux.NETLINK_SELINUX_SOCKET__RELABELTO ++NETLINK_SELINUX_SOCKET__APPEND = _selinux.NETLINK_SELINUX_SOCKET__APPEND ++NETLINK_SELINUX_SOCKET__BIND = _selinux.NETLINK_SELINUX_SOCKET__BIND ++NETLINK_SELINUX_SOCKET__CONNECT = _selinux.NETLINK_SELINUX_SOCKET__CONNECT ++NETLINK_SELINUX_SOCKET__LISTEN = _selinux.NETLINK_SELINUX_SOCKET__LISTEN ++NETLINK_SELINUX_SOCKET__ACCEPT = _selinux.NETLINK_SELINUX_SOCKET__ACCEPT ++NETLINK_SELINUX_SOCKET__GETOPT = _selinux.NETLINK_SELINUX_SOCKET__GETOPT ++NETLINK_SELINUX_SOCKET__SETOPT = _selinux.NETLINK_SELINUX_SOCKET__SETOPT ++NETLINK_SELINUX_SOCKET__SHUTDOWN = _selinux.NETLINK_SELINUX_SOCKET__SHUTDOWN ++NETLINK_SELINUX_SOCKET__RECVFROM = _selinux.NETLINK_SELINUX_SOCKET__RECVFROM ++NETLINK_SELINUX_SOCKET__SENDTO = _selinux.NETLINK_SELINUX_SOCKET__SENDTO ++NETLINK_SELINUX_SOCKET__RECV_MSG = _selinux.NETLINK_SELINUX_SOCKET__RECV_MSG ++NETLINK_SELINUX_SOCKET__SEND_MSG = _selinux.NETLINK_SELINUX_SOCKET__SEND_MSG ++NETLINK_SELINUX_SOCKET__NAME_BIND = _selinux.NETLINK_SELINUX_SOCKET__NAME_BIND ++NETLINK_AUDIT_SOCKET__IOCTL = _selinux.NETLINK_AUDIT_SOCKET__IOCTL ++NETLINK_AUDIT_SOCKET__READ = _selinux.NETLINK_AUDIT_SOCKET__READ ++NETLINK_AUDIT_SOCKET__WRITE = _selinux.NETLINK_AUDIT_SOCKET__WRITE ++NETLINK_AUDIT_SOCKET__CREATE = _selinux.NETLINK_AUDIT_SOCKET__CREATE ++NETLINK_AUDIT_SOCKET__GETATTR = _selinux.NETLINK_AUDIT_SOCKET__GETATTR ++NETLINK_AUDIT_SOCKET__SETATTR = _selinux.NETLINK_AUDIT_SOCKET__SETATTR ++NETLINK_AUDIT_SOCKET__LOCK = _selinux.NETLINK_AUDIT_SOCKET__LOCK ++NETLINK_AUDIT_SOCKET__RELABELFROM = _selinux.NETLINK_AUDIT_SOCKET__RELABELFROM ++NETLINK_AUDIT_SOCKET__RELABELTO = _selinux.NETLINK_AUDIT_SOCKET__RELABELTO ++NETLINK_AUDIT_SOCKET__APPEND = _selinux.NETLINK_AUDIT_SOCKET__APPEND ++NETLINK_AUDIT_SOCKET__BIND = _selinux.NETLINK_AUDIT_SOCKET__BIND ++NETLINK_AUDIT_SOCKET__CONNECT = _selinux.NETLINK_AUDIT_SOCKET__CONNECT ++NETLINK_AUDIT_SOCKET__LISTEN = _selinux.NETLINK_AUDIT_SOCKET__LISTEN ++NETLINK_AUDIT_SOCKET__ACCEPT = _selinux.NETLINK_AUDIT_SOCKET__ACCEPT ++NETLINK_AUDIT_SOCKET__GETOPT = _selinux.NETLINK_AUDIT_SOCKET__GETOPT ++NETLINK_AUDIT_SOCKET__SETOPT = _selinux.NETLINK_AUDIT_SOCKET__SETOPT ++NETLINK_AUDIT_SOCKET__SHUTDOWN = _selinux.NETLINK_AUDIT_SOCKET__SHUTDOWN ++NETLINK_AUDIT_SOCKET__RECVFROM = _selinux.NETLINK_AUDIT_SOCKET__RECVFROM ++NETLINK_AUDIT_SOCKET__SENDTO = _selinux.NETLINK_AUDIT_SOCKET__SENDTO ++NETLINK_AUDIT_SOCKET__RECV_MSG = _selinux.NETLINK_AUDIT_SOCKET__RECV_MSG ++NETLINK_AUDIT_SOCKET__SEND_MSG = _selinux.NETLINK_AUDIT_SOCKET__SEND_MSG ++NETLINK_AUDIT_SOCKET__NAME_BIND = _selinux.NETLINK_AUDIT_SOCKET__NAME_BIND ++NETLINK_AUDIT_SOCKET__NLMSG_READ = _selinux.NETLINK_AUDIT_SOCKET__NLMSG_READ ++NETLINK_AUDIT_SOCKET__NLMSG_WRITE = _selinux.NETLINK_AUDIT_SOCKET__NLMSG_WRITE ++NETLINK_AUDIT_SOCKET__NLMSG_RELAY = _selinux.NETLINK_AUDIT_SOCKET__NLMSG_RELAY ++NETLINK_AUDIT_SOCKET__NLMSG_READPRIV = _selinux.NETLINK_AUDIT_SOCKET__NLMSG_READPRIV ++NETLINK_AUDIT_SOCKET__NLMSG_TTY_AUDIT = _selinux.NETLINK_AUDIT_SOCKET__NLMSG_TTY_AUDIT ++NETLINK_IP6FW_SOCKET__IOCTL = _selinux.NETLINK_IP6FW_SOCKET__IOCTL ++NETLINK_IP6FW_SOCKET__READ = _selinux.NETLINK_IP6FW_SOCKET__READ ++NETLINK_IP6FW_SOCKET__WRITE = _selinux.NETLINK_IP6FW_SOCKET__WRITE ++NETLINK_IP6FW_SOCKET__CREATE = _selinux.NETLINK_IP6FW_SOCKET__CREATE ++NETLINK_IP6FW_SOCKET__GETATTR = _selinux.NETLINK_IP6FW_SOCKET__GETATTR ++NETLINK_IP6FW_SOCKET__SETATTR = _selinux.NETLINK_IP6FW_SOCKET__SETATTR ++NETLINK_IP6FW_SOCKET__LOCK = _selinux.NETLINK_IP6FW_SOCKET__LOCK ++NETLINK_IP6FW_SOCKET__RELABELFROM = _selinux.NETLINK_IP6FW_SOCKET__RELABELFROM ++NETLINK_IP6FW_SOCKET__RELABELTO = _selinux.NETLINK_IP6FW_SOCKET__RELABELTO ++NETLINK_IP6FW_SOCKET__APPEND = _selinux.NETLINK_IP6FW_SOCKET__APPEND ++NETLINK_IP6FW_SOCKET__BIND = _selinux.NETLINK_IP6FW_SOCKET__BIND ++NETLINK_IP6FW_SOCKET__CONNECT = _selinux.NETLINK_IP6FW_SOCKET__CONNECT ++NETLINK_IP6FW_SOCKET__LISTEN = _selinux.NETLINK_IP6FW_SOCKET__LISTEN ++NETLINK_IP6FW_SOCKET__ACCEPT = _selinux.NETLINK_IP6FW_SOCKET__ACCEPT ++NETLINK_IP6FW_SOCKET__GETOPT = _selinux.NETLINK_IP6FW_SOCKET__GETOPT ++NETLINK_IP6FW_SOCKET__SETOPT = _selinux.NETLINK_IP6FW_SOCKET__SETOPT ++NETLINK_IP6FW_SOCKET__SHUTDOWN = _selinux.NETLINK_IP6FW_SOCKET__SHUTDOWN ++NETLINK_IP6FW_SOCKET__RECVFROM = _selinux.NETLINK_IP6FW_SOCKET__RECVFROM ++NETLINK_IP6FW_SOCKET__SENDTO = _selinux.NETLINK_IP6FW_SOCKET__SENDTO ++NETLINK_IP6FW_SOCKET__RECV_MSG = _selinux.NETLINK_IP6FW_SOCKET__RECV_MSG ++NETLINK_IP6FW_SOCKET__SEND_MSG = _selinux.NETLINK_IP6FW_SOCKET__SEND_MSG ++NETLINK_IP6FW_SOCKET__NAME_BIND = _selinux.NETLINK_IP6FW_SOCKET__NAME_BIND ++NETLINK_IP6FW_SOCKET__NLMSG_READ = _selinux.NETLINK_IP6FW_SOCKET__NLMSG_READ ++NETLINK_IP6FW_SOCKET__NLMSG_WRITE = _selinux.NETLINK_IP6FW_SOCKET__NLMSG_WRITE ++NETLINK_DNRT_SOCKET__IOCTL = _selinux.NETLINK_DNRT_SOCKET__IOCTL ++NETLINK_DNRT_SOCKET__READ = _selinux.NETLINK_DNRT_SOCKET__READ ++NETLINK_DNRT_SOCKET__WRITE = _selinux.NETLINK_DNRT_SOCKET__WRITE ++NETLINK_DNRT_SOCKET__CREATE = _selinux.NETLINK_DNRT_SOCKET__CREATE ++NETLINK_DNRT_SOCKET__GETATTR = _selinux.NETLINK_DNRT_SOCKET__GETATTR ++NETLINK_DNRT_SOCKET__SETATTR = _selinux.NETLINK_DNRT_SOCKET__SETATTR ++NETLINK_DNRT_SOCKET__LOCK = _selinux.NETLINK_DNRT_SOCKET__LOCK ++NETLINK_DNRT_SOCKET__RELABELFROM = _selinux.NETLINK_DNRT_SOCKET__RELABELFROM ++NETLINK_DNRT_SOCKET__RELABELTO = _selinux.NETLINK_DNRT_SOCKET__RELABELTO ++NETLINK_DNRT_SOCKET__APPEND = _selinux.NETLINK_DNRT_SOCKET__APPEND ++NETLINK_DNRT_SOCKET__BIND = _selinux.NETLINK_DNRT_SOCKET__BIND ++NETLINK_DNRT_SOCKET__CONNECT = _selinux.NETLINK_DNRT_SOCKET__CONNECT ++NETLINK_DNRT_SOCKET__LISTEN = _selinux.NETLINK_DNRT_SOCKET__LISTEN ++NETLINK_DNRT_SOCKET__ACCEPT = _selinux.NETLINK_DNRT_SOCKET__ACCEPT ++NETLINK_DNRT_SOCKET__GETOPT = _selinux.NETLINK_DNRT_SOCKET__GETOPT ++NETLINK_DNRT_SOCKET__SETOPT = _selinux.NETLINK_DNRT_SOCKET__SETOPT ++NETLINK_DNRT_SOCKET__SHUTDOWN = _selinux.NETLINK_DNRT_SOCKET__SHUTDOWN ++NETLINK_DNRT_SOCKET__RECVFROM = _selinux.NETLINK_DNRT_SOCKET__RECVFROM ++NETLINK_DNRT_SOCKET__SENDTO = _selinux.NETLINK_DNRT_SOCKET__SENDTO ++NETLINK_DNRT_SOCKET__RECV_MSG = _selinux.NETLINK_DNRT_SOCKET__RECV_MSG ++NETLINK_DNRT_SOCKET__SEND_MSG = _selinux.NETLINK_DNRT_SOCKET__SEND_MSG ++NETLINK_DNRT_SOCKET__NAME_BIND = _selinux.NETLINK_DNRT_SOCKET__NAME_BIND ++DBUS__ACQUIRE_SVC = _selinux.DBUS__ACQUIRE_SVC ++DBUS__SEND_MSG = _selinux.DBUS__SEND_MSG ++NSCD__GETPWD = _selinux.NSCD__GETPWD ++NSCD__GETGRP = _selinux.NSCD__GETGRP ++NSCD__GETHOST = _selinux.NSCD__GETHOST ++NSCD__GETSTAT = _selinux.NSCD__GETSTAT ++NSCD__ADMIN = _selinux.NSCD__ADMIN ++NSCD__SHMEMPWD = _selinux.NSCD__SHMEMPWD ++NSCD__SHMEMGRP = _selinux.NSCD__SHMEMGRP ++NSCD__SHMEMHOST = _selinux.NSCD__SHMEMHOST ++NSCD__GETSERV = _selinux.NSCD__GETSERV ++NSCD__SHMEMSERV = _selinux.NSCD__SHMEMSERV ++ASSOCIATION__SENDTO = _selinux.ASSOCIATION__SENDTO ++ASSOCIATION__RECVFROM = _selinux.ASSOCIATION__RECVFROM ++ASSOCIATION__SETCONTEXT = _selinux.ASSOCIATION__SETCONTEXT ++ASSOCIATION__POLMATCH = _selinux.ASSOCIATION__POLMATCH ++NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL ++NETLINK_KOBJECT_UEVENT_SOCKET__READ = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__READ ++NETLINK_KOBJECT_UEVENT_SOCKET__WRITE = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__WRITE ++NETLINK_KOBJECT_UEVENT_SOCKET__CREATE = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__CREATE ++NETLINK_KOBJECT_UEVENT_SOCKET__GETATTR = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__GETATTR ++NETLINK_KOBJECT_UEVENT_SOCKET__SETATTR = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__SETATTR ++NETLINK_KOBJECT_UEVENT_SOCKET__LOCK = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__LOCK ++NETLINK_KOBJECT_UEVENT_SOCKET__RELABELFROM = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__RELABELFROM ++NETLINK_KOBJECT_UEVENT_SOCKET__RELABELTO = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__RELABELTO ++NETLINK_KOBJECT_UEVENT_SOCKET__APPEND = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__APPEND ++NETLINK_KOBJECT_UEVENT_SOCKET__BIND = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__BIND ++NETLINK_KOBJECT_UEVENT_SOCKET__CONNECT = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__CONNECT ++NETLINK_KOBJECT_UEVENT_SOCKET__LISTEN = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__LISTEN ++NETLINK_KOBJECT_UEVENT_SOCKET__ACCEPT = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__ACCEPT ++NETLINK_KOBJECT_UEVENT_SOCKET__GETOPT = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__GETOPT ++NETLINK_KOBJECT_UEVENT_SOCKET__SETOPT = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__SETOPT ++NETLINK_KOBJECT_UEVENT_SOCKET__SHUTDOWN = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__SHUTDOWN ++NETLINK_KOBJECT_UEVENT_SOCKET__RECVFROM = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__RECVFROM ++NETLINK_KOBJECT_UEVENT_SOCKET__SENDTO = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__SENDTO ++NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG ++NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG ++NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND = _selinux.NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND ++APPLETALK_SOCKET__IOCTL = _selinux.APPLETALK_SOCKET__IOCTL ++APPLETALK_SOCKET__READ = _selinux.APPLETALK_SOCKET__READ ++APPLETALK_SOCKET__WRITE = _selinux.APPLETALK_SOCKET__WRITE ++APPLETALK_SOCKET__CREATE = _selinux.APPLETALK_SOCKET__CREATE ++APPLETALK_SOCKET__GETATTR = _selinux.APPLETALK_SOCKET__GETATTR ++APPLETALK_SOCKET__SETATTR = _selinux.APPLETALK_SOCKET__SETATTR ++APPLETALK_SOCKET__LOCK = _selinux.APPLETALK_SOCKET__LOCK ++APPLETALK_SOCKET__RELABELFROM = _selinux.APPLETALK_SOCKET__RELABELFROM ++APPLETALK_SOCKET__RELABELTO = _selinux.APPLETALK_SOCKET__RELABELTO ++APPLETALK_SOCKET__APPEND = _selinux.APPLETALK_SOCKET__APPEND ++APPLETALK_SOCKET__BIND = _selinux.APPLETALK_SOCKET__BIND ++APPLETALK_SOCKET__CONNECT = _selinux.APPLETALK_SOCKET__CONNECT ++APPLETALK_SOCKET__LISTEN = _selinux.APPLETALK_SOCKET__LISTEN ++APPLETALK_SOCKET__ACCEPT = _selinux.APPLETALK_SOCKET__ACCEPT ++APPLETALK_SOCKET__GETOPT = _selinux.APPLETALK_SOCKET__GETOPT ++APPLETALK_SOCKET__SETOPT = _selinux.APPLETALK_SOCKET__SETOPT ++APPLETALK_SOCKET__SHUTDOWN = _selinux.APPLETALK_SOCKET__SHUTDOWN ++APPLETALK_SOCKET__RECVFROM = _selinux.APPLETALK_SOCKET__RECVFROM ++APPLETALK_SOCKET__SENDTO = _selinux.APPLETALK_SOCKET__SENDTO ++APPLETALK_SOCKET__RECV_MSG = _selinux.APPLETALK_SOCKET__RECV_MSG ++APPLETALK_SOCKET__SEND_MSG = _selinux.APPLETALK_SOCKET__SEND_MSG ++APPLETALK_SOCKET__NAME_BIND = _selinux.APPLETALK_SOCKET__NAME_BIND ++PACKET__SEND = _selinux.PACKET__SEND ++PACKET__RECV = _selinux.PACKET__RECV ++PACKET__RELABELTO = _selinux.PACKET__RELABELTO ++PACKET__FLOW_IN = _selinux.PACKET__FLOW_IN ++PACKET__FLOW_OUT = _selinux.PACKET__FLOW_OUT ++PACKET__FORWARD_IN = _selinux.PACKET__FORWARD_IN ++PACKET__FORWARD_OUT = _selinux.PACKET__FORWARD_OUT ++KEY__VIEW = _selinux.KEY__VIEW ++KEY__READ = _selinux.KEY__READ ++KEY__WRITE = _selinux.KEY__WRITE ++KEY__SEARCH = _selinux.KEY__SEARCH ++KEY__LINK = _selinux.KEY__LINK ++KEY__SETATTR = _selinux.KEY__SETATTR ++KEY__CREATE = _selinux.KEY__CREATE ++CONTEXT__TRANSLATE = _selinux.CONTEXT__TRANSLATE ++CONTEXT__CONTAINS = _selinux.CONTEXT__CONTAINS ++DCCP_SOCKET__IOCTL = _selinux.DCCP_SOCKET__IOCTL ++DCCP_SOCKET__READ = _selinux.DCCP_SOCKET__READ ++DCCP_SOCKET__WRITE = _selinux.DCCP_SOCKET__WRITE ++DCCP_SOCKET__CREATE = _selinux.DCCP_SOCKET__CREATE ++DCCP_SOCKET__GETATTR = _selinux.DCCP_SOCKET__GETATTR ++DCCP_SOCKET__SETATTR = _selinux.DCCP_SOCKET__SETATTR ++DCCP_SOCKET__LOCK = _selinux.DCCP_SOCKET__LOCK ++DCCP_SOCKET__RELABELFROM = _selinux.DCCP_SOCKET__RELABELFROM ++DCCP_SOCKET__RELABELTO = _selinux.DCCP_SOCKET__RELABELTO ++DCCP_SOCKET__APPEND = _selinux.DCCP_SOCKET__APPEND ++DCCP_SOCKET__BIND = _selinux.DCCP_SOCKET__BIND ++DCCP_SOCKET__CONNECT = _selinux.DCCP_SOCKET__CONNECT ++DCCP_SOCKET__LISTEN = _selinux.DCCP_SOCKET__LISTEN ++DCCP_SOCKET__ACCEPT = _selinux.DCCP_SOCKET__ACCEPT ++DCCP_SOCKET__GETOPT = _selinux.DCCP_SOCKET__GETOPT ++DCCP_SOCKET__SETOPT = _selinux.DCCP_SOCKET__SETOPT ++DCCP_SOCKET__SHUTDOWN = _selinux.DCCP_SOCKET__SHUTDOWN ++DCCP_SOCKET__RECVFROM = _selinux.DCCP_SOCKET__RECVFROM ++DCCP_SOCKET__SENDTO = _selinux.DCCP_SOCKET__SENDTO ++DCCP_SOCKET__RECV_MSG = _selinux.DCCP_SOCKET__RECV_MSG ++DCCP_SOCKET__SEND_MSG = _selinux.DCCP_SOCKET__SEND_MSG ++DCCP_SOCKET__NAME_BIND = _selinux.DCCP_SOCKET__NAME_BIND ++DCCP_SOCKET__NODE_BIND = _selinux.DCCP_SOCKET__NODE_BIND ++DCCP_SOCKET__NAME_CONNECT = _selinux.DCCP_SOCKET__NAME_CONNECT ++MEMPROTECT__MMAP_ZERO = _selinux.MEMPROTECT__MMAP_ZERO ++DB_DATABASE__CREATE = _selinux.DB_DATABASE__CREATE ++DB_DATABASE__DROP = _selinux.DB_DATABASE__DROP ++DB_DATABASE__GETATTR = _selinux.DB_DATABASE__GETATTR ++DB_DATABASE__SETATTR = _selinux.DB_DATABASE__SETATTR ++DB_DATABASE__RELABELFROM = _selinux.DB_DATABASE__RELABELFROM ++DB_DATABASE__RELABELTO = _selinux.DB_DATABASE__RELABELTO ++DB_DATABASE__ACCESS = _selinux.DB_DATABASE__ACCESS ++DB_DATABASE__INSTALL_MODULE = _selinux.DB_DATABASE__INSTALL_MODULE ++DB_DATABASE__LOAD_MODULE = _selinux.DB_DATABASE__LOAD_MODULE ++DB_DATABASE__GET_PARAM = _selinux.DB_DATABASE__GET_PARAM ++DB_DATABASE__SET_PARAM = _selinux.DB_DATABASE__SET_PARAM ++DB_TABLE__CREATE = _selinux.DB_TABLE__CREATE ++DB_TABLE__DROP = _selinux.DB_TABLE__DROP ++DB_TABLE__GETATTR = _selinux.DB_TABLE__GETATTR ++DB_TABLE__SETATTR = _selinux.DB_TABLE__SETATTR ++DB_TABLE__RELABELFROM = _selinux.DB_TABLE__RELABELFROM ++DB_TABLE__RELABELTO = _selinux.DB_TABLE__RELABELTO ++DB_TABLE__USE = _selinux.DB_TABLE__USE ++DB_TABLE__SELECT = _selinux.DB_TABLE__SELECT ++DB_TABLE__UPDATE = _selinux.DB_TABLE__UPDATE ++DB_TABLE__INSERT = _selinux.DB_TABLE__INSERT ++DB_TABLE__DELETE = _selinux.DB_TABLE__DELETE ++DB_TABLE__LOCK = _selinux.DB_TABLE__LOCK ++DB_PROCEDURE__CREATE = _selinux.DB_PROCEDURE__CREATE ++DB_PROCEDURE__DROP = _selinux.DB_PROCEDURE__DROP ++DB_PROCEDURE__GETATTR = _selinux.DB_PROCEDURE__GETATTR ++DB_PROCEDURE__SETATTR = _selinux.DB_PROCEDURE__SETATTR ++DB_PROCEDURE__RELABELFROM = _selinux.DB_PROCEDURE__RELABELFROM ++DB_PROCEDURE__RELABELTO = _selinux.DB_PROCEDURE__RELABELTO ++DB_PROCEDURE__EXECUTE = _selinux.DB_PROCEDURE__EXECUTE ++DB_PROCEDURE__ENTRYPOINT = _selinux.DB_PROCEDURE__ENTRYPOINT ++DB_COLUMN__CREATE = _selinux.DB_COLUMN__CREATE ++DB_COLUMN__DROP = _selinux.DB_COLUMN__DROP ++DB_COLUMN__GETATTR = _selinux.DB_COLUMN__GETATTR ++DB_COLUMN__SETATTR = _selinux.DB_COLUMN__SETATTR ++DB_COLUMN__RELABELFROM = _selinux.DB_COLUMN__RELABELFROM ++DB_COLUMN__RELABELTO = _selinux.DB_COLUMN__RELABELTO ++DB_COLUMN__USE = _selinux.DB_COLUMN__USE ++DB_COLUMN__SELECT = _selinux.DB_COLUMN__SELECT ++DB_COLUMN__UPDATE = _selinux.DB_COLUMN__UPDATE ++DB_COLUMN__INSERT = _selinux.DB_COLUMN__INSERT ++DB_TUPLE__RELABELFROM = _selinux.DB_TUPLE__RELABELFROM ++DB_TUPLE__RELABELTO = _selinux.DB_TUPLE__RELABELTO ++DB_TUPLE__USE = _selinux.DB_TUPLE__USE ++DB_TUPLE__SELECT = _selinux.DB_TUPLE__SELECT ++DB_TUPLE__UPDATE = _selinux.DB_TUPLE__UPDATE ++DB_TUPLE__INSERT = _selinux.DB_TUPLE__INSERT ++DB_TUPLE__DELETE = _selinux.DB_TUPLE__DELETE ++DB_BLOB__CREATE = _selinux.DB_BLOB__CREATE ++DB_BLOB__DROP = _selinux.DB_BLOB__DROP ++DB_BLOB__GETATTR = _selinux.DB_BLOB__GETATTR ++DB_BLOB__SETATTR = _selinux.DB_BLOB__SETATTR ++DB_BLOB__RELABELFROM = _selinux.DB_BLOB__RELABELFROM ++DB_BLOB__RELABELTO = _selinux.DB_BLOB__RELABELTO ++DB_BLOB__READ = _selinux.DB_BLOB__READ ++DB_BLOB__WRITE = _selinux.DB_BLOB__WRITE ++DB_BLOB__IMPORT = _selinux.DB_BLOB__IMPORT ++DB_BLOB__EXPORT = _selinux.DB_BLOB__EXPORT ++PEER__RECV = _selinux.PEER__RECV ++X_APPLICATION_DATA__PASTE = _selinux.X_APPLICATION_DATA__PASTE ++X_APPLICATION_DATA__PASTE_AFTER_CONFIRM = _selinux.X_APPLICATION_DATA__PASTE_AFTER_CONFIRM ++X_APPLICATION_DATA__COPY = _selinux.X_APPLICATION_DATA__COPY ++class context_s_t(_object): ++ __swig_setmethods__ = {} ++ __setattr__ = lambda self, name, value: _swig_setattr(self, context_s_t, name, value) ++ __swig_getmethods__ = {} ++ __getattr__ = lambda self, name: _swig_getattr(self, context_s_t, name) ++ __repr__ = _swig_repr ++ __swig_setmethods__["ptr"] = _selinux.context_s_t_ptr_set ++ __swig_getmethods__["ptr"] = _selinux.context_s_t_ptr_get ++ if _newclass:ptr = _swig_property(_selinux.context_s_t_ptr_get, _selinux.context_s_t_ptr_set) ++ def __init__(self): ++ this = _selinux.new_context_s_t() ++ try: self.this.append(this) ++ except: self.this = this ++ __swig_destroy__ = _selinux.delete_context_s_t ++ __del__ = lambda self : None; ++context_s_t_swigregister = _selinux.context_s_t_swigregister ++context_s_t_swigregister(context_s_t) ++ ++ ++def context_new(*args): ++ return _selinux.context_new(*args) ++context_new = _selinux.context_new ++ ++def context_str(*args): ++ return _selinux.context_str(*args) ++context_str = _selinux.context_str ++ ++def context_free(*args): ++ return _selinux.context_free(*args) ++context_free = _selinux.context_free ++ ++def context_type_get(*args): ++ return _selinux.context_type_get(*args) ++context_type_get = _selinux.context_type_get ++ ++def context_range_get(*args): ++ return _selinux.context_range_get(*args) ++context_range_get = _selinux.context_range_get ++ ++def context_role_get(*args): ++ return _selinux.context_role_get(*args) ++context_role_get = _selinux.context_role_get ++ ++def context_user_get(*args): ++ return _selinux.context_user_get(*args) ++context_user_get = _selinux.context_user_get ++ ++def context_type_set(*args): ++ return _selinux.context_type_set(*args) ++context_type_set = _selinux.context_type_set ++ ++def context_range_set(*args): ++ return _selinux.context_range_set(*args) ++context_range_set = _selinux.context_range_set ++ ++def context_role_set(*args): ++ return _selinux.context_role_set(*args) ++context_role_set = _selinux.context_role_set ++ ++def context_user_set(*args): ++ return _selinux.context_user_set(*args) ++context_user_set = _selinux.context_user_set ++SECCLASS_SECURITY = _selinux.SECCLASS_SECURITY ++SECCLASS_PROCESS = _selinux.SECCLASS_PROCESS ++SECCLASS_SYSTEM = _selinux.SECCLASS_SYSTEM ++SECCLASS_CAPABILITY = _selinux.SECCLASS_CAPABILITY ++SECCLASS_FILESYSTEM = _selinux.SECCLASS_FILESYSTEM ++SECCLASS_FILE = _selinux.SECCLASS_FILE ++SECCLASS_DIR = _selinux.SECCLASS_DIR ++SECCLASS_FD = _selinux.SECCLASS_FD ++SECCLASS_LNK_FILE = _selinux.SECCLASS_LNK_FILE ++SECCLASS_CHR_FILE = _selinux.SECCLASS_CHR_FILE ++SECCLASS_BLK_FILE = _selinux.SECCLASS_BLK_FILE ++SECCLASS_SOCK_FILE = _selinux.SECCLASS_SOCK_FILE ++SECCLASS_FIFO_FILE = _selinux.SECCLASS_FIFO_FILE ++SECCLASS_SOCKET = _selinux.SECCLASS_SOCKET ++SECCLASS_TCP_SOCKET = _selinux.SECCLASS_TCP_SOCKET ++SECCLASS_UDP_SOCKET = _selinux.SECCLASS_UDP_SOCKET ++SECCLASS_RAWIP_SOCKET = _selinux.SECCLASS_RAWIP_SOCKET ++SECCLASS_NODE = _selinux.SECCLASS_NODE ++SECCLASS_NETIF = _selinux.SECCLASS_NETIF ++SECCLASS_NETLINK_SOCKET = _selinux.SECCLASS_NETLINK_SOCKET ++SECCLASS_PACKET_SOCKET = _selinux.SECCLASS_PACKET_SOCKET ++SECCLASS_KEY_SOCKET = _selinux.SECCLASS_KEY_SOCKET ++SECCLASS_UNIX_STREAM_SOCKET = _selinux.SECCLASS_UNIX_STREAM_SOCKET ++SECCLASS_UNIX_DGRAM_SOCKET = _selinux.SECCLASS_UNIX_DGRAM_SOCKET ++SECCLASS_SEM = _selinux.SECCLASS_SEM ++SECCLASS_MSG = _selinux.SECCLASS_MSG ++SECCLASS_MSGQ = _selinux.SECCLASS_MSGQ ++SECCLASS_SHM = _selinux.SECCLASS_SHM ++SECCLASS_IPC = _selinux.SECCLASS_IPC ++SECCLASS_PASSWD = _selinux.SECCLASS_PASSWD ++SECCLASS_X_DRAWABLE = _selinux.SECCLASS_X_DRAWABLE ++SECCLASS_X_SCREEN = _selinux.SECCLASS_X_SCREEN ++SECCLASS_X_GC = _selinux.SECCLASS_X_GC ++SECCLASS_X_FONT = _selinux.SECCLASS_X_FONT ++SECCLASS_X_COLORMAP = _selinux.SECCLASS_X_COLORMAP ++SECCLASS_X_PROPERTY = _selinux.SECCLASS_X_PROPERTY ++SECCLASS_X_SELECTION = _selinux.SECCLASS_X_SELECTION ++SECCLASS_X_CURSOR = _selinux.SECCLASS_X_CURSOR ++SECCLASS_X_CLIENT = _selinux.SECCLASS_X_CLIENT ++SECCLASS_X_DEVICE = _selinux.SECCLASS_X_DEVICE ++SECCLASS_X_SERVER = _selinux.SECCLASS_X_SERVER ++SECCLASS_X_EXTENSION = _selinux.SECCLASS_X_EXTENSION ++SECCLASS_NETLINK_ROUTE_SOCKET = _selinux.SECCLASS_NETLINK_ROUTE_SOCKET ++SECCLASS_NETLINK_FIREWALL_SOCKET = _selinux.SECCLASS_NETLINK_FIREWALL_SOCKET ++SECCLASS_NETLINK_TCPDIAG_SOCKET = _selinux.SECCLASS_NETLINK_TCPDIAG_SOCKET ++SECCLASS_NETLINK_NFLOG_SOCKET = _selinux.SECCLASS_NETLINK_NFLOG_SOCKET ++SECCLASS_NETLINK_XFRM_SOCKET = _selinux.SECCLASS_NETLINK_XFRM_SOCKET ++SECCLASS_NETLINK_SELINUX_SOCKET = _selinux.SECCLASS_NETLINK_SELINUX_SOCKET ++SECCLASS_NETLINK_AUDIT_SOCKET = _selinux.SECCLASS_NETLINK_AUDIT_SOCKET ++SECCLASS_NETLINK_IP6FW_SOCKET = _selinux.SECCLASS_NETLINK_IP6FW_SOCKET ++SECCLASS_NETLINK_DNRT_SOCKET = _selinux.SECCLASS_NETLINK_DNRT_SOCKET ++SECCLASS_DBUS = _selinux.SECCLASS_DBUS ++SECCLASS_NSCD = _selinux.SECCLASS_NSCD ++SECCLASS_ASSOCIATION = _selinux.SECCLASS_ASSOCIATION ++SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET = _selinux.SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET ++SECCLASS_APPLETALK_SOCKET = _selinux.SECCLASS_APPLETALK_SOCKET ++SECCLASS_PACKET = _selinux.SECCLASS_PACKET ++SECCLASS_KEY = _selinux.SECCLASS_KEY ++SECCLASS_CONTEXT = _selinux.SECCLASS_CONTEXT ++SECCLASS_DCCP_SOCKET = _selinux.SECCLASS_DCCP_SOCKET ++SECCLASS_MEMPROTECT = _selinux.SECCLASS_MEMPROTECT ++SECCLASS_DB_DATABASE = _selinux.SECCLASS_DB_DATABASE ++SECCLASS_DB_TABLE = _selinux.SECCLASS_DB_TABLE ++SECCLASS_DB_PROCEDURE = _selinux.SECCLASS_DB_PROCEDURE ++SECCLASS_DB_COLUMN = _selinux.SECCLASS_DB_COLUMN ++SECCLASS_DB_TUPLE = _selinux.SECCLASS_DB_TUPLE ++SECCLASS_DB_BLOB = _selinux.SECCLASS_DB_BLOB ++SECCLASS_PEER = _selinux.SECCLASS_PEER ++SECCLASS_CAPABILITY2 = _selinux.SECCLASS_CAPABILITY2 ++SECCLASS_X_RESOURCE = _selinux.SECCLASS_X_RESOURCE ++SECCLASS_X_EVENT = _selinux.SECCLASS_X_EVENT ++SECCLASS_X_SYNTHETIC_EVENT = _selinux.SECCLASS_X_SYNTHETIC_EVENT ++SECCLASS_X_APPLICATION_DATA = _selinux.SECCLASS_X_APPLICATION_DATA ++SECINITSID_KERNEL = _selinux.SECINITSID_KERNEL ++SECINITSID_SECURITY = _selinux.SECINITSID_SECURITY ++SECINITSID_UNLABELED = _selinux.SECINITSID_UNLABELED ++SECINITSID_FS = _selinux.SECINITSID_FS ++SECINITSID_FILE = _selinux.SECINITSID_FILE ++SECINITSID_FILE_LABELS = _selinux.SECINITSID_FILE_LABELS ++SECINITSID_INIT = _selinux.SECINITSID_INIT ++SECINITSID_ANY_SOCKET = _selinux.SECINITSID_ANY_SOCKET ++SECINITSID_PORT = _selinux.SECINITSID_PORT ++SECINITSID_NETIF = _selinux.SECINITSID_NETIF ++SECINITSID_NETMSG = _selinux.SECINITSID_NETMSG ++SECINITSID_NODE = _selinux.SECINITSID_NODE ++SECINITSID_IGMP_PACKET = _selinux.SECINITSID_IGMP_PACKET ++SECINITSID_ICMP_SOCKET = _selinux.SECINITSID_ICMP_SOCKET ++SECINITSID_TCP_SOCKET = _selinux.SECINITSID_TCP_SOCKET ++SECINITSID_SYSCTL_MODPROBE = _selinux.SECINITSID_SYSCTL_MODPROBE ++SECINITSID_SYSCTL = _selinux.SECINITSID_SYSCTL ++SECINITSID_SYSCTL_FS = _selinux.SECINITSID_SYSCTL_FS ++SECINITSID_SYSCTL_KERNEL = _selinux.SECINITSID_SYSCTL_KERNEL ++SECINITSID_SYSCTL_NET = _selinux.SECINITSID_SYSCTL_NET ++SECINITSID_SYSCTL_NET_UNIX = _selinux.SECINITSID_SYSCTL_NET_UNIX ++SECINITSID_SYSCTL_VM = _selinux.SECINITSID_SYSCTL_VM ++SECINITSID_SYSCTL_DEV = _selinux.SECINITSID_SYSCTL_DEV ++SECINITSID_KMOD = _selinux.SECINITSID_KMOD ++SECINITSID_POLICY = _selinux.SECINITSID_POLICY ++SECINITSID_SCMP_PACKET = _selinux.SECINITSID_SCMP_PACKET ++SECINITSID_DEVNULL = _selinux.SECINITSID_DEVNULL ++SECINITSID_NUM = _selinux.SECINITSID_NUM ++SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER ++ ++def get_ordered_context_list(*args): ++ return _selinux.get_ordered_context_list(*args) ++get_ordered_context_list = _selinux.get_ordered_context_list ++ ++def get_ordered_context_list_with_level(*args): ++ return _selinux.get_ordered_context_list_with_level(*args) ++get_ordered_context_list_with_level = _selinux.get_ordered_context_list_with_level ++ ++def get_default_context(*args): ++ return _selinux.get_default_context(*args) ++get_default_context = _selinux.get_default_context ++ ++def get_default_context_with_level(*args): ++ return _selinux.get_default_context_with_level(*args) ++get_default_context_with_level = _selinux.get_default_context_with_level ++ ++def get_default_context_with_role(*args): ++ return _selinux.get_default_context_with_role(*args) ++get_default_context_with_role = _selinux.get_default_context_with_role ++ ++def get_default_context_with_rolelevel(*args): ++ return _selinux.get_default_context_with_rolelevel(*args) ++get_default_context_with_rolelevel = _selinux.get_default_context_with_rolelevel ++ ++def query_user_context(): ++ return _selinux.query_user_context() ++query_user_context = _selinux.query_user_context ++ ++def manual_user_enter_context(*args): ++ return _selinux.manual_user_enter_context(*args) ++manual_user_enter_context = _selinux.manual_user_enter_context ++ ++def selinux_default_type_path(): ++ return _selinux.selinux_default_type_path() ++selinux_default_type_path = _selinux.selinux_default_type_path ++ ++def get_default_type(*args): ++ return _selinux.get_default_type(*args) ++get_default_type = _selinux.get_default_type ++SELABEL_CTX_FILE = _selinux.SELABEL_CTX_FILE ++SELABEL_CTX_MEDIA = _selinux.SELABEL_CTX_MEDIA ++SELABEL_CTX_X = _selinux.SELABEL_CTX_X ++SELABEL_OPT_UNUSED = _selinux.SELABEL_OPT_UNUSED ++SELABEL_OPT_VALIDATE = _selinux.SELABEL_OPT_VALIDATE ++SELABEL_OPT_BASEONLY = _selinux.SELABEL_OPT_BASEONLY ++SELABEL_OPT_PATH = _selinux.SELABEL_OPT_PATH ++SELABEL_OPT_SUBSET = _selinux.SELABEL_OPT_SUBSET ++SELABEL_NOPT = _selinux.SELABEL_NOPT ++ ++def selabel_open(*args): ++ return _selinux.selabel_open(*args) ++selabel_open = _selinux.selabel_open ++ ++def selabel_close(*args): ++ return _selinux.selabel_close(*args) ++selabel_close = _selinux.selabel_close ++ ++def selabel_lookup(*args): ++ return _selinux.selabel_lookup(*args) ++selabel_lookup = _selinux.selabel_lookup ++ ++def selabel_lookup_raw(*args): ++ return _selinux.selabel_lookup_raw(*args) ++selabel_lookup_raw = _selinux.selabel_lookup_raw ++ ++def selabel_stats(*args): ++ return _selinux.selabel_stats(*args) ++selabel_stats = _selinux.selabel_stats ++SELABEL_X_PROP = _selinux.SELABEL_X_PROP ++SELABEL_X_EXT = _selinux.SELABEL_X_EXT ++SELABEL_X_CLIENT = _selinux.SELABEL_X_CLIENT ++SELABEL_X_EVENT = _selinux.SELABEL_X_EVENT ++SELABEL_X_SELN = _selinux.SELABEL_X_SELN ++SELABEL_X_POLYPROP = _selinux.SELABEL_X_POLYPROP ++SELABEL_X_POLYSELN = _selinux.SELABEL_X_POLYSELN ++ +def is_selinux_enabled(): + return _selinux.is_selinux_enabled() is_selinux_enabled = _selinux.is_selinux_enabled @@ -1431,7 +2763,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 getpeercon_raw = _selinux.getpeercon_raw class av_decision(_object): __swig_setmethods__ = {} -@@ -123,8 +264,8 @@ +@@ -123,8 +1596,8 @@ __swig_setmethods__["seqno"] = _selinux.av_decision_seqno_set __swig_getmethods__["seqno"] = _selinux.av_decision_seqno_get if _newclass:seqno = _swig_property(_selinux.av_decision_seqno_get, _selinux.av_decision_seqno_set) @@ -1442,7 +2774,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 try: self.this.append(this) except: self.this = this __swig_destroy__ = _selinux.delete_av_decision -@@ -144,8 +285,8 @@ +@@ -144,8 +1617,8 @@ __swig_setmethods__["value"] = _selinux.selinux_opt_value_set __swig_getmethods__["value"] = _selinux.selinux_opt_value_get if _newclass:value = _swig_property(_selinux.selinux_opt_value_get, _selinux.selinux_opt_value_set) @@ -1453,7 +2785,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 try: self.this.append(this) except: self.this = this __swig_destroy__ = _selinux.delete_selinux_opt -@@ -153,53 +294,72 @@ +@@ -153,53 +1626,72 @@ selinux_opt_swigregister = _selinux.selinux_opt_swigregister selinux_opt_swigregister(selinux_opt) @@ -1552,7 +2884,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 selinux_init_load_policy = _selinux.selinux_init_load_policy class SELboolean(_object): __swig_setmethods__ = {} -@@ -213,8 +373,8 @@ +@@ -213,8 +1705,8 @@ __swig_setmethods__["value"] = _selinux.SELboolean_value_set __swig_getmethods__["value"] = _selinux.SELboolean_value_get if _newclass:value = _swig_property(_selinux.SELboolean_value_get, _selinux.SELboolean_value_set) @@ -1563,7 +2895,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 try: self.this.append(this) except: self.this = this __swig_destroy__ = _selinux.delete_SELboolean -@@ -222,20 +382,65 @@ +@@ -222,20 +1714,65 @@ SELboolean_swigregister = _selinux.SELboolean_swigregister SELboolean_swigregister(SELboolean) @@ -1629,7 +2961,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 security_commit_booleans = _selinux.security_commit_booleans class security_class_mapping(_object): __swig_setmethods__ = {} -@@ -249,8 +454,8 @@ +@@ -249,8 +1786,8 @@ __swig_setmethods__["perms"] = _selinux.security_class_mapping_perms_set __swig_getmethods__["perms"] = _selinux.security_class_mapping_perms_get if _newclass:perms = _swig_property(_selinux.security_class_mapping_perms_get, _selinux.security_class_mapping_perms_set) @@ -1640,7 +2972,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 try: self.this.append(this) except: self.this = this __swig_destroy__ = _selinux.delete_security_class_mapping -@@ -258,211 +463,270 @@ +@@ -258,272 +1795,212 @@ security_class_mapping_swigregister = _selinux.security_class_mapping_swigregister security_class_mapping_swigregister(security_class_mapping) @@ -1831,34 +3163,12 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 +def selinux_trans_to_raw_context(*args): + return _selinux.selinux_trans_to_raw_context(*args) selinux_trans_to_raw_context = _selinux.selinux_trans_to_raw_context -+ -+def selinux_raw_to_trans_context(*args): -+ return _selinux.selinux_raw_to_trans_context(*args) - selinux_raw_to_trans_context = _selinux.selinux_raw_to_trans_context -+ -+def selinux_raw_context_to_color(*args): -+ return _selinux.selinux_raw_context_to_color(*args) - selinux_raw_context_to_color = _selinux.selinux_raw_context_to_color -+ -+def getseuserbyname(*args): -+ return _selinux.getseuserbyname(*args) - getseuserbyname = _selinux.getseuserbyname -+ -+def getseuser(*args): -+ return _selinux.getseuser(*args) -+getseuser = _selinux.getseuser -+ -+def selinux_file_context_cmp(*args): -+ return _selinux.selinux_file_context_cmp(*args) - selinux_file_context_cmp = _selinux.selinux_file_context_cmp -+ -+def selinux_file_context_verify(*args): -+ return _selinux.selinux_file_context_verify(*args) - selinux_file_context_verify = _selinux.selinux_file_context_verify -+ -+def selinux_lsetfilecon_default(*args): -+ return _selinux.selinux_lsetfilecon_default(*args) - selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default +-selinux_raw_to_trans_context = _selinux.selinux_raw_to_trans_context +-selinux_raw_context_to_color = _selinux.selinux_raw_context_to_color +-getseuserbyname = _selinux.getseuserbyname +-selinux_file_context_cmp = _selinux.selinux_file_context_cmp +-selinux_file_context_verify = _selinux.selinux_file_context_verify +-selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default -class security_id(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, security_id, name, value) @@ -1880,13 +3190,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 -security_id_swigregister = _selinux.security_id_swigregister -security_id_swigregister(security_id) -+def avc_sid_to_context(*args): -+ return _selinux.avc_sid_to_context(*args) - avc_sid_to_context = _selinux.avc_sid_to_context -+ -+def avc_sid_to_context_raw(*args): -+ return _selinux.avc_sid_to_context_raw(*args) - avc_sid_to_context_raw = _selinux.avc_sid_to_context_raw +-avc_sid_to_context = _selinux.avc_sid_to_context +-avc_sid_to_context_raw = _selinux.avc_sid_to_context_raw -avc_context_to_sid = _selinux.avc_context_to_sid -avc_context_to_sid_raw = _selinux.avc_context_to_sid_raw -sidget = _selinux.sidget @@ -1909,6 +3214,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_entry_ref_swigregister = _selinux.avc_entry_ref_swigregister -avc_entry_ref_swigregister(avc_entry_ref) ++def selinux_raw_to_trans_context(*args): ++ return _selinux.selinux_raw_to_trans_context(*args) ++selinux_raw_to_trans_context = _selinux.selinux_raw_to_trans_context -class avc_memory_callback(_object): - __swig_setmethods__ = {} @@ -1930,9 +3238,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_memory_callback_swigregister = _selinux.avc_memory_callback_swigregister -avc_memory_callback_swigregister(avc_memory_callback) -+def avc_context_to_sid(*args): -+ return _selinux.avc_context_to_sid(*args) -+avc_context_to_sid = _selinux.avc_context_to_sid ++def selinux_raw_context_to_color(*args): ++ return _selinux.selinux_raw_context_to_color(*args) ++selinux_raw_context_to_color = _selinux.selinux_raw_context_to_color -class avc_log_callback(_object): - __swig_setmethods__ = {} @@ -1954,9 +3262,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_log_callback_swigregister = _selinux.avc_log_callback_swigregister -avc_log_callback_swigregister(avc_log_callback) -+def avc_context_to_sid_raw(*args): -+ return _selinux.avc_context_to_sid_raw(*args) -+avc_context_to_sid_raw = _selinux.avc_context_to_sid_raw ++def getseuserbyname(*args): ++ return _selinux.getseuserbyname(*args) ++getseuserbyname = _selinux.getseuserbyname -class avc_thread_callback(_object): - __swig_setmethods__ = {} @@ -1978,9 +3286,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_thread_callback_swigregister = _selinux.avc_thread_callback_swigregister -avc_thread_callback_swigregister(avc_thread_callback) -+def sidget(*args): -+ return _selinux.sidget(*args) -+sidget = _selinux.sidget ++def getseuser(*args): ++ return _selinux.getseuser(*args) ++getseuser = _selinux.getseuser -class avc_lock_callback(_object): - __swig_setmethods__ = {} @@ -2008,52 +3316,31 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_lock_callback_swigregister = _selinux.avc_lock_callback_swigregister -avc_lock_callback_swigregister(avc_lock_callback) -+def sidput(*args): -+ return _selinux.sidput(*args) -+sidput = _selinux.sidput ++def selinux_file_context_cmp(*args): ++ return _selinux.selinux_file_context_cmp(*args) ++selinux_file_context_cmp = _selinux.selinux_file_context_cmp -+def avc_get_initial_sid(*args): -+ return _selinux.avc_get_initial_sid(*args) -+avc_get_initial_sid = _selinux.avc_get_initial_sid - AVC_OPT_UNUSED = _selinux.AVC_OPT_UNUSED - AVC_OPT_SETENFORCE = _selinux.AVC_OPT_SETENFORCE -+ -+def avc_init(*args): -+ return _selinux.avc_init(*args) - avc_init = _selinux.avc_init -+ -+def avc_open(*args): -+ return _selinux.avc_open(*args) - avc_open = _selinux.avc_open +-AVC_OPT_UNUSED = _selinux.AVC_OPT_UNUSED +-AVC_OPT_SETENFORCE = _selinux.AVC_OPT_SETENFORCE +-avc_init = _selinux.avc_init +-avc_open = _selinux.avc_open -avc_cleanup = _selinux.avc_cleanup -+ -+def avc_reset(): -+ return _selinux.avc_reset() - avc_reset = _selinux.avc_reset +-avc_reset = _selinux.avc_reset -avc_destroy = _selinux.avc_destroy -+ -+def avc_has_perm_noaudit(*args): -+ return _selinux.avc_has_perm_noaudit(*args) - avc_has_perm_noaudit = _selinux.avc_has_perm_noaudit -+ -+def avc_has_perm(*args): -+ return _selinux.avc_has_perm(*args) - avc_has_perm = _selinux.avc_has_perm +-avc_has_perm_noaudit = _selinux.avc_has_perm_noaudit +-avc_has_perm = _selinux.avc_has_perm -avc_audit = _selinux.avc_audit -+ -+def avc_compute_create(*args): -+ return _selinux.avc_compute_create(*args) - avc_compute_create = _selinux.avc_compute_create -+ -+def avc_compute_member(*args): -+ return _selinux.avc_compute_member(*args) - avc_compute_member = _selinux.avc_compute_member - AVC_CALLBACK_GRANT = _selinux.AVC_CALLBACK_GRANT - AVC_CALLBACK_TRY_REVOKE = _selinux.AVC_CALLBACK_TRY_REVOKE -@@ -473,57 +737,46 @@ - AVC_CALLBACK_AUDITDENY_ENABLE = _selinux.AVC_CALLBACK_AUDITDENY_ENABLE - AVC_CALLBACK_AUDITDENY_DISABLE = _selinux.AVC_CALLBACK_AUDITDENY_DISABLE - AVC_CACHE_STATS = _selinux.AVC_CACHE_STATS +-avc_compute_create = _selinux.avc_compute_create +-avc_compute_member = _selinux.avc_compute_member +-AVC_CALLBACK_GRANT = _selinux.AVC_CALLBACK_GRANT +-AVC_CALLBACK_TRY_REVOKE = _selinux.AVC_CALLBACK_TRY_REVOKE +-AVC_CALLBACK_REVOKE = _selinux.AVC_CALLBACK_REVOKE +-AVC_CALLBACK_RESET = _selinux.AVC_CALLBACK_RESET +-AVC_CALLBACK_AUDITALLOW_ENABLE = _selinux.AVC_CALLBACK_AUDITALLOW_ENABLE +-AVC_CALLBACK_AUDITALLOW_DISABLE = _selinux.AVC_CALLBACK_AUDITALLOW_DISABLE +-AVC_CALLBACK_AUDITDENY_ENABLE = _selinux.AVC_CALLBACK_AUDITDENY_ENABLE +-AVC_CALLBACK_AUDITDENY_DISABLE = _selinux.AVC_CALLBACK_AUDITDENY_DISABLE +-AVC_CACHE_STATS = _selinux.AVC_CACHE_STATS -class avc_cache_stats(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, avc_cache_stats, name, value) @@ -2092,56 +3379,51 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 - __del__ = lambda self : None; -avc_cache_stats_swigregister = _selinux.avc_cache_stats_swigregister -avc_cache_stats_swigregister(avc_cache_stats) ++def selinux_file_context_verify(*args): ++ return _selinux.selinux_file_context_verify(*args) ++selinux_file_context_verify = _selinux.selinux_file_context_verify -avc_av_stats = _selinux.avc_av_stats -avc_sid_stats = _selinux.avc_sid_stats -+def selinux_default_type_path(): -+ return _selinux.selinux_default_type_path() - selinux_default_type_path = _selinux.selinux_default_type_path -+ -+def get_default_type(*args): -+ return _selinux.get_default_type(*args) - get_default_type = _selinux.get_default_type - SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER -+ -+def get_ordered_context_list(*args): -+ return _selinux.get_ordered_context_list(*args) - get_ordered_context_list = _selinux.get_ordered_context_list -+ -+def get_ordered_context_list_with_level(*args): -+ return _selinux.get_ordered_context_list_with_level(*args) - get_ordered_context_list_with_level = _selinux.get_ordered_context_list_with_level -+ -+def get_default_context(*args): -+ return _selinux.get_default_context(*args) - get_default_context = _selinux.get_default_context -+ -+def get_default_context_with_level(*args): -+ return _selinux.get_default_context_with_level(*args) - get_default_context_with_level = _selinux.get_default_context_with_level -+ -+def get_default_context_with_role(*args): -+ return _selinux.get_default_context_with_role(*args) - get_default_context_with_role = _selinux.get_default_context_with_role -+ -+def get_default_context_with_rolelevel(*args): -+ return _selinux.get_default_context_with_rolelevel(*args) - get_default_context_with_rolelevel = _selinux.get_default_context_with_rolelevel -+ -+def query_user_context(): -+ return _selinux.query_user_context() - query_user_context = _selinux.query_user_context -+ -+def manual_user_enter_context(*args): -+ return _selinux.manual_user_enter_context(*args) - manual_user_enter_context = _selinux.manual_user_enter_context +-selinux_default_type_path = _selinux.selinux_default_type_path +-get_default_type = _selinux.get_default_type +-SELINUX_DEFAULTUSER = _selinux.SELINUX_DEFAULTUSER +-get_ordered_context_list = _selinux.get_ordered_context_list +-get_ordered_context_list_with_level = _selinux.get_ordered_context_list_with_level +-get_default_context = _selinux.get_default_context +-get_default_context_with_level = _selinux.get_default_context_with_level +-get_default_context_with_role = _selinux.get_default_context_with_role +-get_default_context_with_rolelevel = _selinux.get_default_context_with_rolelevel +-query_user_context = _selinux.query_user_context +-manual_user_enter_context = _selinux.manual_user_enter_context ++def selinux_lsetfilecon_default(*args): ++ return _selinux.selinux_lsetfilecon_default(*args) ++selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default Binary files nsalibselinux/src/selinux.pyc and libselinux-2.0.79/src/selinux.pyc differ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.79/src/selinuxswig.i --- nsalibselinux/src/selinuxswig.i 2009-03-12 08:48:48.000000000 -0400 -+++ libselinux-2.0.79/src/selinuxswig.i 2009-03-27 11:40:39.000000000 -0400 -@@ -47,8 +47,32 @@ ++++ libselinux-2.0.79/src/selinuxswig.i 2009-03-27 16:31:34.000000000 -0400 +@@ -4,11 +4,14 @@ + + %module selinux + %{ +- #include "selinux/selinux.h" + #include "../include/selinux/avc.h" +- #include "../include/selinux/selinux.h" +- #include "../include/selinux/get_default_type.h" ++ #include "../include/selinux/av_permissions.h" ++ #include "../include/selinux/context.h" ++ #include "../include/selinux/flask.h" + #include "../include/selinux/get_context_list.h" ++ #include "../include/selinux/get_default_type.h" ++ #include "../include/selinux/label.h" ++ #include "../include/selinux/selinux.h" + %} + %apply int *OUTPUT { int *enforce }; + %apply int *OUTPUT { size_t * }; +@@ -47,16 +50,43 @@ %ignore set_matchpathcon_printf; %ignore set_matchpathcon_invalidcon; %ignore set_matchpathcon_canoncon; @@ -2175,6 +3457,20 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- /* Ignore netlink stuff for now */ %ignore avc_netlink_acquire_fd; + %ignore avc_netlink_release_fd; + %ignore avc_netlink_check_nb; + +-%include "../include/selinux/selinux.h" + %include "../include/selinux/avc.h" +-%include "../include/selinux/get_default_type.h" ++%include "../include/selinux/av_permissions.h" ++%include "../include/selinux/context.h" ++%include "../include/selinux/flask.h" + %include "../include/selinux/get_context_list.h" +- ++%include "../include/selinux/get_default_type.h" ++%include "../include/selinux/label.h" ++%include "../include/selinux/selinux.h" diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.79/src/selinuxswig_python.i --- nsalibselinux/src/selinuxswig_python.i 2009-03-06 14:41:45.000000000 -0500 +++ libselinux-2.0.79/src/selinuxswig_python.i 2009-03-27 14:07:34.000000000 -0400 @@ -2207,7 +3503,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libs + diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.79/src/selinuxswig_wrap.c --- nsalibselinux/src/selinuxswig_wrap.c 2009-03-06 14:41:45.000000000 -0500 -+++ libselinux-2.0.79/src/selinuxswig_wrap.c 2009-03-27 14:21:40.000000000 -0400 ++++ libselinux-2.0.79/src/selinuxswig_wrap.c 2009-03-27 16:31:56.000000000 -0400 @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). @@ -3486,7 +4782,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); -@@ -2476,36 +2623,24 @@ +@@ -2476,36 +2623,27 @@ #define SWIGTYPE_p_SELboolean swig_types[0] #define SWIGTYPE_p_av_decision swig_types[1] @@ -3526,22 +4822,25 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel +#define SWIGTYPE_p_avc_memory_callback swig_types[5] +#define SWIGTYPE_p_avc_thread_callback swig_types[6] +#define SWIGTYPE_p_char swig_types[7] -+#define SWIGTYPE_p_ino_t swig_types[8] -+#define SWIGTYPE_p_int swig_types[9] -+#define SWIGTYPE_p_p_char swig_types[10] -+#define SWIGTYPE_p_p_p_char swig_types[11] -+#define SWIGTYPE_p_p_security_id swig_types[12] -+#define SWIGTYPE_p_security_class_mapping swig_types[13] -+#define SWIGTYPE_p_security_id swig_types[14] -+#define SWIGTYPE_p_selinux_opt swig_types[15] -+#define SWIGTYPE_p_unsigned_int swig_types[16] -+#define SWIGTYPE_p_unsigned_short swig_types[17] -+static swig_type_info *swig_types[19]; -+static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0}; ++#define SWIGTYPE_p_context_s_t swig_types[8] ++#define SWIGTYPE_p_ino_t swig_types[9] ++#define SWIGTYPE_p_int swig_types[10] ++#define SWIGTYPE_p_p_char swig_types[11] ++#define SWIGTYPE_p_p_p_char swig_types[12] ++#define SWIGTYPE_p_p_security_id swig_types[13] ++#define SWIGTYPE_p_security_class_mapping swig_types[14] ++#define SWIGTYPE_p_security_id swig_types[15] ++#define SWIGTYPE_p_selabel_handle swig_types[16] ++#define SWIGTYPE_p_selinux_opt swig_types[17] ++#define SWIGTYPE_p_unsigned_int swig_types[18] ++#define SWIGTYPE_p_unsigned_short swig_types[19] ++#define SWIGTYPE_p_void swig_types[20] ++static swig_type_info *swig_types[22]; ++static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) -@@ -2520,11 +2655,16 @@ +@@ -2520,11 +2658,16 @@ /*----------------------------------------------- @(target):= _selinux.so ------------------------------------------------*/ @@ -3560,7 +4859,25 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel #define SWIG_VERSION SWIGVERSION -@@ -2568,10 +2708,20 @@ +@@ -2535,11 +2678,14 @@ + #include "selinux/selinux.h" + + +- #include "selinux/selinux.h" + #include "../include/selinux/avc.h" +- #include "../include/selinux/selinux.h" +- #include "../include/selinux/get_default_type.h" ++ #include "../include/selinux/av_permissions.h" ++ #include "../include/selinux/context.h" ++ #include "../include/selinux/flask.h" + #include "../include/selinux/get_context_list.h" ++ #include "../include/selinux/get_default_type.h" ++ #include "../include/selinux/label.h" ++ #include "../include/selinux/selinux.h" + + + #define SWIG_From_long PyInt_FromLong +@@ -2568,10 +2714,20 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { @@ -3583,7 +4900,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel if (alloc) { /* In python the user should not be able to modify the inner -@@ -2596,7 +2746,7 @@ +@@ -2596,7 +2752,7 @@ *alloc = SWIG_OLDOBJ; } } else { @@ -3592,3344 +4909,6646 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel } } if (psize) *psize = len + 1; -@@ -2849,7 +2999,11 @@ - return pchar_descriptor ? - SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { +@@ -2771,6 +2927,58 @@ + + + SWIGINTERN int ++SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) ++{ ++ unsigned long v; ++ int res = SWIG_AsVal_unsigned_SS_long (obj, &v); ++ if (SWIG_IsOK(res)) { ++ if ((v > USHRT_MAX)) { ++ return SWIG_OverflowError; ++ } else { ++ if (val) *val = (unsigned short)(v); ++ } ++ } ++ return res; ++} ++ ++ ++SWIGINTERNINLINE PyObject* ++SWIG_From_unsigned_SS_long (unsigned long value) ++{ ++ return (value > LONG_MAX) ? ++ PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); ++} ++ ++ ++SWIGINTERNINLINE PyObject * ++SWIG_FromCharPtrAndSize(const char* carray, size_t size) ++{ ++ if (carray) { ++ if (size > INT_MAX) { ++ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); ++ return pchar_descriptor ? ++ SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); ++ } else { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromStringAndSize(carray, (int)(size)); +#else - return PyString_FromStringAndSize(carray, (int)(size)); ++ return PyString_FromStringAndSize(carray, (int)(size)); +#endif - } - } else { - return SWIG_Py_Void(); -@@ -2904,7 +3058,13 @@ ++ } ++ } else { ++ return SWIG_Py_Void(); ++ } ++} ++ ++ ++SWIGINTERNINLINE PyObject * ++SWIG_FromCharPtr(const char *cptr) ++{ ++ return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); ++} ++ ++ ++SWIGINTERN int + SWIG_AsVal_long (PyObject *obj, long* val) + { + if (PyInt_Check(obj)) { +@@ -2825,14 +3033,6 @@ + } + + +-SWIGINTERNINLINE PyObject* +-SWIG_From_unsigned_SS_long (unsigned long value) +-{ +- return (value > LONG_MAX) ? +- PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value)); +-} +- +- + SWIGINTERNINLINE PyObject * + SWIG_From_unsigned_SS_int (unsigned int value) + { +@@ -2840,46 +3040,6 @@ + } + + +-SWIGINTERNINLINE PyObject * +-SWIG_FromCharPtrAndSize(const char* carray, size_t size) +-{ +- if (carray) { +- if (size > INT_MAX) { +- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); +- return pchar_descriptor ? +- SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); +- } else { +- return PyString_FromStringAndSize(carray, (int)(size)); +- } +- } else { +- return SWIG_Py_Void(); +- } +-} +- +- +-SWIGINTERNINLINE PyObject * +-SWIG_FromCharPtr(const char *cptr) +-{ +- return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +-} +- +- +-SWIGINTERN int +-SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val) +-{ +- unsigned long v; +- int res = SWIG_AsVal_unsigned_SS_long (obj, &v); +- if (SWIG_IsOK(res)) { +- if ((v > USHRT_MAX)) { +- return SWIG_OverflowError; +- } else { +- if (val) *val = (unsigned short)(v); +- } +- } +- return res; +-} +- +- + SWIGINTERNINLINE int + SWIG_AsVal_size_t (PyObject * obj, size_t *val) + { +@@ -2899,97 +3059,222 @@ + #ifdef __cplusplus + extern "C" { + #endif +-SWIGINTERN PyObject *_wrap_is_selinux_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_sid_to_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ security_context_t temp2 = 0 ; ++ PyObject * obj0 = 0 ; int result; - if (!PyArg_ParseTuple(args,(char *)":is_selinux_enabled")) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)":is_selinux_enabled")) SWIG_fail; - result = (int)is_selinux_enabled(); -+ { -+ result = (int)is_selinux_enabled(); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_sid_to_context" "', argument " "1"" of type '" "security_id_t""'"); + } ++ arg1 = (security_id_t)(argp1); ++ result = (int)avc_sid_to_context(arg1,arg2); resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } return resultobj; fail: -@@ -2917,7 +3077,13 @@ + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_is_selinux_mls_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_sid_to_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ security_context_t temp2 = 0 ; ++ PyObject * obj0 = 0 ; int result; - if (!PyArg_ParseTuple(args,(char *)":is_selinux_mls_enabled")) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)":is_selinux_mls_enabled")) SWIG_fail; - result = (int)is_selinux_mls_enabled(); -+ { -+ result = (int)is_selinux_mls_enabled(); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_sid_to_context_raw" "', argument " "1"" of type '" "security_id_t""'"); + } ++ arg1 = (security_id_t)(argp1); ++ result = (int)avc_sid_to_context_raw(arg1,arg2); resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } return resultobj; fail: -@@ -2928,12 +3094,18 @@ - SWIGINTERN PyObject *_wrap_getcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_context_to_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_id_t *arg2 = (security_id_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_id_t temp2 ; ++ PyObject * obj0 = 0 ; + int result; +- security_context_t temp1 = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getcon")) SWIG_fail; +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getcon")) SWIG_fail; - result = (int)getcon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); + { -+ result = (int)getcon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; ++ arg2 = &temp2; + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"O:avc_context_to_sid",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_context_to_sid" "', argument " "1"" of type '" "security_context_t""'"); + } ++ arg1 = (security_context_t)(buf1); ++ result = (int)avc_context_to_sid(arg1,arg2); ++ resultobj = SWIG_From_int((int)(result)); ++ { ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); ++ } else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -2952,12 +3124,18 @@ - SWIGINTERN PyObject *_wrap_getcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_context_to_sid_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_id_t *arg2 = (security_id_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_id_t temp2 ; ++ PyObject * obj0 = 0 ; + int result; +- security_context_t temp1 = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getcon_raw")) SWIG_fail; +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getcon_raw")) SWIG_fail; - result = (int)getcon_raw(arg1); + { -+ result = (int)getcon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg2 = &temp2; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"O:avc_context_to_sid_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_context_to_sid_raw" "', argument " "1"" of type '" "security_context_t""'"); + } ++ arg1 = (security_context_t)(buf1); ++ result = (int)avc_context_to_sid_raw(arg1,arg2); resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -2976,11 +3154,11 @@ - SWIGINTERN PyObject *_wrap_setcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); ++ { ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); ++ } else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ return resultobj; ++fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_sidget(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ security_id_t arg1 = (security_id_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; ++ ++ if (!PyArg_ParseTuple(args,(char *)"O:sidget",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sidget" "', argument " "1"" of type '" "security_id_t""'"); + } ++ arg1 = (security_id_t)(argp1); ++ result = (int)sidget(arg1); ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_sidput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; -- int result; +- security_context_t arg1 = (security_context_t) 0 ; ++ security_id_t arg1 = (security_id_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; + int result; ++ ++ if (!PyArg_ParseTuple(args,(char *)"O:sidput",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sidput" "', argument " "1"" of type '" "security_id_t""'"); ++ } ++ arg1 = (security_id_t)(argp1); ++ result = (int)sidput(arg1); ++ resultobj = SWIG_From_int((int)(result)); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_avc_get_initial_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *arg1 = (char *) 0 ; ++ security_id_t *arg2 = (security_id_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; ++ security_id_t temp2 ; PyObject * obj0 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:setcon",&obj0)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"O:setcon",&obj0)) SWIG_fail; ++ { ++ arg2 = &temp2; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"O:avc_get_initial_sid",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -2988,7 +3166,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon" "', argument " "1"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_get_initial_sid" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); +- arg1 = (security_context_t)(buf1); - result = (int)setcon(arg1); ++ arg1 = (char *)(buf1); ++ result = (int)avc_get_initial_sid((char const *)arg1,arg2); + resultobj = SWIG_From_int((int)(result)); + { -+ result = (int)setcon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); ++ } else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + } - resultobj = SWIG_From_int((int)(result)); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; -@@ -3001,11 +3185,11 @@ - SWIGINTERN PyObject *_wrap_setcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +@@ -2998,22 +3283,58 @@ + } + + +-SWIGINTERN PyObject *_wrap_setcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ struct avc_memory_callback *arg2 = (struct avc_memory_callback *) 0 ; ++ struct avc_log_callback *arg3 = (struct avc_log_callback *) 0 ; ++ struct avc_thread_callback *arg4 = (struct avc_thread_callback *) 0 ; ++ struct avc_lock_callback *arg5 = (struct avc_lock_callback *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ void *argp3 = 0 ; ++ int res3 = 0 ; ++ void *argp4 = 0 ; ++ int res4 = 0 ; ++ void *argp5 = 0 ; ++ int res5 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; ++ PyObject * obj4 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:setcon_raw",&obj0)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"O:setcon_raw",&obj0)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OOOOO:avc_init",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3013,7 +3197,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon_raw" "', argument " "1"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_init" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); +- arg1 = (security_context_t)(buf1); - result = (int)setcon_raw(arg1); -+ { -+ result = (int)setcon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg1 = (char *)(buf1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_init" "', argument " "2"" of type '" "struct avc_memory_callback const *""'"); ++ } ++ arg2 = (struct avc_memory_callback *)(argp2); ++ res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_avc_log_callback, 0 | 0 ); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "avc_init" "', argument " "3"" of type '" "struct avc_log_callback const *""'"); ++ } ++ arg3 = (struct avc_log_callback *)(argp3); ++ res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); ++ if (!SWIG_IsOK(res4)) { ++ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "avc_init" "', argument " "4"" of type '" "struct avc_thread_callback const *""'"); + } ++ arg4 = (struct avc_thread_callback *)(argp4); ++ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); ++ if (!SWIG_IsOK(res5)) { ++ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_init" "', argument " "5"" of type '" "struct avc_lock_callback const *""'"); ++ } ++ arg5 = (struct avc_lock_callback *)(argp5); ++ result = (int)avc_init((char const *)arg1,(struct avc_memory_callback const *)arg2,(struct avc_log_callback const *)arg3,(struct avc_thread_callback const *)arg4,(struct avc_lock_callback const *)arg5); resultobj = SWIG_From_int((int)(result)); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; -@@ -3027,11 +3217,11 @@ +@@ -3023,283 +3344,380 @@ + } + + +-SWIGINTERN PyObject *_wrap_getpidcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - pid_t arg1 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- pid_t arg1 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - unsigned int val1 ; - int ecode1 = 0 ; - security_context_t temp2 = 0 ; +- unsigned int val1 ; +- int ecode1 = 0 ; +- security_context_t temp2 = 0 ; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ unsigned int arg2 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getpidcon",&obj0)) SWIG_fail; -@@ -3040,7 +3230,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon" "', argument " "1"" of type '" "pid_t""'"); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:getpidcon",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon" "', argument " "1"" of type '" "pid_t""'"); ++ if (!PyArg_ParseTuple(args,(char *)"OO:avc_open",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_open" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ } ++ arg1 = (struct selinux_opt *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "avc_open" "', argument " "2"" of type '" "unsigned int""'"); } - arg1 = (pid_t)(val1); +- arg1 = (pid_t)(val1); - result = (int)getpidcon(arg1,arg2); -+ { -+ result = (int)getpidcon(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } ++ arg2 = (unsigned int)(val2); ++ result = (int)avc_open(arg1,arg2); resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3060,11 +3256,11 @@ +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getpidcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - pid_t arg1 ; - security_context_t *arg2 = (security_context_t *) 0 ; -- int result; - unsigned int val1 ; - int ecode1 = 0 ; - security_context_t temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; +- pid_t arg1 ; +- security_context_t *arg2 = (security_context_t *) 0 ; + int result; +- unsigned int val1 ; +- int ecode1 = 0 ; +- security_context_t temp2 = 0 ; +- PyObject * obj0 = 0 ; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getpidcon_raw",&obj0)) SWIG_fail; -@@ -3073,7 +3269,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon_raw" "', argument " "1"" of type '" "pid_t""'"); - } - arg1 = (pid_t)(val1); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:getpidcon_raw",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon_raw" "', argument " "1"" of type '" "pid_t""'"); +- } +- arg1 = (pid_t)(val1); - result = (int)getpidcon_raw(arg1,arg2); -+ { -+ result = (int)getpidcon_raw(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } ++ if (!PyArg_ParseTuple(args,(char *)":avc_reset")) SWIG_fail; ++ result = (int)avc_reset(); resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3092,12 +3294,18 @@ - SWIGINTERN PyObject *_wrap_getprevcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getprevcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_has_perm_noaudit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - security_context_t temp1 = 0 ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getprevcon")) SWIG_fail; +- security_context_t temp1 = 0 ; +- +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getprevcon")) SWIG_fail; - result = (int)getprevcon(arg1); -+ { -+ result = (int)getprevcon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3116,12 +3324,18 @@ - SWIGINTERN PyObject *_wrap_getprevcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getprevcon_raw")) SWIG_fail; -- result = (int)getprevcon_raw(arg1); -+ { -+ result = (int)getprevcon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3140,12 +3354,18 @@ - SWIGINTERN PyObject *_wrap_getexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_id_t arg2 = (security_id_t) 0 ; ++ security_class_t arg3 ; ++ access_vector_t arg4 ; ++ struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ; ++ struct av_decision *arg6 = (struct av_decision *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ unsigned int val4 ; ++ int ecode4 = 0 ; ++ void *argp5 = 0 ; ++ int res5 = 0 ; ++ void *argp6 = 0 ; ++ int res6 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; ++ PyObject * obj4 = 0 ; ++ PyObject * obj5 = 0 ; + int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getexeccon")) SWIG_fail; -- result = (int)getexeccon(arg1); -+ { -+ result = (int)getexeccon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ ++ if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm_noaudit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_has_perm_noaudit" "', argument " "1"" of type '" "security_id_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg1 = (security_id_t)(argp1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_has_perm_noaudit" "', argument " "2"" of type '" "security_id_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3164,12 +3384,18 @@ - SWIGINTERN PyObject *_wrap_getexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getexeccon_raw")) SWIG_fail; -- result = (int)getexeccon_raw(arg1); -+ { -+ result = (int)getexeccon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg2 = (security_id_t)(argp2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_has_perm_noaudit" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "avc_has_perm_noaudit" "', argument " "4"" of type '" "access_vector_t""'"); ++ } ++ arg4 = (access_vector_t)(val4); ++ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); ++ if (!SWIG_IsOK(res5)) { ++ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_has_perm_noaudit" "', argument " "5"" of type '" "struct avc_entry_ref *""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3188,11 +3414,11 @@ - SWIGINTERN PyObject *_wrap_setexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:setexeccon",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3200,7 +3426,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon" "', argument " "1"" of type '" "security_context_t""'"); ++ arg5 = (struct avc_entry_ref *)(argp5); ++ res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!SWIG_IsOK(res6)) { ++ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "avc_has_perm_noaudit" "', argument " "6"" of type '" "struct av_decision *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setexeccon(arg1); -+ { -+ result = (int)setexeccon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg6 = (struct av_decision *)(argp6); ++ result = (int)avc_has_perm_noaudit(arg1,arg2,arg3,arg4,arg5,arg6); ++ resultobj = SWIG_From_int((int)(result)); return resultobj; -@@ -3213,11 +3445,11 @@ - SWIGINTERN PyObject *_wrap_setexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getprevcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_has_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_id_t arg2 = (security_id_t) 0 ; ++ security_class_t arg3 ; ++ access_vector_t arg4 ; ++ struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ; ++ void *arg6 = (void *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ unsigned int val4 ; ++ int ecode4 = 0 ; ++ void *argp5 = 0 ; ++ int res5 = 0 ; ++ int res6 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; ++ PyObject * obj4 = 0 ; ++ PyObject * obj5 = 0 ; + int result; +- security_context_t temp1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setexeccon_raw",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3225,7 +3457,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon_raw" "', argument " "1"" of type '" "security_context_t""'"); +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getprevcon_raw")) SWIG_fail; +- result = (int)getprevcon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); ++ if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_has_perm" "', argument " "1"" of type '" "security_id_t""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setexeccon_raw(arg1); -+ { -+ result = (int)setexeccon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg1 = (security_id_t)(argp1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_has_perm" "', argument " "2"" of type '" "security_id_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg2 = (security_id_t)(argp2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_has_perm" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "avc_has_perm" "', argument " "4"" of type '" "access_vector_t""'"); ++ } ++ arg4 = (access_vector_t)(val4); ++ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); ++ if (!SWIG_IsOK(res5)) { ++ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_has_perm" "', argument " "5"" of type '" "struct avc_entry_ref *""'"); ++ } ++ arg5 = (struct avc_entry_ref *)(argp5); ++ res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); ++ if (!SWIG_IsOK(res6)) { ++ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "avc_has_perm" "', argument " "6"" of type '" "void *""'"); + } ++ result = (int)avc_has_perm(arg1,arg2,arg3,arg4,arg5,arg6); ++ resultobj = SWIG_From_int((int)(result)); return resultobj; -@@ -3238,12 +3476,18 @@ - SWIGINTERN PyObject *_wrap_getfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getfscreatecon")) SWIG_fail; -- result = (int)getfscreatecon(arg1); -+ { -+ result = (int)getfscreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- security_context_t *arg1 = (security_context_t *) 0 ; ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_id_t arg2 = (security_id_t) 0 ; ++ security_class_t arg3 ; ++ security_id_t *arg4 = (security_id_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_id_t temp4 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; +- security_context_t temp1 = 0 ; + +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getexeccon")) SWIG_fail; +- result = (int)getexeccon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); ++ { ++ arg4 = &temp4; + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:avc_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_compute_create" "', argument " "1"" of type '" "security_id_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3262,12 +3506,18 @@ - SWIGINTERN PyObject *_wrap_getfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ arg1 = (security_id_t)(argp1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_compute_create" "', argument " "2"" of type '" "security_id_t""'"); + } ++ arg2 = (security_id_t)(argp2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_compute_create" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ result = (int)avc_compute_create(arg1,arg2,arg3,arg4); ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_avc_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; ++ security_id_t arg1 = (security_id_t) 0 ; ++ security_id_t arg2 = (security_id_t) 0 ; ++ security_class_t arg3 ; ++ security_id_t *arg4 = (security_id_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_id_t temp4 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; +- security_context_t temp1 = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getfscreatecon_raw")) SWIG_fail; -- result = (int)getfscreatecon_raw(arg1); +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getexeccon_raw")) SWIG_fail; +- result = (int)getexeccon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); + { -+ result = (int)getfscreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg4 = &temp4; + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:avc_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_compute_member" "', argument " "1"" of type '" "security_id_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3286,11 +3536,11 @@ - SWIGINTERN PyObject *_wrap_setfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ arg1 = (security_id_t)(argp1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_compute_member" "', argument " "2"" of type '" "security_id_t""'"); + } ++ arg2 = (security_id_t)(argp2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_compute_member" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ result = (int)avc_compute_member(arg1,arg2,arg3,arg4); ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_s_t_ptr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_s_t *arg1 = (context_s_t *) 0 ; ++ void *arg2 = (void *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; PyObject * obj0 = 0 ; -+ int result; ++ PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3298,7 +3548,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon" "', argument " "1"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setexeccon",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:context_s_t_ptr_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_s_t_ptr_set" "', argument " "1"" of type '" "context_s_t *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setfscreatecon(arg1); -+ { -+ result = (int)setfscreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- arg1 = (security_context_t)(buf1); +- result = (int)setexeccon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (context_s_t *)(argp1); ++ res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "context_s_t_ptr_set" "', argument " "2"" of type '" "void *""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (arg1) (arg1)->ptr = arg2; ++ resultobj = SWIG_Py_Void(); return resultobj; -@@ -3311,11 +3567,11 @@ - SWIGINTERN PyObject *_wrap_setfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_s_t_ptr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_s_t *arg1 = (context_s_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ void *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon_raw",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3323,7 +3579,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setexeccon_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_s_t_ptr_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_s_t_ptr_get" "', argument " "1"" of type '" "context_s_t *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setfscreatecon_raw(arg1); -+ { -+ result = (int)setfscreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- arg1 = (security_context_t)(buf1); +- result = (int)setexeccon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (context_s_t *)(argp1); ++ result = (void *) ((arg1)->ptr); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); return resultobj; -@@ -3336,12 +3598,18 @@ - SWIGINTERN PyObject *_wrap_getkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_new_context_s_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t temp1 = 0 ; ++ context_s_t *result = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon")) SWIG_fail; -- result = (int)getkeycreatecon(arg1); -+ { -+ result = (int)getkeycreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3360,12 +3628,18 @@ - SWIGINTERN PyObject *_wrap_getkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getfscreatecon")) SWIG_fail; +- result = (int)getfscreatecon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } ++ if (!PyArg_ParseTuple(args,(char *)":new_context_s_t")) SWIG_fail; ++ result = (context_s_t *)calloc(1, sizeof(context_s_t)); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_context_s_t, SWIG_POINTER_NEW | 0 ); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_delete_context_s_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t temp1 = 0 ; ++ context_s_t *arg1 = (context_s_t *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon_raw")) SWIG_fail; -- result = (int)getkeycreatecon_raw(arg1); -+ { -+ result = (int)getkeycreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3384,11 +3658,11 @@ - SWIGINTERN PyObject *_wrap_setkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getfscreatecon_raw")) SWIG_fail; +- result = (int)getfscreatecon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"O:delete_context_s_t",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, SWIG_POINTER_DISOWN | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_context_s_t" "', argument " "1"" of type '" "context_s_t *""'"); + } ++ arg1 = (context_s_t *)(argp1); ++ free((char *) arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *context_s_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *obj; ++ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; ++ SWIG_TypeNewClientData(SWIGTYPE_p_context_s_t, SWIG_NewClientData(obj)); ++ return SWIG_Py_Void(); ++} ++ ++SWIGINTERN PyObject *_wrap_context_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; ++ char *arg1 = (char *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ context_t result; - if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon",&obj0)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon",&obj0)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"O:context_new",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3396,7 +3670,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon" "', argument " "1"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_new" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setkeycreatecon(arg1); -+ { -+ result = (int)setkeycreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); +- arg1 = (security_context_t)(buf1); +- result = (int)setfscreatecon(arg1); +- resultobj = SWIG_From_int((int)(result)); ++ arg1 = (char *)(buf1); ++ result = (context_t)context_new((char const *)arg1); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_context_s_t, 0 | 0 ); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; -@@ -3409,11 +3689,11 @@ - SWIGINTERN PyObject *_wrap_setkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +@@ -3308,671 +3726,869 @@ + } + + +-SWIGINTERN PyObject *_wrap_setfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_str(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon_raw",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3421,7 +3701,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_str",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_str" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setkeycreatecon_raw(arg1); -+ { -+ result = (int)setkeycreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- arg1 = (security_context_t)(buf1); +- result = (int)setfscreatecon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (context_t)(argp1); ++ result = (char *)context_str(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; -@@ -3434,12 +3720,18 @@ - SWIGINTERN PyObject *_wrap_getsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t temp1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon")) SWIG_fail; -- result = (int)getsockcreatecon(arg1); -+ { -+ result = (int)getsockcreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3458,12 +3750,18 @@ - SWIGINTERN PyObject *_wrap_getsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon")) SWIG_fail; +- result = (int)getkeycreatecon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_free",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_free" "', argument " "1"" of type '" "context_t""'"); + } ++ arg1 = (context_t)(argp1); ++ context_free(arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - security_context_t temp1 = 0 ; -+ int result; +- security_context_t temp1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; ++ char *result = 0 ; - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon_raw")) SWIG_fail; -- result = (int)getsockcreatecon_raw(arg1); -+ { -+ result = (int)getsockcreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -3482,11 +3780,11 @@ - SWIGINTERN PyObject *_wrap_setsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon_raw")) SWIG_fail; +- result = (int)getkeycreatecon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_type_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_type_get" "', argument " "1"" of type '" "context_t""'"); + } ++ arg1 = (context_t)(argp1); ++ result = (char *)context_type_get(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_range_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3494,7 +3792,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon" "', argument " "1"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_range_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_range_get" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setsockcreatecon(arg1); -+ { -+ result = (int)setsockcreatecon(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- arg1 = (security_context_t)(buf1); +- result = (int)setkeycreatecon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (context_t)(argp1); ++ result = (char *)context_range_get(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; -@@ -3507,11 +3811,11 @@ - SWIGINTERN PyObject *_wrap_setsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_role_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon_raw",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3519,7 +3823,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_role_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_role_get" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)setsockcreatecon_raw(arg1); -+ { -+ result = (int)setsockcreatecon_raw(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- arg1 = (security_context_t)(buf1); +- result = (int)setkeycreatecon_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (context_t)(argp1); ++ result = (char *)context_role_get(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; -@@ -3533,12 +3843,12 @@ + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_user_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t *arg1 = (security_context_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; +- security_context_t temp1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; ++ char *result = 0 ; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getfilecon",&obj0)) SWIG_fail; -@@ -3547,7 +3857,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon" "', argument " "1"" of type '" "char const *""'"); +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon")) SWIG_fail; +- result = (int)getsockcreatecon(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"O:context_user_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_user_get" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (char *)(buf1); -- result = (int)getfilecon((char const *)arg1,arg2); -+ { -+ result = (int)getfilecon((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3569,12 +3885,12 @@ ++ arg1 = (context_t)(argp1); ++ result = (char *)context_user_get(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; ++ context_t arg1 = (context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; +- security_context_t temp1 = 0 ; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getfilecon_raw",&obj0)) SWIG_fail; -@@ -3583,8 +3899,14 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon_raw" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); -- result = (int)getfilecon_raw((char const *)arg1,arg2); +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon_raw")) SWIG_fail; +- result = (int)getsockcreatecon_raw(arg1); - resultobj = SWIG_From_int((int)(result)); -+ { -+ result = (int)getfilecon_raw((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:context_type_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_type_set" "', argument " "1"" of type '" "context_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg1 = (context_t)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "context_type_set" "', argument " "2"" of type '" "char const *""'"); + } ++ arg2 = (char *)(buf2); ++ result = (int)context_type_set(arg1,(char const *)arg2); + resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); - freecon(*arg2); -@@ -3605,12 +3927,12 @@ ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_range_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon",&obj0)) SWIG_fail; -@@ -3619,7 +3941,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon" "', argument " "1"" of type '" "char const *""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:context_range_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_range_set" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (char *)(buf1); -- result = (int)lgetfilecon((char const *)arg1,arg2); -+ { -+ result = (int)lgetfilecon((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- arg1 = (security_context_t)(buf1); +- result = (int)setsockcreatecon(arg1); ++ arg1 = (context_t)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "context_range_set" "', argument " "2"" of type '" "char const *""'"); + } ++ arg2 = (char *)(buf2); ++ result = (int)context_range_set(arg1,(char const *)arg2); resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3641,12 +3969,12 @@ +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_role_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon_raw",&obj0)) SWIG_fail; -@@ -3655,7 +3983,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon_raw" "', argument " "1"" of type '" "char const *""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:context_role_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_role_set" "', argument " "1"" of type '" "context_t""'"); } - arg1 = (char *)(buf1); -- result = (int)lgetfilecon_raw((char const *)arg1,arg2); -+ { -+ result = (int)lgetfilecon_raw((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- arg1 = (security_context_t)(buf1); +- result = (int)setsockcreatecon_raw(arg1); ++ arg1 = (context_t)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "context_role_set" "', argument " "2"" of type '" "char const *""'"); + } ++ arg2 = (char *)(buf2); ++ result = (int)context_role_set(arg1,(char const *)arg2); resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3677,11 +4011,11 @@ +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_context_user_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- char *arg1 = (char *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int val1 ; - int ecode1 = 0 ; - security_context_t temp2 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; ++ context_t arg1 = (context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon",&obj0)) SWIG_fail; -@@ -3690,7 +4024,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); -- result = (int)fgetfilecon(arg1,arg2); -+ { -+ result = (int)fgetfilecon(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3710,11 +4050,11 @@ +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:getfilecon",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:context_user_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_context_s_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)getfilecon((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "context_user_set" "', argument " "1"" of type '" "context_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg1 = (context_t)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "context_user_set" "', argument " "2"" of type '" "char const *""'"); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg2 = (char *)(buf2); ++ result = (int)context_user_set(arg1,(char const *)arg2); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_ordered_context_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - security_context_t *arg2 = (security_context_t *) 0 ; + char *arg1 = (char *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int val1 ; - int ecode1 = 0 ; - security_context_t temp2 = 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_context_t **arg3 = (security_context_t **) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- security_context_t temp2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ security_context_t *temp3 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon_raw",&obj0)) SWIG_fail; -@@ -3723,7 +4063,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon_raw" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); -- result = (int)fgetfilecon_raw(arg1,arg2); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:getfilecon_raw",&obj0)) SWIG_fail; + { -+ result = (int)fgetfilecon_raw(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; ++ arg3 = &temp3; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"OO:get_ordered_context_list",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon_raw" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); +- result = (int)getfilecon_raw((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_ordered_context_list" "', argument " "2"" of type '" "security_context_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg2 = (security_context_t)(buf2); ++ result = (int)get_ordered_context_list((char const *)arg1,arg2,arg3); ++ resultobj = SWIG_From_int((int)(result)); ++ { ++ PyObject* plist; ++ int i; ++ ++ if (*arg3) { ++ plist = PyList_New(result); ++ for (i = 0; i < result; i++) { ++ PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); ++ } ++ } else { ++ plist = PyList_New(0); + } ++ /* Only return the Python list, don't need to return the length anymore */ ++ resultobj = plist; + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ if (*arg3) freeconary(*arg3); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3743,7 +4089,6 @@ + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ if (*arg3) freeconary(*arg3); ++ } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_lgetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_ordered_context_list_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; ++ char *arg2 = (char *) 0 ; ++ security_context_t arg3 = (security_context_t) 0 ; ++ security_context_t **arg4 = (security_context_t **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -3752,6 +4097,7 @@ - int alloc2 = 0 ; +- security_context_t temp2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ security_context_t *temp4 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon",&obj0,&obj1)) SWIG_fail; +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon",&obj0)) SWIG_fail; ++ { ++ arg4 = &temp4; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"OOO:get_ordered_context_list_with_level",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3764,7 +4110,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon" "', argument " "2"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list_with_level" "', argument " "1"" of type '" "char const *""'"); } - arg2 = (security_context_t)(buf2); -- result = (int)setfilecon((char const *)arg1,arg2); + arg1 = (char *)(buf1); +- result = (int)lgetfilecon((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_ordered_context_list_with_level" "', argument " "2"" of type '" "char const *""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg2 = (char *)(buf2); ++ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_ordered_context_list_with_level" "', argument " "3"" of type '" "security_context_t""'"); ++ } ++ arg3 = (security_context_t)(buf3); ++ result = (int)get_ordered_context_list_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); ++ resultobj = SWIG_From_int((int)(result)); + { -+ result = (int)setfilecon((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; ++ PyObject* plist; ++ int i; ++ ++ if (*arg4) { ++ plist = PyList_New(result); ++ for (i = 0; i < result; i++) { ++ PyList_SetItem(plist, i, PyString_FromString((*arg4)[i])); ++ } ++ } else { ++ plist = PyList_New(0); + } ++ /* Only return the Python list, don't need to return the length anymore */ ++ resultobj = plist; + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); ++ { ++ if (*arg4) freeconary(*arg4); + } - resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -3780,7 +4132,6 @@ ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); ++ { ++ if (*arg4) freeconary(*arg4); ++ } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_lgetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_default_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_context_t *arg3 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -3789,6 +4140,7 @@ - int alloc2 = 0 ; +- security_context_t temp2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ security_context_t temp3 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon_raw",&obj0,&obj1)) SWIG_fail; +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon_raw",&obj0)) SWIG_fail; ++ arg3 = &temp3; ++ if (!PyArg_ParseTuple(args,(char *)"OO:get_default_context",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3801,7 +4153,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon_raw" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context" "', argument " "1"" of type '" "char const *""'"); } - arg2 = (security_context_t)(buf2); -- result = (int)setfilecon_raw((char const *)arg1,arg2); -+ { -+ result = (int)setfilecon_raw((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } + arg1 = (char *)(buf1); +- result = (int)lgetfilecon_raw((char const *)arg1,arg2); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context" "', argument " "2"" of type '" "security_context_t""'"); + } ++ arg2 = (security_context_t)(buf2); ++ result = (int)get_default_context((char const *)arg1,arg2,arg3); resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ freecon(*arg3); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -3817,7 +4175,6 @@ ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_fgetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_default_context_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; +- int arg1 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -3826,6 +4183,7 @@ - int alloc2 = 0 ; +- int val1 ; +- int ecode1 = 0 ; +- security_context_t temp2 = 0 ; ++ char *arg1 = (char *) 0 ; ++ char *arg2 = (char *) 0 ; ++ security_context_t arg3 = (security_context_t) 0 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3838,7 +4196,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); - } - arg2 = (security_context_t)(buf2); -- result = (int)lsetfilecon((char const *)arg1,arg2); -+ { -+ result = (int)lsetfilecon((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon" "', argument " "1"" of type '" "int""'"); +- } +- arg1 = (int)(val1); +- result = (int)fgetfilecon(arg1,arg2); ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_level",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_level" "', argument " "1"" of type '" "char const *""'"); ++ } ++ arg1 = (char *)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_level" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); ++ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_level" "', argument " "3"" of type '" "security_context_t""'"); + } ++ arg3 = (security_context_t)(buf3); ++ result = (int)get_default_context_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -3854,7 +4218,6 @@ +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_fgetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- int arg1 ; +- security_context_t *arg2 = (security_context_t *) 0 ; +- int result; +- int val1 ; +- int ecode1 = 0 ; +- security_context_t temp2 = 0 ; +- PyObject * obj0 = 0 ; +- +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon_raw",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon_raw" "', argument " "1"" of type '" "int""'"); +- } +- arg1 = (int)(val1); +- result = (int)fgetfilecon_raw(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_setfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_default_context_with_role(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; - int result; ++ char *arg2 = (char *) 0 ; ++ security_context_t arg3 = (security_context_t) 0 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -3863,6 +4226,7 @@ + int res2 ; + char *buf2 = 0 ; int alloc2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon_raw",&obj0,&obj1)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon",&obj0,&obj1)) SWIG_fail; ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_role",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -3875,7 +4239,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfilecon" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_role" "', argument " "1"" of type '" "char const *""'"); } - arg2 = (security_context_t)(buf2); -- result = (int)lsetfilecon_raw((char const *)arg1,arg2); -+ { -+ result = (int)lsetfilecon_raw((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } + arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon" "', argument " "2"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_role" "', argument " "2"" of type '" "char const *""'"); + } +- arg2 = (security_context_t)(buf2); +- result = (int)setfilecon((char const *)arg1,arg2); ++ arg2 = (char *)(buf2); ++ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_role" "', argument " "3"" of type '" "security_context_t""'"); + } ++ arg3 = (security_context_t)(buf3); ++ result = (int)get_default_context_with_role((char const *)arg1,(char const *)arg2,arg3,arg4); resultobj = SWIG_From_int((int)(result)); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -3891,7 +4261,6 @@ ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_setfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_get_default_context_with_rolelevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - security_context_t arg2 = (security_context_t) 0 ; + char *arg1 = (char *) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; - int result; - int val1 ; - int ecode1 = 0 ; ++ char *arg2 = (char *) 0 ; ++ char *arg3 = (char *) 0 ; ++ security_context_t arg4 = (security_context_t) 0 ; ++ security_context_t *arg5 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; int res2 ; -@@ -3899,6 +4268,7 @@ + char *buf2 = 0 ; int alloc2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ int res4 ; ++ char *buf4 = 0 ; ++ int alloc4 = 0 ; ++ security_context_t temp5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon",&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); -@@ -3911,7 +4281,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon_raw",&obj0,&obj1)) SWIG_fail; ++ arg5 = &temp5; ++ if (!PyArg_ParseTuple(args,(char *)"OOOO:get_default_context_with_rolelevel",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfilecon_raw" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_rolelevel" "', argument " "1"" of type '" "char const *""'"); } - arg2 = (security_context_t)(buf2); -- result = (int)fsetfilecon(arg1,arg2); -+ { -+ result = (int)fsetfilecon(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } + arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_rolelevel" "', argument " "2"" of type '" "char const *""'"); + } +- arg2 = (security_context_t)(buf2); +- result = (int)setfilecon_raw((char const *)arg1,arg2); ++ arg2 = (char *)(buf2); ++ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_rolelevel" "', argument " "3"" of type '" "char const *""'"); ++ } ++ arg3 = (char *)(buf3); ++ res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); ++ if (!SWIG_IsOK(res4)) { ++ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "get_default_context_with_rolelevel" "', argument " "4"" of type '" "security_context_t""'"); + } ++ arg4 = (security_context_t)(buf4); ++ result = (int)get_default_context_with_rolelevel((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5); resultobj = SWIG_From_int((int)(result)); ++ if (*arg5) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg5)); ++ freecon(*arg5); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); ++ if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); return resultobj; -@@ -3925,7 +4301,6 @@ + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); ++ if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_lsetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_query_user_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - security_context_t arg2 = (security_context_t) 0 ; -- int result; - int val1 ; - int ecode1 = 0 ; - int res2 ; -@@ -3933,6 +4308,7 @@ - int alloc2 = 0 ; +- char *arg1 = (char *) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ security_context_t temp2 = 0 ; + int result; ++ ++ arg1 = &temp1; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)":query_user_context")) SWIG_fail; ++ result = (int)query_user_context(arg1,arg2); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_manual_user_enter_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- PyObject * obj1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon_raw",&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); -@@ -3945,7 +4321,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon",&obj0,&obj1)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:manual_user_enter_context",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lsetfilecon" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "manual_user_enter_context" "', argument " "1"" of type '" "char const *""'"); } - arg2 = (security_context_t)(buf2); -- result = (int)fsetfilecon_raw(arg1,arg2); -+ { -+ result = (int)fsetfilecon_raw(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } + arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); +- } +- arg2 = (security_context_t)(buf2); +- result = (int)lsetfilecon((char const *)arg1,arg2); ++ result = (int)manual_user_enter_context((char const *)arg1,arg2); resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -3959,11 +4341,11 @@ + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_lsetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_default_type_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *result = 0 ; ++ ++ if (!PyArg_ParseTuple(args,(char *)":selinux_default_type_path")) SWIG_fail; ++ result = (char *)selinux_default_type_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_get_default_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; - security_context_t *arg2 = (security_context_t *) 0 ; + char *arg1 = (char *) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; - int result; - int val1 ; ++ char **arg2 = (char **) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; ++ char *temp2 = 0 ; + PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon_raw",&obj0,&obj1)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:get_default_type",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lsetfilecon_raw" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_type" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); +- } +- arg2 = (security_context_t)(buf2); +- result = (int)lsetfilecon_raw((char const *)arg1,arg2); ++ result = (int)get_default_type((char const *)arg1,arg2); + resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ free(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_fsetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selabel_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int arg1 ; +- security_context_t arg2 = (security_context_t) 0 ; +- int result; +- int val1 ; ++ unsigned int arg1 ; ++ struct selinux_opt *arg2 = (struct selinux_opt *) 0 ; ++ unsigned int arg3 ; ++ unsigned int val1 ; int ecode1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; ++ unsigned int val3 ; ++ int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ struct selabel_handle *result = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:selabel_open",&obj0,&obj1,&obj2)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fsetfilecon" "', argument " "1"" of type '" "int""'"); ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selabel_open" "', argument " "1"" of type '" "unsigned int""'"); + } +- arg1 = (int)(val1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ arg1 = (unsigned int)(val1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_selinux_opt, 0 | 0 ); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selabel_open" "', argument " "2"" of type '" "struct selinux_opt *""'"); + } +- arg2 = (security_context_t)(buf2); +- result = (int)fsetfilecon(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ arg2 = (struct selinux_opt *)(argp2); ++ ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "selabel_open" "', argument " "3"" of type '" "unsigned int""'"); ++ } ++ arg3 = (unsigned int)(val3); ++ result = (struct selabel_handle *)selabel_open(arg1,arg2,arg3); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selabel_handle, 0 | 0 ); + return resultobj; + fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_fsetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selabel_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int arg1 ; +- security_context_t arg2 = (security_context_t) 0 ; +- int result; +- int val1 ; +- int ecode1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; ++ struct selabel_handle *arg1 = (struct selabel_handle *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon_raw",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fsetfilecon_raw" "', argument " "1"" of type '" "int""'"); +- } +- arg1 = (int)(val1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ if (!PyArg_ParseTuple(args,(char *)"O:selabel_close",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selabel_handle, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selabel_close" "', argument " "1"" of type '" "struct selabel_handle *""'"); + } +- arg2 = (security_context_t)(buf2); +- result = (int)fsetfilecon_raw(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ arg1 = (struct selabel_handle *)(argp1); ++ selabel_close(arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getpeercon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selabel_lookup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int arg1 ; ++ struct selabel_handle *arg1 = (struct selabel_handle *) 0 ; + security_context_t *arg2 = (security_context_t *) 0 ; +- int result; +- int val1 ; +- int ecode1 = 0 ; ++ char *arg3 = (char *) 0 ; ++ int arg4 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; security_context_t temp2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ int val4 ; ++ int ecode4 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getpeercon",&obj0)) SWIG_fail; -@@ -3972,7 +4354,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon" "', argument " "1"" of type '" "int""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:getpeercon",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon" "', argument " "1"" of type '" "int""'"); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:selabel_lookup",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selabel_handle, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selabel_lookup" "', argument " "1"" of type '" "struct selabel_handle *""'"); ++ } ++ arg1 = (struct selabel_handle *)(argp1); ++ res3 = SWIG_AsCharPtrAndSize(obj1, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "selabel_lookup" "', argument " "3"" of type '" "char const *""'"); ++ } ++ arg3 = (char *)(buf3); ++ ecode4 = SWIG_AsVal_int(obj2, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "selabel_lookup" "', argument " "4"" of type '" "int""'"); } - arg1 = (int)(val1); +- arg1 = (int)(val1); - result = (int)getpeercon(arg1,arg2); -+ { -+ result = (int)getpeercon(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } ++ arg4 = (int)(val4); ++ result = (int)selabel_lookup(arg1,arg2,(char const *)arg3,arg4); resultobj = SWIG_From_int((int)(result)); if (*arg2) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -3992,11 +4380,11 @@ +@@ -3982,30 +4598,51 @@ + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_getpeercon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selabel_lookup_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; +- int arg1 ; ++ struct selabel_handle *arg1 = (struct selabel_handle *) 0 ; security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int val1 ; - int ecode1 = 0 ; +- int val1 ; +- int ecode1 = 0 ; ++ char *arg3 = (char *) 0 ; ++ int arg4 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; security_context_t temp2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; ++ int val4 ; ++ int ecode4 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:getpeercon_raw",&obj0)) SWIG_fail; -@@ -4005,7 +4393,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon_raw" "', argument " "1"" of type '" "int""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:getpeercon_raw",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon_raw" "', argument " "1"" of type '" "int""'"); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:selabel_lookup_raw",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selabel_handle, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selabel_lookup_raw" "', argument " "1"" of type '" "struct selabel_handle *""'"); ++ } ++ arg1 = (struct selabel_handle *)(argp1); ++ res3 = SWIG_AsCharPtrAndSize(obj1, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "selabel_lookup_raw" "', argument " "3"" of type '" "char const *""'"); ++ } ++ arg3 = (char *)(buf3); ++ ecode4 = SWIG_AsVal_int(obj2, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "selabel_lookup_raw" "', argument " "4"" of type '" "int""'"); } - arg1 = (int)(val1); +- arg1 = (int)(val1); - result = (int)getpeercon_raw(arg1,arg2); -+ { -+ result = (int)getpeercon_raw(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } ++ arg4 = (int)(val4); ++ result = (int)selabel_lookup_raw(arg1,arg2,(char const *)arg3,arg4); resultobj = SWIG_From_int((int)(result)); if (*arg2) { resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -4044,7 +4438,6 @@ - } - arg2 = (access_vector_t)(val2); - if (arg1) (arg1)->allowed = arg2; -- - resultobj = SWIG_Py_Void(); +@@ -4015,36 +4652,28 @@ + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); return resultobj; fail: -@@ -4055,10 +4448,10 @@ - SWIGINTERN PyObject *_wrap_av_decision_allowed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_allowed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selabel_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct av_decision *arg1 = (struct av_decision *) 0 ; -- access_vector_t result; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t arg2 ; ++ struct selabel_handle *arg1 = (struct selabel_handle *) 0 ; void *argp1 = 0 ; int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; PyObject * obj0 = 0 ; -+ access_vector_t result; +- PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:av_decision_allowed_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); -@@ -4097,7 +4490,6 @@ - } - arg2 = (access_vector_t)(val2); - if (arg1) (arg1)->decided = arg2; +- if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_allowed_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:selabel_stats",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selabel_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_allowed_set" "', argument " "1"" of type '" "struct av_decision *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selabel_stats" "', argument " "1"" of type '" "struct selabel_handle *""'"); + } +- arg1 = (struct av_decision *)(argp1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_allowed_set" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- if (arg1) (arg1)->allowed = arg2; - ++ arg1 = (struct selabel_handle *)(argp1); ++ selabel_stats(arg1); resultobj = SWIG_Py_Void(); return resultobj; fail: -@@ -4108,10 +4500,10 @@ - SWIGINTERN PyObject *_wrap_av_decision_decided_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +@@ -4052,1153 +4681,1071 @@ + } + + +-SWIGINTERN PyObject *_wrap_av_decision_allowed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_is_selinux_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct av_decision *arg1 = (struct av_decision *) 0 ; +- struct av_decision *arg1 = (struct av_decision *) 0 ; - access_vector_t result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ access_vector_t result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; ++ int result; - if (!PyArg_ParseTuple(args,(char *)"O:av_decision_decided_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); -@@ -4150,7 +4542,6 @@ - } - arg2 = (access_vector_t)(val2); - if (arg1) (arg1)->auditallow = arg2; -- - resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)"O:av_decision_allowed_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_allowed_get" "', argument " "1"" of type '" "struct av_decision *""'"); ++ if (!PyArg_ParseTuple(args,(char *)":is_selinux_enabled")) SWIG_fail; ++ { ++ result = (int)is_selinux_enabled(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (struct av_decision *)(argp1); +- result = (access_vector_t) ((arg1)->allowed); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); ++ resultobj = SWIG_From_int((int)(result)); return resultobj; fail: -@@ -4161,10 +4552,10 @@ - SWIGINTERN PyObject *_wrap_av_decision_auditallow_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_decided_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_is_selinux_mls_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct av_decision *arg1 = (struct av_decision *) 0 ; -- access_vector_t result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ access_vector_t result; - - if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditallow_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); -@@ -4203,7 +4594,6 @@ - } - arg2 = (access_vector_t)(val2); - if (arg1) (arg1)->auditdeny = arg2; -- - resultobj = SWIG_Py_Void(); - return resultobj; - fail: -@@ -4214,10 +4604,10 @@ - SWIGINTERN PyObject *_wrap_av_decision_auditdeny_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct av_decision *arg1 = (struct av_decision *) 0 ; -- access_vector_t result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ access_vector_t result; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ int result; - if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditdeny_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); -@@ -4256,7 +4646,6 @@ - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->seqno = arg2; +- if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_decided_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_decided_set" "', argument " "1"" of type '" "struct av_decision *""'"); ++ if (!PyArg_ParseTuple(args,(char *)":is_selinux_mls_enabled")) SWIG_fail; ++ { ++ result = (int)is_selinux_mls_enabled(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (struct av_decision *)(argp1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_decided_set" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- if (arg1) (arg1)->decided = arg2; - - resultobj = SWIG_Py_Void(); +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); return resultobj; fail: -@@ -4267,10 +4656,10 @@ - SWIGINTERN PyObject *_wrap_av_decision_seqno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_decided_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct av_decision *arg1 = (struct av_decision *) 0 ; -- unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ unsigned int result; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; - if (!PyArg_ParseTuple(args,(char *)"O:av_decision_seqno_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); -@@ -4313,7 +4702,6 @@ +- if (!PyArg_ParseTuple(args,(char *)"O:av_decision_decided_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_decided_get" "', argument " "1"" of type '" "struct av_decision *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getcon")) SWIG_fail; ++ { ++ result = (int)getcon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); } - arg1 = (struct av_decision *)(argp1); - free((char *) arg1); -- - resultobj = SWIG_Py_Void(); - return resultobj; - fail: -@@ -4351,7 +4739,6 @@ - } - arg2 = (int)(val2); - if (arg1) (arg1)->type = arg2; -- - resultobj = SWIG_Py_Void(); +- arg1 = (struct av_decision *)(argp1); +- result = (access_vector_t) ((arg1)->decided); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); return resultobj; fail: -@@ -4362,10 +4749,10 @@ - SWIGINTERN PyObject *_wrap_selinux_opt_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_auditallow_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; -- int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_type_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); -@@ -4422,10 +4809,10 @@ - SWIGINTERN PyObject *_wrap_selinux_opt_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; -- char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_value_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); -@@ -4468,7 +4855,6 @@ +- if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_auditallow_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditallow_set" "', argument " "1"" of type '" "struct av_decision *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getcon_raw")) SWIG_fail; ++ { ++ result = (int)getcon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); } - arg1 = (struct selinux_opt *)(argp1); - free((char *) arg1); +- arg1 = (struct av_decision *)(argp1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_auditallow_set" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- if (arg1) (arg1)->auditallow = arg2; - - resultobj = SWIG_Py_Void(); +- resultobj = SWIG_Py_Void(); return resultobj; fail: -@@ -4483,270 +4869,215 @@ - return SWIG_Py_Void(); + return NULL; } --SWIGINTERN PyObject *_wrap_selinux_callback_func_log_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_av(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + +-SWIGINTERN PyObject *_wrap_av_decision_auditallow_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*arg2)(int,char const *,...) = (int (*)(int,char const *,...)) 0 ; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t result; - void *argp1 = 0 ; - int res1 = 0 ; + security_context_t arg1 = (security_context_t) 0 ; -+ security_context_t arg2 = (security_context_t) 0 ; -+ security_class_t arg3 ; -+ access_vector_t arg4 ; -+ struct av_decision *arg5 = (struct av_decision *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ unsigned int val4 ; -+ int ecode4 = 0 ; -+ void *argp5 = 0 ; -+ int res5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ PyObject * obj4 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_log_set",&obj0,&obj1)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditallow_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setcon",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_log_set" "', argument " "1"" of type '" "union selinux_callback *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av" "', argument " "1"" of type '" "security_context_t""'"); -+ } -+ arg1 = (security_context_t)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av" "', argument " "2"" of type '" "security_context_t""'"); -+ } -+ arg2 = (security_context_t)(buf2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -+ if (!SWIG_IsOK(ecode4)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av" "', argument " "4"" of type '" "access_vector_t""'"); -+ } -+ arg4 = (access_vector_t)(val4); -+ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); -+ if (!SWIG_IsOK(res5)) { -+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av" "', argument " "5"" of type '" "struct av_decision *""'"); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditallow_get" "', argument " "1"" of type '" "struct av_decision *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon" "', argument " "1"" of type '" "security_context_t""'"); } -- arg1 = (union selinux_callback *)(argp1); -+ arg5 = (struct av_decision *)(argp5); - { -- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_int_p_q_const__char_v_______int); -- if (!SWIG_IsOK(res)) { -- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_log_set" "', argument " "2"" of type '" "int (*)(int,char const *,...)""'"); -+ result = (int)security_compute_av(arg1,arg2,arg3,arg4,arg5); +- arg1 = (struct av_decision *)(argp1); +- result = (access_vector_t) ((arg1)->auditallow); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)setcon(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; - } - } -- if (arg1) (arg1)->func_log = arg2; -- -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_selinux_callback_func_log_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*result)(int,char const *,...) = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_log_get",&obj0)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_log_get" "', argument " "1"" of type '" "union selinux_callback *""'"); -- } -- arg1 = (union selinux_callback *)(argp1); -- result = (int (*)(int,char const *,...)) ((arg1)->func_log); -- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_p_q_const__char_v_______int); ++ } ++ } + resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } --SWIGINTERN PyObject *_wrap_selinux_callback_func_audit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_av_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_av_decision_auditdeny_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*arg2)(void *,security_class_t,char *,size_t) = (int (*)(void *,security_class_t,char *,size_t)) 0 ; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; + security_context_t arg1 = (security_context_t) 0 ; -+ security_context_t arg2 = (security_context_t) 0 ; -+ security_class_t arg3 ; -+ access_vector_t arg4 ; -+ struct av_decision *arg5 = (struct av_decision *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ unsigned int val4 ; -+ int ecode4 = 0 ; -+ void *argp5 = 0 ; -+ int res5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ PyObject * obj4 = 0 ; +- PyObject * obj1 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_audit_set",&obj0,&obj1)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av_raw",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_auditdeny_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setcon_raw",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_audit_set" "', argument " "1"" of type '" "union selinux_callback *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av_raw" "', argument " "1"" of type '" "security_context_t""'"); -+ } +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditdeny_set" "', argument " "1"" of type '" "struct av_decision *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setcon_raw" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (struct av_decision *)(argp1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_auditdeny_set" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- if (arg1) (arg1)->auditdeny = arg2; +- +- resultobj = SWIG_Py_Void(); + arg1 = (security_context_t)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ { ++ result = (int)setcon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } -+ arg2 = (security_context_t)(buf2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av_raw" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -+ if (!SWIG_IsOK(ecode4)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av_raw" "', argument " "4"" of type '" "access_vector_t""'"); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_auditdeny_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getpidcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- access_vector_t result; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ pid_t arg1 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ unsigned int val1 ; ++ int ecode1 = 0 ; ++ security_context_t temp2 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditdeny_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditdeny_get" "', argument " "1"" of type '" "struct av_decision *""'"); ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:getpidcon",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon" "', argument " "1"" of type '" "pid_t""'"); + } -+ arg4 = (access_vector_t)(val4); -+ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); -+ if (!SWIG_IsOK(res5)) { -+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av_raw" "', argument " "5"" of type '" "struct av_decision *""'"); ++ arg1 = (pid_t)(val1); ++ { ++ result = (int)getpidcon(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); } -- arg1 = (union selinux_callback *)(argp1); -+ arg5 = (struct av_decision *)(argp5); - { -- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__int); -- if (!SWIG_IsOK(res)) { -- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_audit_set" "', argument " "2"" of type '" "int (*)(void *,security_class_t,char *,size_t)""'"); -+ result = (int)security_compute_av_raw(arg1,arg2,arg3,arg4,arg5); +- arg1 = (struct av_decision *)(argp1); +- result = (access_vector_t) ((arg1)->auditdeny); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_seqno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getpidcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- unsigned int arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; ++ pid_t arg1 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ unsigned int val1 ; ++ int ecode1 = 0 ; ++ security_context_t temp2 = 0 ; + PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_seqno_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_seqno_set" "', argument " "1"" of type '" "struct av_decision *""'"); +- } +- arg1 = (struct av_decision *)(argp1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_seqno_set" "', argument " "2"" of type '" "unsigned int""'"); ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:getpidcon_raw",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpidcon_raw" "', argument " "1"" of type '" "pid_t""'"); + } +- arg2 = (unsigned int)(val2); +- if (arg1) (arg1)->seqno = arg2; +- +- resultobj = SWIG_Py_Void(); ++ arg1 = (pid_t)(val1); ++ { ++ result = (int)getpidcon_raw(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; - } ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_av_decision_seqno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getprevcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- unsigned int result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:av_decision_seqno_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_seqno_get" "', argument " "1"" of type '" "struct av_decision *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getprevcon")) SWIG_fail; ++ { ++ result = (int)getprevcon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); } -- if (arg1) (arg1)->func_audit = arg2; +- arg1 = (struct av_decision *)(argp1); +- result = (unsigned int) ((arg1)->seqno); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_new_av_decision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getprevcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct av_decision *result = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)":new_av_decision")) SWIG_fail; +- result = (struct av_decision *)calloc(1, sizeof(struct av_decision)); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_av_decision, SWIG_POINTER_NEW | 0 ); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getprevcon_raw")) SWIG_fail; ++ { ++ result = (int)getprevcon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_delete_av_decision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct av_decision *arg1 = (struct av_decision *) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:delete_av_decision",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, SWIG_POINTER_DISOWN | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_av_decision" "', argument " "1"" of type '" "struct av_decision *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getexeccon")) SWIG_fail; ++ { ++ result = (int)getexeccon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- arg1 = (struct av_decision *)(argp1); +- free((char *) arg1); - - resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *av_decision_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_av_decision, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_selinux_opt_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; +- int arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_opt_type_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_type_set" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getexeccon_raw")) SWIG_fail; ++ { ++ result = (int)getexeccon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- arg1 = (struct selinux_opt *)(argp1); +- ecode2 = SWIG_AsVal_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "selinux_opt_type_set" "', argument " "2"" of type '" "int""'"); +- } +- arg2 = (int)(val2); +- if (arg1) (arg1)->type = arg2; +- +- resultobj = SWIG_Py_Void(); return resultobj; fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } --SWIGINTERN PyObject *_wrap_selinux_callback_func_audit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_opt_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*result)(void *,security_class_t,char *,size_t) = 0 ; +- struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; +- int result; - void *argp1 = 0 ; - int res1 = 0 ; + security_context_t arg1 = (security_context_t) 0 ; -+ security_context_t arg2 = (security_context_t) 0 ; -+ security_class_t arg3 ; -+ security_context_t *arg4 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_audit_get",&obj0)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); -+ arg4 = &temp4; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_type_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setexeccon",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_audit_get" "', argument " "1"" of type '" "union selinux_callback *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create" "', argument " "1"" of type '" "security_context_t""'"); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_type_get" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon" "', argument " "1"" of type '" "security_context_t""'"); } -- arg1 = (union selinux_callback *)(argp1); -- result = (int (*)(void *,security_class_t,char *,size_t)) ((arg1)->func_audit); -- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__int); +- arg1 = (struct selinux_opt *)(argp1); +- result = (int) ((arg1)->type); +- resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - --SWIGINTERN PyObject *_wrap_selinux_callback_func_validate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_opt_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*arg2)(security_context_t *) = (int (*)(security_context_t *)) 0 ; +- struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; +- char *arg2 = (char *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_validate_set",&obj0,&obj1)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_opt_value_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); - if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_validate_set" "', argument " "1"" of type '" "union selinux_callback *""'"); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_value_set" "', argument " "1"" of type '" "struct selinux_opt *""'"); +- } +- arg1 = (struct selinux_opt *)(argp1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_opt_value_set" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- if (arg2) { +- size_t size = strlen((const char *)((const char *)(arg2))) + 1; +- arg1->value = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); +- } else { +- arg1->value = 0; + arg1 = (security_context_t)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create" "', argument " "2"" of type '" "security_context_t""'"); ++ { ++ result = (int)setexeccon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } } -- arg1 = (union selinux_callback *)(argp1); -+ arg2 = (security_context_t)(buf2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); - { -- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_char__int); -- if (!SWIG_IsOK(res)) { -- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_validate_set" "', argument " "2"" of type '" "int (*)(security_context_t *)""'"); -+ result = (int)security_compute_create(arg1,arg2,arg3,arg4); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; - } - } -- if (arg1) (arg1)->func_validate = arg2; -- - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_selinux_callback_func_validate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- int (*result)(security_context_t *) = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_validate_get",&obj0)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_validate_get" "', argument " "1"" of type '" "union selinux_callback *""'"); -- } -- arg1 = (union selinux_callback *)(argp1); -- result = (int (*)(security_context_t *)) ((arg1)->func_validate); -- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_char__int); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_new_selinux_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- union selinux_callback *result = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)":new_selinux_callback")) SWIG_fail; -- result = (union selinux_callback *)calloc(1, sizeof(union selinux_callback)); -- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_callback, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_delete_selinux_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- union selinux_callback *arg1 = (union selinux_callback *) 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)"O:delete_selinux_callback",&obj0)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_selinux_callback" "', argument " "1"" of type '" "union selinux_callback *""'"); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + resultobj = SWIG_From_int((int)(result)); -+ if (*arg4) { -+ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -+ freecon(*arg4); - } -- arg1 = (union selinux_callback *)(argp1); -- free((char *) arg1); -- -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *selinux_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *obj; -- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; -- SWIG_TypeNewClientData(SWIGTYPE_p_selinux_callback, SWIG_NewClientData(obj)); -- return SWIG_Py_Void(); --} -- --SWIGINTERN PyObject *_wrap_selinux_get_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- int arg1 ; -- union selinux_callback result; -- int val1 ; -- int ecode1 = 0 ; -- PyObject * obj0 = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_get_callback",&obj0)) SWIG_fail; -- ecode1 = SWIG_AsVal_int(obj0, &val1); -- if (!SWIG_IsOK(ecode1)) { -- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_get_callback" "', argument " "1"" of type '" "int""'"); -- } -- arg1 = (int)(val1); -- result = selinux_get_callback(arg1); -- resultobj = SWIG_NewPointerObj((union selinux_callback *)memcpy((union selinux_callback *)malloc(sizeof(union selinux_callback)),&result,sizeof(union selinux_callback)), SWIGTYPE_p_selinux_callback, SWIG_POINTER_OWN | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_selinux_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- int arg1 ; -- union selinux_callback arg2 ; -- int val1 ; -- int ecode1 = 0 ; -- void *argp2 ; -- int res2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- -- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_set_callback",&obj0,&obj1)) SWIG_fail; -- ecode1 = SWIG_AsVal_int(obj0, &val1); -- if (!SWIG_IsOK(ecode1)) { -- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_set_callback" "', argument " "1"" of type '" "int""'"); -- } -- arg1 = (int)(val1); -- { -- res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_selinux_callback, 0 ); -- if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_set_callback" "', argument " "2"" of type '" "union selinux_callback""'"); -- } -- if (!argp2) { -- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "selinux_set_callback" "', argument " "2"" of type '" "union selinux_callback""'"); -- } else { -- arg2 = *((union selinux_callback *)(argp2)); -- } -+ else { -+ Py_INCREF(Py_None); -+ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); - } -- selinux_set_callback(arg1,arg2); -- resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_av(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_create_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_opt_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_class_t arg3 ; -- access_vector_t arg4 ; -- struct av_decision *arg5 = (struct av_decision *) 0 ; -- int result; -+ security_context_t *arg4 = (security_context_t *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -4755,44 +5086,45 @@ - int alloc2 = 0 ; - unsigned short val3 ; - int ecode3 = 0 ; -- unsigned int val4 ; -- int ecode4 = 0 ; -- void *argp5 = 0 ; -- int res5 = 0 ; -+ security_context_t temp4 = 0 ; +- struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; +- char *result = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -- PyObject * obj3 = 0 ; -- PyObject * obj4 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; -+ arg4 = &temp4; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create_raw",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_value_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setexeccon_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av" "', argument " "1"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create_raw" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av" "', argument " "2"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create_raw" "', argument " "2"" of type '" "security_context_t""'"); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_value_get" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setexeccon_raw" "', argument " "1"" of type '" "security_context_t""'"); } - arg2 = (security_context_t)(buf2); - ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av" "', argument " "3"" of type '" "security_class_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create_raw" "', argument " "3"" of type '" "security_class_t""'"); - } - arg3 = (security_class_t)(val3); -- ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -- if (!SWIG_IsOK(ecode4)) { -- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av" "', argument " "4"" of type '" "access_vector_t""'"); -- } -- arg4 = (access_vector_t)(val4); -- res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); -- if (!SWIG_IsOK(res5)) { -- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av" "', argument " "5"" of type '" "struct av_decision *""'"); +- arg1 = (struct selinux_opt *)(argp1); +- result = (char *) ((arg1)->value); +- resultobj = SWIG_FromCharPtr((const char *)result); ++ arg1 = (security_context_t)(buf1); + { -+ result = (int)security_compute_create_raw(arg1,arg2,arg3,arg4); ++ result = (int)setexeccon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_new_selinux_opt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct selinux_opt *result = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)":new_selinux_opt")) SWIG_fail; +- result = (struct selinux_opt *)calloc(1, sizeof(struct selinux_opt)); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_opt, SWIG_POINTER_NEW | 0 ); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getfscreatecon")) SWIG_fail; ++ { ++ result = (int)getfscreatecon(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } - } -- arg5 = (struct av_decision *)(argp5); -- result = (int)security_compute_av(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); -+ if (*arg4) { -+ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -+ freecon(*arg4); ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -4803,14 +5135,12 @@ + fail: + return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_av_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_relabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_delete_selinux_opt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_class_t arg3 ; -- access_vector_t arg4 ; -- struct av_decision *arg5 = (struct av_decision *) 0 ; -- int result; -+ security_context_t *arg4 = (security_context_t *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -4819,44 +5149,45 @@ - int alloc2 = 0 ; - unsigned short val3 ; - int ecode3 = 0 ; -- unsigned int val4 ; -- int ecode4 = 0 ; -- void *argp5 = 0 ; -- int res5 = 0 ; -+ security_context_t temp4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -- PyObject * obj3 = 0 ; -- PyObject * obj4 = 0 ; +- struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av_raw",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; -+ arg4 = &temp4; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av_raw" "', argument " "1"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av_raw" "', argument " "2"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel" "', argument " "2"" of type '" "security_context_t""'"); - } - arg2 = (security_context_t)(buf2); - ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av_raw" "', argument " "3"" of type '" "security_class_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel" "', argument " "3"" of type '" "security_class_t""'"); - } - arg3 = (security_class_t)(val3); -- ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -- if (!SWIG_IsOK(ecode4)) { -- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av_raw" "', argument " "4"" of type '" "access_vector_t""'"); -- } -- arg4 = (access_vector_t)(val4); -- res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); -- if (!SWIG_IsOK(res5)) { -- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av_raw" "', argument " "5"" of type '" "struct av_decision *""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:delete_selinux_opt",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, SWIG_POINTER_DISOWN | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_selinux_opt" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getfscreatecon_raw")) SWIG_fail; + { -+ result = (int)security_compute_relabel(arg1,arg2,arg3,arg4); ++ result = (int)getfscreatecon_raw(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } - } -- arg5 = (struct av_decision *)(argp5); -- result = (int)security_compute_av_raw(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); -+ if (*arg4) { -+ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -+ freecon(*arg4); ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -+ } - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + } +- arg1 = (struct selinux_opt *)(argp1); +- free((char *) arg1); +- +- resultobj = SWIG_Py_Void(); return resultobj; -@@ -4867,13 +5198,12 @@ + fail: + return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_relabel_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *selinux_opt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_selinux_opt, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_selinux_callback_func_log_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_class_t arg3 ; - security_context_t *arg4 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -4886,25 +5216,32 @@ +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*arg2)(int,char const *,...) = (int (*)(int,char const *,...)) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; +- PyObject * obj1 = 0 ; + int result; - arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel_raw",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_log_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create" "', argument " "1"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel_raw" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create" "', argument " "2"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel_raw" "', argument " "2"" of type '" "security_context_t""'"); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_log_set" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon" "', argument " "1"" of type '" "security_context_t""'"); } - arg2 = (security_context_t)(buf2); - ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create" "', argument " "3"" of type '" "security_class_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel_raw" "', argument " "3"" of type '" "security_class_t""'"); - } - arg3 = (security_class_t)(val3); -- result = (int)security_compute_create(arg1,arg2,arg3,arg4); -+ { -+ result = (int)security_compute_relabel_raw(arg1,arg2,arg3,arg4); +- arg1 = (union selinux_callback *)(argp1); ++ arg1 = (security_context_t)(buf1); + { +- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_int_p_q_const__char_v_______int); +- if (!SWIG_IsOK(res)) { +- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_log_set" "', argument " "2"" of type '" "int (*)(int,char const *,...)""'"); ++ result = (int)setfscreatecon(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg4) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -@@ -4924,13 +5261,12 @@ + } + } +- if (arg1) (arg1)->func_log = arg2; +- +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_create_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_callback_func_log_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_class_t arg3 ; - security_context_t *arg4 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -4943,25 +5279,32 @@ +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*result)(int,char const *,...) = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; + int result; - arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create_raw",&obj0,&obj1,&obj2)) SWIG_fail; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_log_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create_raw" "', argument " "1"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create_raw" "', argument " "2"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member" "', argument " "2"" of type '" "security_context_t""'"); - } - arg2 = (security_context_t)(buf2); - ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create_raw" "', argument " "3"" of type '" "security_class_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member" "', argument " "3"" of type '" "security_class_t""'"); - } - arg3 = (security_class_t)(val3); -- result = (int)security_compute_create_raw(arg1,arg2,arg3,arg4); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_log_get" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfscreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); + { -+ result = (int)security_compute_member(arg1,arg2,arg3,arg4); ++ result = (int)setfscreatecon_raw(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg4) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -@@ -4981,13 +5324,12 @@ + } +- arg1 = (union selinux_callback *)(argp1); +- result = (int (*)(int,char const *,...)) ((arg1)->func_log); +- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_int_p_q_const__char_v_______int); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_relabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_member_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_callback_func_audit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_class_t arg3 ; - security_context_t *arg4 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -5000,25 +5342,32 @@ - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*arg2)(void *,security_class_t,char *,size_t) = (int (*)(void *,security_class_t,char *,size_t)) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; + int result; - arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel",&obj0,&obj1,&obj2)) SWIG_fail; -+ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member_raw",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel" "', argument " "1"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member_raw" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel" "', argument " "2"" of type '" "security_context_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member_raw" "', argument " "2"" of type '" "security_context_t""'"); - } - arg2 = (security_context_t)(buf2); - ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel" "', argument " "3"" of type '" "security_class_t""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member_raw" "', argument " "3"" of type '" "security_class_t""'"); - } - arg3 = (security_class_t)(val3); -- result = (int)security_compute_relabel(arg1,arg2,arg3,arg4); -+ { -+ result = (int)security_compute_member_raw(arg1,arg2,arg3,arg4); +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_audit_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_audit_set" "', argument " "1"" of type '" "union selinux_callback *""'"); +- } +- arg1 = (union selinux_callback *)(argp1); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon")) SWIG_fail; + { +- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__int); +- if (!SWIG_IsOK(res)) { +- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_audit_set" "', argument " "2"" of type '" "int (*)(void *,security_class_t,char *,size_t)""'"); ++ result = (int)getkeycreatecon(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; -+ } + } + } +- if (arg1) (arg1)->func_audit = arg2; +- +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg4) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -@@ -5038,192 +5387,21 @@ ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + return resultobj; + fail: + return NULL; } --SWIGINTERN PyObject *_wrap_security_compute_relabel_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_security_compute_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_callback_func_audit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; -- security_context_t arg2 = (security_context_t) 0 ; -- security_class_t arg3 ; -- security_context_t *arg4 = (security_context_t *) 0 ; -- int result; -+ char *arg2 = (char *) 0 ; -+ security_context_t **arg3 = (security_context_t **) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; -- unsigned short val3 ; -- int ecode3 = 0 ; -- security_context_t temp4 = 0 ; +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*result)(void *,security_class_t,char *,size_t) = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; - PyObject * obj0 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_audit_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_audit_get" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon_raw")) SWIG_fail; ++ { ++ result = (int)getkeycreatecon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- arg1 = (union selinux_callback *)(argp1); +- result = (int (*)(void *,security_class_t,char *,size_t)) ((arg1)->func_audit); +- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__int); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_callback_func_validate_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*arg2)(security_context_t *) = (int (*)(security_context_t *)) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- PyObject * obj2 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_callback_func_validate_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_validate_set" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (union selinux_callback *)(argp1); ++ arg1 = (security_context_t)(buf1); + { +- int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_p_char__int); +- if (!SWIG_IsOK(res)) { +- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "selinux_callback_func_validate_set" "', argument " "2"" of type '" "int (*)(security_context_t *)""'"); ++ result = (int)setkeycreatecon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } +- if (arg1) (arg1)->func_validate = arg2; - -- arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel_raw",&obj0,&obj1,&obj2)) SWIG_fail; -- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel_raw" "', argument " "1"" of type '" "security_context_t""'"); -- } -- arg1 = (security_context_t)(buf1); -- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -- if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel_raw" "', argument " "2"" of type '" "security_context_t""'"); -- } -- arg2 = (security_context_t)(buf2); -- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -- if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel_raw" "', argument " "3"" of type '" "security_class_t""'"); -- } -- arg3 = (security_class_t)(val3); -- result = (int)security_compute_relabel_raw(arg1,arg2,arg3,arg4); -- resultobj = SWIG_From_int((int)(result)); -- if (*arg4) { -- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -- freecon(*arg4); -- } -- else { -- Py_INCREF(Py_None); -- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -- } -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_callback_func_validate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- int (*result)(security_context_t *) = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_validate_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_callback_func_validate_get" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setkeycreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)setkeycreatecon_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (union selinux_callback *)(argp1); +- result = (int (*)(security_context_t *)) ((arg1)->func_validate); +- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_char__int); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_new_selinux_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- union selinux_callback *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":new_selinux_callback")) SWIG_fail; +- result = (union selinux_callback *)calloc(1, sizeof(union selinux_callback)); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_callback, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - --SWIGINTERN PyObject *_wrap_security_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_delete_selinux_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- security_context_t arg1 = (security_context_t) 0 ; -- security_context_t arg2 = (security_context_t) 0 ; -- security_class_t arg3 ; -- security_context_t *arg4 = (security_context_t *) 0 ; -- int result; -- int res1 ; -- char *buf1 = 0 ; -- int alloc1 = 0 ; -- int res2 ; -- char *buf2 = 0 ; -- int alloc2 = 0 ; -- unsigned short val3 ; -- int ecode3 = 0 ; -- security_context_t temp4 = 0 ; +- union selinux_callback *arg1 = (union selinux_callback *) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; - PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- PyObject * obj2 = 0 ; -- -- arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; -- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:delete_selinux_callback",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member" "', argument " "1"" of type '" "security_context_t""'"); -- } -- arg1 = (security_context_t)(buf1); -- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -- if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member" "', argument " "2"" of type '" "security_context_t""'"); -- } -- arg2 = (security_context_t)(buf2); -- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -- if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member" "', argument " "3"" of type '" "security_class_t""'"); -- } -- arg3 = (security_class_t)(val3); -- result = (int)security_compute_member(arg1,arg2,arg3,arg4); -- resultobj = SWIG_From_int((int)(result)); -- if (*arg4) { -- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -- freecon(*arg4); -- } -- else { -- Py_INCREF(Py_None); -- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -- } -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_selinux_callback" "', argument " "1"" of type '" "union selinux_callback *""'"); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon")) SWIG_fail; ++ { ++ result = (int)getsockcreatecon(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- arg1 = (union selinux_callback *)(argp1); +- free((char *) arg1); +- +- resultobj = SWIG_Py_Void(); - return resultobj; -fail: -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - --SWIGINTERN PyObject *_wrap_security_compute_member_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *selinux_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_selinux_callback, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_selinux_get_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- security_context_t arg1 = (security_context_t) 0 ; -- security_context_t arg2 = (security_context_t) 0 ; -- security_class_t arg3 ; -- security_context_t *arg4 = (security_context_t *) 0 ; -- int result; -- int res1 ; -- char *buf1 = 0 ; -- int alloc1 = 0 ; -- int res2 ; -- char *buf2 = 0 ; -- int alloc2 = 0 ; -- unsigned short val3 ; -- int ecode3 = 0 ; -- security_context_t temp4 = 0 ; +- int arg1 ; +- union selinux_callback result; +- int val1 ; +- int ecode1 = 0 ; - PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- PyObject * obj2 = 0 ; - -- arg4 = &temp4; -- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member_raw",&obj0,&obj1,&obj2)) SWIG_fail; -- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member_raw" "', argument " "1"" of type '" "security_context_t""'"); -- } -- arg1 = (security_context_t)(buf1); -- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -- if (!SWIG_IsOK(res2)) { -- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member_raw" "', argument " "2"" of type '" "security_context_t""'"); -- } -- arg2 = (security_context_t)(buf2); -- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -- if (!SWIG_IsOK(ecode3)) { -- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member_raw" "', argument " "3"" of type '" "security_class_t""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_get_callback",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_get_callback" "', argument " "1"" of type '" "int""'"); - } -- arg3 = (security_class_t)(val3); -- result = (int)security_compute_member_raw(arg1,arg2,arg3,arg4); -- resultobj = SWIG_From_int((int)(result)); -- if (*arg4) { -- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -- freecon(*arg4); -- } -- else { -- Py_INCREF(Py_None); -- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -- } -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -- return resultobj; --fail: -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -- return NULL; --} -- -- --SWIGINTERN PyObject *_wrap_security_compute_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- security_context_t arg1 = (security_context_t) 0 ; -- char *arg2 = (char *) 0 ; -- security_context_t **arg3 = (security_context_t **) 0 ; -- int result; -- int res1 ; -- char *buf1 = 0 ; -- int alloc1 = 0 ; -- int res2 ; -- char *buf2 = 0 ; -- int alloc2 = 0 ; -- security_context_t *temp3 ; -+ security_context_t *temp3 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- arg1 = (int)(val1); +- result = selinux_get_callback(arg1); +- resultobj = SWIG_NewPointerObj((union selinux_callback *)memcpy((union selinux_callback *)malloc(sizeof(union selinux_callback)),&result,sizeof(union selinux_callback)), SWIGTYPE_p_selinux_callback, SWIG_POINTER_OWN | 0 ); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_set_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int arg1 ; +- union selinux_callback arg2 ; +- int val1 ; +- int ecode1 = 0 ; +- void *argp2 ; +- int res2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ security_context_t *arg1 = (security_context_t *) 0 ; ++ security_context_t temp1 = 0 ; + int result; +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_set_callback",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_set_callback" "', argument " "1"" of type '" "int""'"); +- } +- arg1 = (int)(val1); ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon_raw")) SWIG_fail; { - arg3 = &temp3; -@@ -5239,7 +5417,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); -- result = (int)security_compute_user(arg1,(char const *)arg2,arg3); -+ { -+ result = (int)security_compute_user(arg1,(char const *)arg2,arg3); +- res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_selinux_callback, 0 ); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_set_callback" "', argument " "2"" of type '" "union selinux_callback""'"); +- } +- if (!argp2) { +- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "selinux_set_callback" "', argument " "2"" of type '" "union selinux_callback""'"); +- } else { +- arg2 = *((union selinux_callback *)(argp2)); ++ result = (int)getsockcreatecon_raw(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; -+ } + } + } +- selinux_set_callback(arg1,arg2); +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ freecon(*arg1); + } - resultobj = SWIG_From_int((int)(result)); - { - PyObject* plist; -@@ -5279,7 +5463,6 @@ ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_av(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; security_context_t arg1 = (security_context_t) 0 ; - char *arg2 = (char *) 0 ; - security_context_t **arg3 = (security_context_t **) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- access_vector_t arg4 ; +- struct av_decision *arg5 = (struct av_decision *) 0 ; - int result; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -5289,6 +5472,7 @@ - security_context_t *temp3 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- unsigned int val4 ; +- int ecode4 = 0 ; +- void *argp5 = 0 ; +- int res5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- PyObject * obj3 = 0 ; +- PyObject * obj4 = 0 ; + int result; - { - arg3 = &temp3; -@@ -5304,7 +5488,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user_raw" "', argument " "2"" of type '" "char const *""'"); +- if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon" "', argument " "1"" of type '" "security_context_t""'"); } - arg2 = (char *)(buf2); -- result = (int)security_compute_user_raw(arg1,(char const *)arg2,arg3); + arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av" "', argument " "2"" of type '" "security_context_t""'"); +- } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); +- if (!SWIG_IsOK(ecode4)) { +- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av" "', argument " "4"" of type '" "access_vector_t""'"); +- } +- arg4 = (access_vector_t)(val4); +- res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res5)) { +- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av" "', argument " "5"" of type '" "struct av_decision *""'"); + { -+ result = (int)security_compute_user_raw(arg1,(char const *)arg2,arg3); ++ result = (int)setsockcreatecon(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg5 = (struct av_decision *)(argp5); +- result = (int)security_compute_av(arg1,arg2,arg3,arg4,arg5); resultobj = SWIG_From_int((int)(result)); - { - PyObject* plist; -@@ -5343,12 +5533,12 @@ + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_av_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - void *arg1 = (void *) 0 ; - size_t arg2 ; + security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- access_vector_t arg4 ; +- struct av_decision *arg5 = (struct av_decision *) 0 ; - int result; int res1 ; - size_t val2 ; - int ecode2 = 0 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- unsigned int val4 ; +- int ecode4 = 0 ; +- void *argp5 = 0 ; +- int res5 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- PyObject * obj3 = 0 ; +- PyObject * obj4 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:security_load_policy",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); -@@ -5360,7 +5550,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_load_policy" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); -- result = (int)security_load_policy(arg1,arg2); +- if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av_raw",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon_raw",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setsockcreatecon_raw" "', argument " "1"" of type '" "security_context_t""'"); + } + arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av_raw" "', argument " "2"" of type '" "security_context_t""'"); +- } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av_raw" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); +- if (!SWIG_IsOK(ecode4)) { +- SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av_raw" "', argument " "4"" of type '" "access_vector_t""'"); +- } +- arg4 = (access_vector_t)(val4); +- res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); +- if (!SWIG_IsOK(res5)) { +- SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av_raw" "', argument " "5"" of type '" "struct av_decision *""'"); + { -+ result = (int)security_load_policy(arg1,arg2); ++ result = (int)setsockcreatecon_raw(arg1); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg5 = (struct av_decision *)(argp5); +- result = (int)security_compute_av_raw(arg1,arg2,arg3,arg4,arg5); resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: -@@ -5372,12 +5568,12 @@ + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context",&obj0)) SWIG_fail; -@@ -5386,7 +5582,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context" "', argument " "1"" of type '" "char const *""'"); +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:getfilecon",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (char *)(buf1); -- result = (int)security_get_initial_context((char const *)arg1,arg2); +- arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create" "', argument " "2"" of type '" "security_context_t""'"); ++ arg1 = (char *)(buf1); + { -+ result = (int)security_get_initial_context((char const *)arg1,arg2); ++ result = (int)getfilecon((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_create(arg1,arg2,arg3,arg4); resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -5408,12 +5610,12 @@ +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_create_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context_raw",&obj0)) SWIG_fail; -@@ -5422,7 +5624,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context_raw" "', argument " "1"" of type '" "char const *""'"); +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create_raw",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:getfilecon_raw",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getfilecon_raw" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (char *)(buf1); -- result = (int)security_get_initial_context_raw((char const *)arg1,arg2); -+ { -+ result = (int)security_get_initial_context_raw((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -5443,10 +5651,10 @@ - SWIGINTERN PyObject *_wrap_selinux_mkload_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int arg1 ; -- int result; - int val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:selinux_mkload_policy",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); -@@ -5454,7 +5662,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_mkload_policy" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); -- result = (int)selinux_mkload_policy(arg1); -+ { -+ result = (int)selinux_mkload_policy(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -5465,13 +5679,19 @@ - SWIGINTERN PyObject *_wrap_selinux_init_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int *arg1 = (int *) 0 ; -- int result; - int temp1 ; - int res1 = SWIG_TMPOBJ ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":selinux_init_load_policy")) SWIG_fail; -- result = (int)selinux_init_load_policy(arg1); +- arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ arg1 = (char *)(buf1); + { -+ result = (int)selinux_init_load_policy(arg1); ++ result = (int)getfilecon_raw((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create_raw" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_create_raw(arg1,arg2,arg3,arg4); resultobj = SWIG_From_int((int)(result)); - if (SWIG_IsTmpObj(res1)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); -@@ -5527,10 +5747,10 @@ - SWIGINTERN PyObject *_wrap_SELboolean_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SELboolean *arg1 = (SELboolean *) 0 ; -- char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_name_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); -@@ -5569,7 +5789,6 @@ - } - arg2 = (int)(val2); - if (arg1) (arg1)->value = arg2; -- - resultobj = SWIG_Py_Void(); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: -@@ -5580,10 +5799,10 @@ - SWIGINTERN PyObject *_wrap_SELboolean_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_relabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_lgetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - SELboolean *arg1 = (SELboolean *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_value_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); -@@ -5626,7 +5845,6 @@ +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (SELboolean *)(argp1); - free((char *) arg1); -- - resultobj = SWIG_Py_Void(); - return resultobj; - fail: -@@ -5646,7 +5864,6 @@ - size_t arg1 ; - SELboolean *arg2 = (SELboolean *) 0 ; - int arg3 ; -- int result; - size_t val1 ; - int ecode1 = 0 ; - void *argp2 = 0 ; -@@ -5656,6 +5873,7 @@ - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:security_set_boolean_list",&obj0,&obj1,&obj2)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); -@@ -5673,7 +5891,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_set_boolean_list" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); -- result = (int)security_set_boolean_list(arg1,arg2,arg3); +- arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel" "', argument " "2"" of type '" "security_context_t""'"); ++ arg1 = (char *)(buf1); + { -+ result = (int)security_set_boolean_list(arg1,arg2,arg3); ++ result = (int)lgetfilecon((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_relabel(arg1,arg2,arg3,arg4); resultobj = SWIG_From_int((int)(result)); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: -@@ -5684,11 +5908,11 @@ - SWIGINTERN PyObject *_wrap_security_load_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_relabel_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_lgetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:security_load_booleans",&obj0)) SWIG_fail; +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel_raw",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon_raw",&obj0)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -5696,7 +5920,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_load_booleans" "', argument " "1"" of type '" "char *""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lgetfilecon_raw" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (char *)(buf1); -- result = (int)security_load_booleans(arg1); +- arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ arg1 = (char *)(buf1); + { -+ result = (int)security_load_booleans(arg1); ++ result = (int)lgetfilecon_raw((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel_raw" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_relabel_raw(arg1,arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -5709,11 +5939,11 @@ - SWIGINTERN PyObject *_wrap_security_check_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_fgetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; ++ int arg1 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int val1 ; ++ int ecode1 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:security_check_context",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -5721,7 +5951,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context" "', argument " "1"" of type '" "security_context_t""'"); +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member" "', argument " "1"" of type '" "security_context_t""'"); ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); ++ { ++ result = (int)fgetfilecon(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } } - arg1 = (security_context_t)(buf1); -- result = (int)security_check_context(arg1); +- arg1 = (security_context_t)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member" "', argument " "2"" of type '" "security_context_t""'"); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } +- arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member" "', argument " "3"" of type '" "security_class_t""'"); ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_fgetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ int arg1 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int val1 ; ++ int ecode1 = 0 ; ++ security_context_t temp2 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; ++ ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon_raw",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fgetfilecon_raw" "', argument " "1"" of type '" "int""'"); + } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_member(arg1,arg2,arg3,arg4); ++ arg1 = (int)(val1); + { -+ result = (int)security_check_context(arg1); ++ result = (int)fgetfilecon_raw(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + } resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -5734,11 +5970,11 @@ - SWIGINTERN PyObject *_wrap_security_check_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_member_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; ++ char *arg1 = (char *) 0 ; + security_context_t arg2 = (security_context_t) 0 ; +- security_class_t arg3 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; +- unsigned short val3 ; +- int ecode3 = 0 ; +- security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:security_check_context_raw",&obj0)) SWIG_fail; +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member_raw",&obj0,&obj1,&obj2)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -5746,7 +5982,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context_raw" "', argument " "1"" of type '" "security_context_t""'"); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfilecon" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)security_check_context_raw(arg1); +- arg1 = (security_context_t)(buf1); ++ arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon" "', argument " "2"" of type '" "security_context_t""'"); + } + arg2 = (security_context_t)(buf2); +- ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member_raw" "', argument " "3"" of type '" "security_class_t""'"); +- } +- arg3 = (security_class_t)(val3); +- result = (int)security_compute_member_raw(arg1,arg2,arg3,arg4); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + { -+ result = (int)security_check_context_raw(arg1); ++ result = (int)setfilecon((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } - resultobj = SWIG_From_int((int)(result)); + } ++ resultobj = SWIG_From_int((int)(result)); if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -5760,12 +6002,12 @@ +@@ -5209,220 +5756,239 @@ + } + + +-SWIGINTERN PyObject *_wrap_security_compute_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_setfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- char *arg2 = (char *) 0 ; +- security_context_t **arg3 = (security_context_t **) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; +- security_context_t *temp3 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context",&obj0)) SWIG_fail; -@@ -5774,7 +6016,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context" "', argument " "1"" of type '" "security_context_t""'"); +- { +- arg3 = &temp3; +- } +- if (!PyArg_ParseTuple(args,(char *)"OO:security_compute_user",&obj0,&obj1)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon_raw",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_user" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setfilecon_raw" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)security_canonicalize_context(arg1,arg2); -+ { -+ result = (int)security_canonicalize_context(arg1,arg2); +- arg1 = (security_context_t)(buf1); ++ arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user" "', argument " "2"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); + } +- arg2 = (char *)(buf2); +- result = (int)security_compute_user(arg1,(char const *)arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); ++ arg2 = (security_context_t)(buf2); + { +- PyObject* plist; +- int i, len = 0; +- +- if (*arg3) { +- while((*arg3)[len]) +- len++; +- plist = PyList_New(len); +- for (i = 0; i < len; i++) { +- PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); +- } +- } else { +- plist = PyList_New(0); ++ result = (int)setfilecon_raw((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -5796,12 +6044,12 @@ + } +- +- resultobj = SWIG_Python_AppendOutput(resultobj, plist); + } ++ resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); +- } + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); +- } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_compute_user_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_lsetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- char *arg2 = (char *) 0 ; +- security_context_t **arg3 = (security_context_t **) 0 ; - int result; ++ char *arg1 = (char *) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; +- security_context_t *temp3 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context_raw",&obj0)) SWIG_fail; -@@ -5810,7 +6058,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context_raw" "', argument " "1"" of type '" "security_context_t""'"); +- { +- arg3 = &temp3; +- } +- if (!PyArg_ParseTuple(args,(char *)"OO:security_compute_user_raw",&obj0,&obj1)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_user_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lsetfilecon" "', argument " "1"" of type '" "char const *""'"); } - arg1 = (security_context_t)(buf1); -- result = (int)security_canonicalize_context_raw(arg1,arg2); -+ { -+ result = (int)security_canonicalize_context_raw(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -5833,7 +6087,13 @@ - int result; - - if (!PyArg_ParseTuple(args,(char *)":security_getenforce")) SWIG_fail; -- result = (int)security_getenforce(); -+ { -+ result = (int)security_getenforce(); +- arg1 = (security_context_t)(buf1); ++ arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user_raw" "', argument " "2"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); + } +- arg2 = (char *)(buf2); +- result = (int)security_compute_user_raw(arg1,(char const *)arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); ++ arg2 = (security_context_t)(buf2); + { +- PyObject* plist; +- int i, len = 0; +- +- if (*arg3) { +- while((*arg3)[len]) +- len++; +- plist = PyList_New(len); +- for (i = 0; i < len; i++) { +- PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); +- } +- } else { +- plist = PyList_New(0); ++ result = (int)lsetfilecon((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); + } +- +- resultobj = SWIG_Python_AppendOutput(resultobj, plist); + } ++ resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); +- } return resultobj; fail: -@@ -5844,10 +6104,10 @@ - SWIGINTERN PyObject *_wrap_security_setenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); +- } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_lsetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - int arg1 ; +- void *arg1 = (void *) 0 ; +- size_t arg2 ; - int result; - int val1 ; - int ecode1 = 0 ; ++ char *arg1 = (char *) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; + int res1 ; +- size_t val2 ; +- int ecode2 = 0 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:security_setenforce",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_int(obj0, &val1); -@@ -5855,7 +6115,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_setenforce" "', argument " "1"" of type '" "int""'"); - } - arg1 = (int)(val1); -- result = (int)security_setenforce(arg1); -+ { -+ result = (int)security_setenforce(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } +- if (!PyArg_ParseTuple(args,(char *)"OO:security_load_policy",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); ++ if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon_raw",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_load_policy" "', argument " "1"" of type '" "void *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lsetfilecon_raw" "', argument " "1"" of type '" "char const *""'"); + } - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -5868,7 +6134,13 @@ - int result; - - if (!PyArg_ParseTuple(args,(char *)":security_disable")) SWIG_fail; -- result = (int)security_disable(); -+ { -+ result = (int)security_disable(); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ arg1 = (char *)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -5881,7 +6153,13 @@ - int result; - - if (!PyArg_ParseTuple(args,(char *)":security_policyvers")) SWIG_fail; -- result = (int)security_policyvers(); ++ arg2 = (security_context_t)(buf2); + { -+ result = (int)security_policyvers(); ++ result = (int)lsetfilecon_raw((char const *)arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- ecode2 = SWIG_AsVal_size_t(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_load_policy" "', argument " "2"" of type '" "size_t""'"); +- } +- arg2 = (size_t)(val2); +- result = (int)security_load_policy(arg1,arg2); resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; fail: -@@ -5893,16 +6171,22 @@ ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_get_initial_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_fsetfilecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char ***arg1 = (char ***) 0 ; - int *arg2 = (int *) 0 ; +- char *arg1 = (char *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - char **temp11 ; - int temp21 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; ++ int arg1 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ int val1 ; ++ int ecode1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - { - arg1 = &temp11; - arg2 = &temp21; - } - if (!PyArg_ParseTuple(args,(char *)":security_get_boolean_names")) SWIG_fail; -- result = (int)security_get_boolean_names(arg1,arg2); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context" "', argument " "1"" of type '" "char const *""'"); ++ if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon",&obj0,&obj1)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fsetfilecon" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon" "', argument " "2"" of type '" "security_context_t""'"); ++ } ++ arg2 = (security_context_t)(buf2); + { -+ result = (int)security_get_boolean_names(arg1,arg2); ++ result = (int)fsetfilecon(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg1 = (char *)(buf1); +- result = (int)security_get_initial_context((char const *)arg1,arg2); resultobj = SWIG_From_int((int)(result)); - { - PyObject* list = PyList_New(*arg2); -@@ -5939,11 +6223,11 @@ - SWIGINTERN PyObject *_wrap_security_get_boolean_pending(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ return resultobj; ++fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_fsetfilecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ int arg1 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ int val1 ; ++ int ecode1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; - - if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_pending",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -5951,7 +6235,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_pending" "', argument " "1"" of type '" "char const *""'"); ++ ++ if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon_raw",&obj0,&obj1)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fsetfilecon_raw" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fsetfilecon_raw" "', argument " "2"" of type '" "security_context_t""'"); } - arg1 = (char *)(buf1); -- result = (int)security_get_boolean_pending((char const *)arg1); +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg2 = (security_context_t)(buf2); + { -+ result = (int)security_get_boolean_pending((char const *)arg1); ++ result = (int)fsetfilecon_raw(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); return resultobj; -@@ -5964,11 +6254,11 @@ - SWIGINTERN PyObject *_wrap_security_get_boolean_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_get_initial_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getpeercon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; +- char *arg1 = (char *) 0 ; ++ int arg1 ; + security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ int val1 ; ++ int ecode1 = 0 ; + security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_active",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -5976,7 +6266,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_active" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); -- result = (int)security_get_boolean_active((char const *)arg1); + arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context_raw" "', argument " "1"" of type '" "char const *""'"); ++ if (!PyArg_ParseTuple(args,(char *)"O:getpeercon",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); + { -+ result = (int)security_get_boolean_active((char const *)arg1); ++ result = (int)getpeercon(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- arg1 = (char *)(buf1); +- result = (int)security_get_initial_context_raw((char const *)arg1,arg2); resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +@@ -5432,144 +5998,126 @@ + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; -@@ -5990,7 +6286,6 @@ + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_mkload_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getpeercon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int arg2 ; + int arg1 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -5998,6 +6293,7 @@ - int ecode2 = 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; + int val1 ; + int ecode1 = 0 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:security_set_boolean",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -6010,7 +6306,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_set_boolean" "', argument " "2"" of type '" "int""'"); +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_mkload_policy",&obj0)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:getpeercon_raw",&obj0)) SWIG_fail; + ecode1 = SWIG_AsVal_int(obj0, &val1); + if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_mkload_policy" "', argument " "1"" of type '" "int""'"); ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "getpeercon_raw" "', argument " "1"" of type '" "int""'"); } - arg2 = (int)(val2); -- result = (int)security_set_boolean((char const *)arg1,arg2); + arg1 = (int)(val1); +- result = (int)selinux_mkload_policy(arg1); + { -+ result = (int)security_set_boolean((char const *)arg1,arg2); ++ result = (int)getpeercon_raw(arg1,arg2); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + } resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -@@ -6025,7 +6327,13 @@ - int result; - - if (!PyArg_ParseTuple(args,(char *)":security_commit_booleans")) SWIG_fail; -- result = (int)security_commit_booleans(); -+ { -+ result = (int)security_commit_booleans(); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } - resultobj = SWIG_From_int((int)(result)); return resultobj; fail: -@@ -6074,10 +6382,10 @@ - SWIGINTERN PyObject *_wrap_security_class_mapping_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_init_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_allowed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- int *arg1 = (int *) 0 ; +- int result; +- int temp1 ; +- int res1 = SWIG_TMPOBJ ; +- +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":selinux_init_load_policy")) SWIG_fail; +- result = (int)selinux_init_load_policy(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (SWIG_IsTmpObj(res1)) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); +- } else { +- int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags)); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_SELboolean_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- SELboolean *arg1 = (SELboolean *) 0 ; +- char *arg2 = (char *) 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ access_vector_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"OO:SELboolean_name_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_allowed_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_name_set" "', argument " "1"" of type '" "SELboolean *""'"); +- } +- arg1 = (SELboolean *)(argp1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SELboolean_name_set" "', argument " "2"" of type '" "char *""'"); +- } +- arg2 = (char *)(buf2); +- if (arg1->name) free((char*)arg1->name); +- if (arg2) { +- size_t size = strlen((const char *)(arg2)) + 1; +- arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); +- } else { +- arg1->name = 0; ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_allowed_set" "', argument " "1"" of type '" "struct av_decision *""'"); + } ++ arg1 = (struct av_decision *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_allowed_set" "', argument " "2"" of type '" "access_vector_t""'"); ++ } ++ arg2 = (access_vector_t)(val2); ++ if (arg1) (arg1)->allowed = arg2; + resultobj = SWIG_Py_Void(); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_SELboolean_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_allowed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- SELboolean *arg1 = (SELboolean *) 0 ; +- char *result = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; ++ access_vector_t result; + +- if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_name_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:av_decision_allowed_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_name_get" "', argument " "1"" of type '" "SELboolean *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_allowed_get" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (SELboolean *)(argp1); +- result = (char *) ((arg1)->name); +- resultobj = SWIG_FromCharPtr((const char *)result); ++ arg1 = (struct av_decision *)(argp1); ++ result = (access_vector_t) ((arg1)->allowed); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_SELboolean_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_decided_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- SELboolean *arg1 = (SELboolean *) 0 ; +- int arg2 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ access_vector_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; +- int val2 ; ++ unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"OO:SELboolean_value_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_decided_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_value_set" "', argument " "1"" of type '" "SELboolean *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_decided_set" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (SELboolean *)(argp1); +- ecode2 = SWIG_AsVal_int(obj1, &val2); ++ arg1 = (struct av_decision *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SELboolean_value_set" "', argument " "2"" of type '" "int""'"); ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_decided_set" "', argument " "2"" of type '" "access_vector_t""'"); + } +- arg2 = (int)(val2); +- if (arg1) (arg1)->value = arg2; +- ++ arg2 = (access_vector_t)(val2); ++ if (arg1) (arg1)->decided = arg2; + resultobj = SWIG_Py_Void(); + return resultobj; + fail: +@@ -5577,285 +6125,270 @@ + } + + +-SWIGINTERN PyObject *_wrap_SELboolean_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_decided_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- SELboolean *arg1 = (SELboolean *) 0 ; +- int result; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; ++ access_vector_t result; + +- if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_value_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:av_decision_decided_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_value_get" "', argument " "1"" of type '" "SELboolean *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_decided_get" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (SELboolean *)(argp1); +- result = (int) ((arg1)->value); +- resultobj = SWIG_From_int((int)(result)); ++ arg1 = (struct av_decision *)(argp1); ++ result = (access_vector_t) ((arg1)->decided); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_new_SELboolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_auditallow_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- SELboolean *result = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ access_vector_t arg2 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)":new_SELboolean")) SWIG_fail; +- result = (SELboolean *)calloc(1, sizeof(SELboolean)); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SELboolean, SWIG_POINTER_NEW | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_auditallow_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditallow_set" "', argument " "1"" of type '" "struct av_decision *""'"); ++ } ++ arg1 = (struct av_decision *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_auditallow_set" "', argument " "2"" of type '" "access_vector_t""'"); ++ } ++ arg2 = (access_vector_t)(val2); ++ if (arg1) (arg1)->auditallow = arg2; ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_delete_SELboolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_auditallow_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- SELboolean *arg1 = (SELboolean *) 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; ++ access_vector_t result; + +- if (!PyArg_ParseTuple(args,(char *)"O:delete_SELboolean",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, SWIG_POINTER_DISOWN | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditallow_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SELboolean" "', argument " "1"" of type '" "SELboolean *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditallow_get" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (SELboolean *)(argp1); +- free((char *) arg1); +- +- resultobj = SWIG_Py_Void(); ++ arg1 = (struct av_decision *)(argp1); ++ result = (access_vector_t) ((arg1)->auditallow); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *SELboolean_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_SELboolean, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_security_set_boolean_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_auditdeny_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- size_t arg1 ; +- SELboolean *arg2 = (SELboolean *) 0 ; +- int arg3 ; +- int result; +- size_t val1 ; +- int ecode1 = 0 ; +- void *argp2 = 0 ; +- int res2 = 0 ; +- int val3 ; +- int ecode3 = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ access_vector_t arg2 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"OOO:security_set_boolean_list",&obj0,&obj1,&obj2)) SWIG_fail; +- ecode1 = SWIG_AsVal_size_t(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_set_boolean_list" "', argument " "1"" of type '" "size_t""'"); +- } +- arg1 = (size_t)(val1); +- res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SELboolean, 0 | 0 ); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_set_boolean_list" "', argument " "2"" of type '" "SELboolean *""'"); ++ if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_auditdeny_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditdeny_set" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg2 = (SELboolean *)(argp2); +- ecode3 = SWIG_AsVal_int(obj2, &val3); +- if (!SWIG_IsOK(ecode3)) { +- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_set_boolean_list" "', argument " "3"" of type '" "int""'"); ++ arg1 = (struct av_decision *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_auditdeny_set" "', argument " "2"" of type '" "access_vector_t""'"); + } +- arg3 = (int)(val3); +- result = (int)security_set_boolean_list(arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); ++ arg2 = (access_vector_t)(val2); ++ if (arg1) (arg1)->auditdeny = arg2; ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_load_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_auditdeny_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; ++ access_vector_t result; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_load_booleans",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditdeny_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_load_booleans" "', argument " "1"" of type '" "char *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_auditdeny_get" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (char *)(buf1); +- result = (int)security_load_booleans(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (struct av_decision *)(argp1); ++ result = (access_vector_t) ((arg1)->auditdeny); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_check_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_seqno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ unsigned int arg2 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_check_context",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:av_decision_seqno_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_seqno_set" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (security_context_t)(buf1); +- result = (int)security_check_context(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (struct av_decision *)(argp1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "av_decision_seqno_set" "', argument " "2"" of type '" "unsigned int""'"); ++ } ++ arg2 = (unsigned int)(val2); ++ if (arg1) (arg1)->seqno = arg2; ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_check_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_av_decision_seqno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; ++ unsigned int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_check_context_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:av_decision_seqno_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "av_decision_seqno_get" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- arg1 = (security_context_t)(buf1); +- result = (int)security_check_context_raw(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (struct av_decision *)(argp1); ++ result = (unsigned int) ((arg1)->seqno); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_canonicalize_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_new_av_decision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; +- PyObject * obj0 = 0 ; ++ struct av_decision *result = 0 ; + +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); +- result = (int)security_canonicalize_context(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (!PyArg_ParseTuple(args,(char *)":new_av_decision")) SWIG_fail; ++ result = (struct av_decision *)calloc(1, sizeof(struct av_decision)); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_av_decision, SWIG_POINTER_NEW | 0 ); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_canonicalize_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_delete_av_decision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; ++ struct av_decision *arg1 = (struct av_decision *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; + +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:delete_av_decision",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context_raw" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); +- result = (int)security_canonicalize_context_raw(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_av_decision" "', argument " "1"" of type '" "struct av_decision *""'"); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (struct av_decision *)(argp1); ++ free((char *) arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_getenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *av_decision_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *obj; ++ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; ++ SWIG_TypeNewClientData(SWIGTYPE_p_av_decision, SWIG_NewClientData(obj)); ++ return SWIG_Py_Void(); ++} ++ ++SWIGINTERN PyObject *_wrap_selinux_opt_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int result; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ int arg2 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int val2 ; ++ int ecode2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)":security_getenforce")) SWIG_fail; +- result = (int)security_getenforce(); +- resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_opt_type_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_type_set" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ } ++ arg1 = (struct selinux_opt *)(argp1); ++ ecode2 = SWIG_AsVal_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "selinux_opt_type_set" "', argument " "2"" of type '" "int""'"); ++ } ++ arg2 = (int)(val2); ++ if (arg1) (arg1)->type = arg2; ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_setenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_opt_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int arg1 ; +- int result; +- int val1 ; +- int ecode1 = 0 ; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_setenforce",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_setenforce" "', argument " "1"" of type '" "int""'"); +- } +- arg1 = (int)(val1); +- result = (int)security_setenforce(arg1); ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_type_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_type_get" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ } ++ arg1 = (struct selinux_opt *)(argp1); ++ result = (int) ((arg1)->type); + resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: +@@ -5863,1618 +6396,615 @@ + } + + +-SWIGINTERN PyObject *_wrap_security_disable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_opt_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int result; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)":security_disable")) SWIG_fail; +- result = (int)security_disable(); +- resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_opt_value_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_value_set" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ } ++ arg1 = (struct selinux_opt *)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_opt_value_set" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); ++ if (arg2) { ++ size_t size = strlen((const char *)((const char *)(arg2))) + 1; ++ arg1->value = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); ++ } else { ++ arg1->value = 0; ++ } ++ resultobj = SWIG_Py_Void(); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_policyvers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_opt_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- int result; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ PyObject * obj0 = 0 ; ++ char *result = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)":security_policyvers")) SWIG_fail; +- result = (int)security_policyvers(); +- resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_value_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_opt_value_get" "', argument " "1"" of type '" "struct selinux_opt *""'"); ++ } ++ arg1 = (struct selinux_opt *)(argp1); ++ result = (char *) ((arg1)->value); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_get_boolean_names(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_new_selinux_opt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char ***arg1 = (char ***) 0 ; +- int *arg2 = (int *) 0 ; +- int result; +- char **temp11 ; +- int temp21 ; ++ struct selinux_opt *result = 0 ; + +- { +- arg1 = &temp11; +- arg2 = &temp21; +- } +- if (!PyArg_ParseTuple(args,(char *)":security_get_boolean_names")) SWIG_fail; +- result = (int)security_get_boolean_names(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- { +- PyObject* list = PyList_New(*arg2); +- int i; +- for (i = 0; i < *arg2; i++) { +- PyList_SetItem(list, i, PyString_FromString((*arg1)[i])); +- } +- resultobj = SWIG_Python_AppendOutput(resultobj, list); +- } +- { +- int i; +- if (*arg1) { +- for (i = 0; i < *arg2; i++) { +- free((*arg1)[i]); +- } +- free(*arg1); +- } +- } ++ if (!PyArg_ParseTuple(args,(char *)":new_selinux_opt")) SWIG_fail; ++ result = (struct selinux_opt *)calloc(1, sizeof(struct selinux_opt)); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_opt, SWIG_POINTER_NEW | 0 ); + return resultobj; + fail: +- { +- int i; +- if (*arg1) { +- for (i = 0; i < *arg2; i++) { +- free((*arg1)[i]); +- } +- free(*arg1); +- } +- } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_get_boolean_pending(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_delete_selinux_opt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; ++ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; + PyObject * obj0 = 0 ; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_pending",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:delete_selinux_opt",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_pending" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_selinux_opt" "', argument " "1"" of type '" "struct selinux_opt *""'"); + } +- arg1 = (char *)(buf1); +- result = (int)security_get_boolean_pending((char const *)arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (struct selinux_opt *)(argp1); ++ free((char *) arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_get_boolean_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *selinux_opt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *obj; ++ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; ++ SWIG_TypeNewClientData(SWIGTYPE_p_selinux_opt, SWIG_NewClientData(obj)); ++ return SWIG_Py_Void(); ++} ++ ++SWIGINTERN PyObject *_wrap_security_compute_av(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ access_vector_t arg4 ; ++ struct av_decision *arg5 = (struct av_decision *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ unsigned int val4 ; ++ int ecode4 = 0 ; ++ void *argp5 = 0 ; ++ int res5 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; ++ PyObject * obj4 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_active",&obj0)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_active" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av" "', argument " "2"" of type '" "security_context_t""'"); ++ } ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av" "', argument " "4"" of type '" "access_vector_t""'"); ++ } ++ arg4 = (access_vector_t)(val4); ++ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!SWIG_IsOK(res5)) { ++ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av" "', argument " "5"" of type '" "struct av_decision *""'"); ++ } ++ arg5 = (struct av_decision *)(argp5); ++ { ++ result = (int)security_compute_av(arg1,arg2,arg3,arg4,arg5); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (char *)(buf1); +- result = (int)security_get_boolean_active((char const *)arg1); + resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_set_boolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_av_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int arg2 ; +- int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ access_vector_t arg4 ; ++ struct av_decision *arg5 = (struct av_decision *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- int val2 ; +- int ecode2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ unsigned int val4 ; ++ int ecode4 = 0 ; ++ void *argp5 = 0 ; ++ int res5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; ++ PyObject * obj4 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:security_set_boolean",&obj0,&obj1)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av_raw",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_set_boolean" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_av_raw" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (char *)(buf1); +- ecode2 = SWIG_AsVal_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_set_boolean" "', argument " "2"" of type '" "int""'"); ++ arg1 = (security_context_t)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_av_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ } ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_av_raw" "', argument " "3"" of type '" "security_class_t""'"); + } +- arg2 = (int)(val2); +- result = (int)security_set_boolean((char const *)arg1,arg2); ++ arg3 = (security_class_t)(val3); ++ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); ++ if (!SWIG_IsOK(ecode4)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "security_compute_av_raw" "', argument " "4"" of type '" "access_vector_t""'"); ++ } ++ arg4 = (access_vector_t)(val4); ++ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_av_decision, 0 | 0 ); ++ if (!SWIG_IsOK(res5)) { ++ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "security_compute_av_raw" "', argument " "5"" of type '" "struct av_decision *""'"); ++ } ++ arg5 = (struct av_decision *)(argp5); ++ { ++ result = (int)security_compute_av_raw(arg1,arg2,arg3,arg4,arg5); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_commit_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; + +- if (!PyArg_ParseTuple(args,(char *)":security_commit_booleans")) SWIG_fail; +- result = (int)security_commit_booleans(); ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create" "', argument " "2"" of type '" "security_context_t""'"); ++ } ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ { ++ result = (int)security_compute_create(arg1,arg2,arg3,arg4); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_class_mapping_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_create_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- char *arg2 = (char *) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)"OO:security_class_mapping_name_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create_raw",&obj0,&obj1,&obj2)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_name_set" "', argument " "1"" of type '" "struct security_class_mapping *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_create_raw" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (struct security_class_mapping *)(argp1); ++ arg1 = (security_context_t)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_class_mapping_name_set" "', argument " "2"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_create_raw" "', argument " "2"" of type '" "security_context_t""'"); + } +- arg2 = (char *)(buf2); +- if (arg2) { +- size_t size = strlen((const char *)((const char *)(arg2))) + 1; +- arg1->name = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); +- } else { +- arg1->name = 0; ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_create_raw" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ { ++ result = (int)security_compute_create_raw(arg1,arg2,arg3,arg4); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- resultobj = SWIG_Py_Void(); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_security_class_mapping_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- char *result = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_name_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_name_get" "', argument " "1"" of type '" "struct security_class_mapping *""'"); +- } +- arg1 = (struct security_class_mapping *)(argp1); +- result = (char *) ((arg1)->name); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_security_class_mapping_perms_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- char **arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- void *argp2 = 0 ; +- int res2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OO:security_class_mapping_perms_set",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_perms_set" "', argument " "1"" of type '" "struct security_class_mapping *""'"); +- } +- arg1 = (struct security_class_mapping *)(argp1); +- res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 | 0 ); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_class_mapping_perms_set" "', argument " "2"" of type '" "char const *[sizeof(access_vector_t)*8+1]""'"); +- } +- arg2 = (char **)(argp2); +- { +- if (arg2) { +- size_t ii = 0; +- for (; ii < (size_t)sizeof(access_vector_t)*8+1; ++ii) arg1->perms[ii] = arg2[ii]; +- } else { +- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""perms""' of type '""char const *[sizeof(access_vector_t)*8+1]""'"); +- } +- } +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_security_class_mapping_perms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- char **result = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_perms_get",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_perms_get" "', argument " "1"" of type '" "struct security_class_mapping *""'"); +- } +- arg1 = (struct security_class_mapping *)(argp1); +- result = (char **)(char **) ((arg1)->perms); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 ); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_new_security_class_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":new_security_class_mapping")) SWIG_fail; +- result = (struct security_class_mapping *)calloc(1, sizeof(struct security_class_mapping)); +- resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_class_mapping, SWIG_POINTER_NEW | 0 ); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_delete_security_class_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:delete_security_class_mapping",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, SWIG_POINTER_DISOWN | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_security_class_mapping" "', argument " "1"" of type '" "struct security_class_mapping *""'"); +- } +- arg1 = (struct security_class_mapping *)(argp1); +- free((char *) arg1); +- +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *security_class_mapping_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_security_class_mapping, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_selinux_set_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; +- int result; +- void *argp1 = 0 ; +- int res1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_set_mapping",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_set_mapping" "', argument " "1"" of type '" "struct security_class_mapping *""'"); +- } +- arg1 = (struct security_class_mapping *)(argp1); +- result = (int)selinux_set_mapping(arg1); +- resultobj = SWIG_From_int((int)(result)); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_string_to_security_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- security_class_t result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:string_to_security_class",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "string_to_security_class" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (security_class_t)string_to_security_class((char const *)arg1); +- resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_security_class_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_class_t arg1 ; +- char *result = 0 ; +- unsigned short val1 ; +- int ecode1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:security_class_to_string",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_class_to_string" "', argument " "1"" of type '" "security_class_t""'"); +- } +- arg1 = (security_class_t)(val1); +- result = (char *)security_class_to_string(arg1); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_security_av_perm_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_class_t arg1 ; +- access_vector_t arg2 ; +- char *result = 0 ; +- unsigned short val1 ; +- int ecode1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OO:security_av_perm_to_string",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_av_perm_to_string" "', argument " "1"" of type '" "security_class_t""'"); +- } +- arg1 = (security_class_t)(val1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_av_perm_to_string" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- result = (char *)security_av_perm_to_string(arg1,arg2); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_string_to_av_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_class_t arg1 ; +- char *arg2 = (char *) 0 ; +- access_vector_t result; +- unsigned short val1 ; +- int ecode1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OO:string_to_av_perm",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "string_to_av_perm" "', argument " "1"" of type '" "security_class_t""'"); +- } +- arg1 = (security_class_t)(val1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "string_to_av_perm" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- result = (access_vector_t)string_to_av_perm(arg1,(char const *)arg2); +- resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- return resultobj; +-fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_security_av_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_class_t arg1 ; +- access_vector_t arg2 ; +- char **arg3 = (char **) 0 ; +- int result; +- unsigned short val1 ; +- int ecode1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- char *temp3 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- arg3 = &temp3; +- if (!PyArg_ParseTuple(args,(char *)"OO:security_av_string",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_av_string" "', argument " "1"" of type '" "security_class_t""'"); +- } +- arg1 = (security_class_t)(val1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_av_string" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- result = (int)security_av_string(arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg3) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); +- free(*arg3); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_print_access_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_class_t arg1 ; +- access_vector_t arg2 ; +- unsigned short val1 ; +- int ecode1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OO:print_access_vector",&obj0,&obj1)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "print_access_vector" "', argument " "1"" of type '" "security_class_t""'"); +- } +- arg1 = (security_class_t)(val1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "print_access_vector" "', argument " "2"" of type '" "access_vector_t""'"); +- } +- arg2 = (access_vector_t)(val2); +- print_access_vector(arg1,arg2); +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_set_matchpathcon_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- unsigned int arg1 ; +- unsigned int val1 ; +- int ecode1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:set_matchpathcon_flags",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_matchpathcon_flags" "', argument " "1"" of type '" "unsigned int""'"); +- } +- arg1 = (unsigned int)(val1); +- set_matchpathcon_flags(arg1); +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_init",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)matchpathcon_init((char const *)arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_init_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- char *arg2 = (char *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_init_prefix",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init_prefix" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matchpathcon_init_prefix" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- result = (int)matchpathcon_init_prefix((char const *)arg1,(char const *)arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_fini(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- +- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_fini")) SWIG_fail; +- matchpathcon_fini(); +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- mode_t arg2 ; +- security_context_t *arg3 = (security_context_t *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- security_context_t temp3 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- arg3 = &temp3; +- if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon" "', argument " "2"" of type '" "mode_t""'"); +- } +- arg2 = (mode_t)(val2); +- result = (int)matchpathcon((char const *)arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg3) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); +- freecon(*arg3); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- mode_t arg2 ; +- security_context_t *arg3 = (security_context_t *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- security_context_t temp3 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- +- arg3 = &temp3; +- if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_index",&obj0,&obj1)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_index" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon_index" "', argument " "2"" of type '" "mode_t""'"); +- } +- arg2 = (mode_t)(val2); +- result = (int)matchpathcon_index((char const *)arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg3) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); +- freecon(*arg3); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_filespec_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- ino_t arg1 ; +- int arg2 ; +- char *arg3 = (char *) 0 ; +- int result; +- void *argp1 ; +- int res1 = 0 ; +- int val2 ; +- int ecode2 = 0 ; +- int res3 ; +- char *buf3 = 0 ; +- int alloc3 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OOO:matchpathcon_filespec_add",&obj0,&obj1,&obj2)) SWIG_fail; +- { +- res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ino_t, 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_filespec_add" "', argument " "1"" of type '" "ino_t""'"); +- } +- if (!argp1) { +- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matchpathcon_filespec_add" "', argument " "1"" of type '" "ino_t""'"); +- } else { +- arg1 = *((ino_t *)(argp1)); +- } +- } +- ecode2 = SWIG_AsVal_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon_filespec_add" "', argument " "2"" of type '" "int""'"); +- } +- arg2 = (int)(val2); +- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); +- if (!SWIG_IsOK(res3)) { +- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "matchpathcon_filespec_add" "', argument " "3"" of type '" "char const *""'"); +- } +- arg3 = (char *)(buf3); +- result = (int)matchpathcon_filespec_add(arg1,arg2,(char const *)arg3); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- return resultobj; +-fail: +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_filespec_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- +- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_filespec_destroy")) SWIG_fail; +- matchpathcon_filespec_destroy(); +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_filespec_eval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- +- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_filespec_eval")) SWIG_fail; +- matchpathcon_filespec_eval(); +- resultobj = SWIG_Py_Void(); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchpathcon_checkmatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_checkmatches",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_checkmatches" "', argument " "1"" of type '" "char *""'"); +- } +- arg1 = (char *)(buf1); +- matchpathcon_checkmatches(arg1); +- resultobj = SWIG_Py_Void(); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_matchmediacon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; +- int result; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; +- PyObject * obj0 = 0 ; +- +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:matchmediacon",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchmediacon" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)matchmediacon((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_getenforcemode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- int *arg1 = (int *) 0 ; +- int result; +- int temp1 ; +- int res1 = SWIG_TMPOBJ ; +- +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":selinux_getenforcemode")) SWIG_fail; +- result = (int)selinux_getenforcemode(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (SWIG_IsTmpObj(res1)) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); +- } else { +- int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags)); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_getpolicytype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char **arg1 = (char **) 0 ; +- int result; +- char *temp1 = 0 ; +- +- arg1 = &temp1; +- if (!PyArg_ParseTuple(args,(char *)":selinux_getpolicytype")) SWIG_fail; +- result = (int)selinux_getpolicytype(arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- free(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_policy_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_policy_root")) SWIG_fail; +- result = (char *)selinux_policy_root(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_binary_policy_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_binary_policy_path")) SWIG_fail; +- result = (char *)selinux_binary_policy_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_failsafe_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_failsafe_context_path")) SWIG_fail; +- result = (char *)selinux_failsafe_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_removable_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_removable_context_path")) SWIG_fail; +- result = (char *)selinux_removable_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_default_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_default_context_path")) SWIG_fail; +- result = (char *)selinux_default_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_user_contexts_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_user_contexts_path")) SWIG_fail; +- result = (char *)selinux_user_contexts_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_file_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; - char *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_name_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); -@@ -6133,10 +6441,10 @@ - SWIGINTERN PyObject *_wrap_security_class_mapping_perms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; -- char **result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ char **result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_perms_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); -@@ -6179,7 +6487,6 @@ - } - arg1 = (struct security_class_mapping *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: -@@ -6194,36 +6501,14 @@ - return SWIG_Py_Void(); - } - --SWIGINTERN PyObject *_wrap_selinux_set_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_path")) SWIG_fail; +- result = (char *)selinux_file_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_file_context_homedir_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; -- int result; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_set_mapping",&obj0)) SWIG_fail; -- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_set_mapping" "', argument " "1"" of type '" "struct security_class_mapping *""'"); -- } -- arg1 = (struct security_class_mapping *)(argp1); -- result = (int)selinux_set_mapping(arg1); -- resultobj = SWIG_From_int((int)(result)); +- if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_homedir_path")) SWIG_fail; +- result = (char *)selinux_file_context_homedir_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - - SWIGINTERN PyObject *_wrap_string_to_security_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; -- security_class_t result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ security_class_t result; - - if (!PyArg_ParseTuple(args,(char *)"O:string_to_security_class",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -6244,10 +6529,10 @@ - SWIGINTERN PyObject *_wrap_security_class_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_class_t arg1 ; +-SWIGINTERN PyObject *_wrap_selinux_file_context_local_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; - char *result = 0 ; - unsigned short val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; -+ char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:security_class_to_string",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); -@@ -6267,13 +6552,13 @@ - PyObject *resultobj = 0; - security_class_t arg1 ; - access_vector_t arg2 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_local_path")) SWIG_fail; +- result = (char *)selinux_file_context_local_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_homedir_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; - char *result = 0 ; - unsigned short val1 ; - int ecode1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:security_av_perm_to_string",&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); -@@ -6298,7 +6583,6 @@ - PyObject *resultobj = 0; - security_class_t arg1 ; - char *arg2 = (char *) 0 ; -- access_vector_t result; - unsigned short val1 ; - int ecode1 = 0 ; - int res2 ; -@@ -6306,6 +6590,7 @@ - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ access_vector_t result; - - if (!PyArg_ParseTuple(args,(char *)"OO:string_to_av_perm",&obj0,&obj1)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); -@@ -6333,7 +6618,6 @@ - security_class_t arg1 ; - access_vector_t arg2 ; - char **arg3 = (char **) 0 ; -- int result; - unsigned short val1 ; - int ecode1 = 0 ; - unsigned int val2 ; -@@ -6341,6 +6625,7 @@ - char *temp3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ int result; - - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:security_av_string",&obj0,&obj1)) SWIG_fail; -@@ -6354,7 +6639,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_av_string" "', argument " "2"" of type '" "access_vector_t""'"); - } - arg2 = (access_vector_t)(val2); -- result = (int)security_av_string(arg1,arg2,arg3); -+ { -+ result = (int)security_av_string(arg1,arg2,arg3); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); -@@ -6370,65 +6661,14 @@ - } - - --SWIGINTERN PyObject *_wrap_print_access_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_homedir_context_path")) SWIG_fail; +- result = (char *)selinux_homedir_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_media_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- security_class_t arg1 ; -- access_vector_t arg2 ; -- unsigned short val1 ; -- int ecode1 = 0 ; -- unsigned int val2 ; -- int ecode2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"OO:print_access_vector",&obj0,&obj1)) SWIG_fail; -- ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); -- if (!SWIG_IsOK(ecode1)) { -- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "print_access_vector" "', argument " "1"" of type '" "security_class_t""'"); -- } -- arg1 = (security_class_t)(val1); -- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); -- if (!SWIG_IsOK(ecode2)) { -- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "print_access_vector" "', argument " "2"" of type '" "access_vector_t""'"); -- } -- arg2 = (access_vector_t)(val2); -- print_access_vector(arg1,arg2); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_media_context_path")) SWIG_fail; +- result = (char *)selinux_media_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - --SWIGINTERN PyObject *_wrap_set_matchpathcon_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_x_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- unsigned int arg1 ; -- unsigned int val1 ; -- int ecode1 = 0 ; -- PyObject * obj0 = 0 ; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"O:set_matchpathcon_flags",&obj0)) SWIG_fail; -- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); -- if (!SWIG_IsOK(ecode1)) { -- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_matchpathcon_flags" "', argument " "1"" of type '" "unsigned int""'"); -- } -- arg1 = (unsigned int)(val1); -- set_matchpathcon_flags(arg1); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_x_context_path")) SWIG_fail; +- result = (char *)selinux_x_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - - SWIGINTERN PyObject *_wrap_matchpathcon_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_init",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -6436,7 +6676,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); -- result = (int)matchpathcon_init((char const *)arg1); -+ { -+ result = (int)matchpathcon_init((char const *)arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -@@ -6450,7 +6696,6 @@ - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -6459,6 +6704,7 @@ - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_init_prefix",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -6471,7 +6717,13 @@ - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matchpathcon_init_prefix" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); -- result = (int)matchpathcon_init_prefix((char const *)arg1,(char const *)arg2); -+ { -+ result = (int)matchpathcon_init_prefix((char const *)arg1,(char const *)arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -6483,24 +6735,11 @@ - } - - --SWIGINTERN PyObject *_wrap_matchpathcon_fini(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_contexts_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_contexts_path")) SWIG_fail; +- result = (char *)selinux_contexts_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_securetty_types_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_securetty_types_path")) SWIG_fail; +- result = (char *)selinux_securetty_types_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_booleans_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_booleans_path")) SWIG_fail; +- result = (char *)selinux_booleans_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_customizable_types_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_customizable_types_path")) SWIG_fail; +- result = (char *)selinux_customizable_types_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_users_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_users_path")) SWIG_fail; +- result = (char *)selinux_users_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_usersconf_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- char *result = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)":selinux_usersconf_path")) SWIG_fail; +- result = (char *)selinux_usersconf_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_translations_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_fini")) SWIG_fail; -- matchpathcon_fini(); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_translations_path")) SWIG_fail; +- result = (char *)selinux_translations_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - - SWIGINTERN PyObject *_wrap_matchpathcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - mode_t arg2 ; - security_context_t *arg3 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -6509,6 +6748,7 @@ - security_context_t temp3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ int result; - - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon",&obj0,&obj1)) SWIG_fail; -@@ -6522,7 +6762,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon" "', argument " "2"" of type '" "mode_t""'"); - } - arg2 = (mode_t)(val2); -- result = (int)matchpathcon((char const *)arg1,arg2,arg3); -+ { -+ result = (int)matchpathcon((char const *)arg1,arg2,arg3); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); -@@ -6545,7 +6791,6 @@ - char *arg1 = (char *) 0 ; - mode_t arg2 ; - security_context_t *arg3 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -6554,6 +6799,7 @@ - security_context_t temp3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ int result; - - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_index",&obj0,&obj1)) SWIG_fail; -@@ -6567,7 +6813,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon_index" "', argument " "2"" of type '" "mode_t""'"); - } - arg2 = (mode_t)(val2); -- result = (int)matchpathcon_index((char const *)arg1,arg2,arg3); -+ { -+ result = (int)matchpathcon_index((char const *)arg1,arg2,arg3); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg3) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); -@@ -6590,7 +6842,6 @@ - ino_t arg1 ; - int arg2 ; - char *arg3 = (char *) 0 ; -- int result; - void *argp1 ; - int res1 = 0 ; - int val2 ; -@@ -6601,6 +6852,7 @@ - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:matchpathcon_filespec_add",&obj0,&obj1,&obj2)) SWIG_fail; - { -@@ -6624,7 +6876,13 @@ - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "matchpathcon_filespec_add" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); -- result = (int)matchpathcon_filespec_add(arg1,arg2,(char const *)arg3); -+ { -+ result = (int)matchpathcon_filespec_add(arg1,arg2,(char const *)arg3); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -@@ -6634,64 +6892,16 @@ - } - - --SWIGINTERN PyObject *_wrap_matchpathcon_filespec_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_colors_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_filespec_destroy")) SWIG_fail; -- matchpathcon_filespec_destroy(); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_colors_path")) SWIG_fail; +- result = (char *)selinux_colors_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - --SWIGINTERN PyObject *_wrap_matchpathcon_filespec_eval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_netfilter_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)":matchpathcon_filespec_eval")) SWIG_fail; -- matchpathcon_filespec_eval(); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_netfilter_context_path")) SWIG_fail; +- result = (char *)selinux_netfilter_context_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - --SWIGINTERN PyObject *_wrap_matchpathcon_checkmatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- char *arg1 = (char *) 0 ; -- int res1 ; -- char *buf1 = 0 ; -- int alloc1 = 0 ; -- PyObject * obj0 = 0 ; +- char *result = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_checkmatches",&obj0)) SWIG_fail; -- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_checkmatches" "', argument " "1"" of type '" "char *""'"); -- } -- arg1 = (char *)(buf1); -- matchpathcon_checkmatches(arg1); -- resultobj = SWIG_Py_Void(); -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (!PyArg_ParseTuple(args,(char *)":selinux_path")) SWIG_fail; +- result = (char *)selinux_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - - SWIGINTERN PyObject *_wrap_matchmediacon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:matchmediacon",&obj0)) SWIG_fail; -@@ -6700,7 +6910,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchmediacon" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); -- result = (int)matchmediacon((char const *)arg1,arg2); -+ { -+ result = (int)matchmediacon((char const *)arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -6721,13 +6937,19 @@ - SWIGINTERN PyObject *_wrap_selinux_getenforcemode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int *arg1 = (int *) 0 ; -- int result; - int temp1 ; - int res1 = SWIG_TMPOBJ ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":selinux_getenforcemode")) SWIG_fail; -- result = (int)selinux_getenforcemode(arg1); -+ { -+ result = (int)selinux_getenforcemode(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (SWIG_IsTmpObj(res1)) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); -@@ -6744,12 +6966,18 @@ - SWIGINTERN PyObject *_wrap_selinux_getpolicytype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char **arg1 = (char **) 0 ; -- int result; - char *temp1 = 0 ; -+ int result; - - arg1 = &temp1; - if (!PyArg_ParseTuple(args,(char *)":selinux_getpolicytype")) SWIG_fail; -- result = (int)selinux_getpolicytype(arg1); -+ { -+ result = (int)selinux_getpolicytype(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg1) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); -@@ -6882,6 +7110,19 @@ - } - - -+SWIGINTERN PyObject *_wrap_selinux_file_context_subs_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *result = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_subs_path")) SWIG_fail; -+ result = (char *)selinux_file_context_subs_path(); -+ resultobj = SWIG_FromCharPtr((const char *)result); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_selinux_homedir_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; -@@ -6908,6 +7149,32 @@ - } - - -+SWIGINTERN PyObject *_wrap_selinux_virtual_domain_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *result = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)":selinux_virtual_domain_context_path")) SWIG_fail; -+ result = (char *)selinux_virtual_domain_context_path(); -+ resultobj = SWIG_FromCharPtr((const char *)result); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_selinux_virtual_image_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *result = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)":selinux_virtual_image_context_path")) SWIG_fail; -+ result = (char *)selinux_virtual_image_context_path(); -+ resultobj = SWIG_FromCharPtr((const char *)result); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_selinux_x_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; -@@ -7054,10 +7321,10 @@ - SWIGINTERN PyObject *_wrap_selinux_check_passwd_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - access_vector_t arg1 ; +-SWIGINTERN PyObject *_wrap_selinux_check_passwd_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- access_vector_t arg1 ; - int result; - unsigned int val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_passwd_access",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); -@@ -7065,7 +7332,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_check_passwd_access" "', argument " "1"" of type '" "access_vector_t""'"); - } - arg1 = (access_vector_t)(val1); +- unsigned int val1 ; +- int ecode1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_passwd_access",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_check_passwd_access" "', argument " "1"" of type '" "access_vector_t""'"); +- } +- arg1 = (access_vector_t)(val1); - result = (int)selinux_check_passwd_access(arg1); -+ { -+ result = (int)selinux_check_passwd_access(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -7076,10 +7349,10 @@ - SWIGINTERN PyObject *_wrap_checkPasswdAccess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - access_vector_t arg1 ; +- resultobj = SWIG_From_int((int)(result)); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_checkPasswdAccess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- access_vector_t arg1 ; - int result; - unsigned int val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:checkPasswdAccess",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); -@@ -7087,7 +7360,13 @@ - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "checkPasswdAccess" "', argument " "1"" of type '" "access_vector_t""'"); - } - arg1 = (access_vector_t)(val1); -- result = (int)checkPasswdAccess(arg1); -+ { -+ result = (int)checkPasswdAccess(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -7098,11 +7377,11 @@ - SWIGINTERN PyObject *_wrap_selinux_check_securetty_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- unsigned int val1 ; +- int ecode1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:checkPasswdAccess",&obj0)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "checkPasswdAccess" "', argument " "1"" of type '" "access_vector_t""'"); +- } +- arg1 = (access_vector_t)(val1); +- result = (int)checkPasswdAccess(arg1); +- resultobj = SWIG_From_int((int)(result)); +- return resultobj; +-fail: +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_check_securetty_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_securetty_context",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -7110,32 +7389,14 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_check_securetty_context" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_securetty_context",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_check_securetty_context" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); - result = (int)selinux_check_securetty_context(arg1); - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); @@ -6952,336 +11571,652 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_selinuxmnt" "', argument " "1"" of type '" "char *""'"); -+ { -+ result = (int)selinux_check_securetty_context(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } - } +- } - arg1 = (char *)(buf1); - set_selinuxmnt(arg1); - resultobj = SWIG_Py_Void(); -+ resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; - fail: -@@ -7150,7 +7411,6 @@ - char *arg2 = (char *) 0 ; - char **arg3 ; - char **arg4 ; +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_rpm_execcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- unsigned int arg1 ; +- char *arg2 = (char *) 0 ; +- char **arg3 ; +- char **arg4 ; - int result; - unsigned int val1 ; - int ecode1 = 0 ; - int res2 ; -@@ -7160,6 +7420,7 @@ - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:rpm_execcon",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); -@@ -7226,7 +7487,13 @@ - } - arg4[size] = NULL; - } +- unsigned int val1 ; +- int ecode1 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; +- PyObject * obj3 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"OOOO:rpm_execcon",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; +- ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); +- if (!SWIG_IsOK(ecode1)) { +- SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rpm_execcon" "', argument " "1"" of type '" "unsigned int""'"); +- } +- arg1 = (unsigned int)(val1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rpm_execcon" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- { +- int i, size; +- PyObject * s; +- +- if (!PySequence_Check(obj2)) { +- PyErr_SetString(PyExc_ValueError, "Expected a sequence"); +- return NULL; +- } +- +- size = PySequence_Size(obj2); +- +- arg3 = (char**) malloc(size + 1); +- +- for(i = 0; i < size; i++) { +- if (!PyString_Check(PySequence_GetItem(obj2, i))) { +- PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings"); +- return NULL; +- } +- } +- +- for(i = 0; i < size; i++) { +- s = PySequence_GetItem(obj2, i); +- arg3[i] = (char*) malloc(PyString_Size(s) + 1); +- strcpy(arg3[i], PyString_AsString(s)); +- } +- arg3[size] = NULL; +- } +- { +- int i, size; +- PyObject * s; +- +- if (!PySequence_Check(obj3)) { +- PyErr_SetString(PyExc_ValueError, "Expected a sequence"); +- return NULL; +- } +- +- size = PySequence_Size(obj3); +- +- arg4 = (char**) malloc(size + 1); +- +- for(i = 0; i < size; i++) { +- if (!PyString_Check(PySequence_GetItem(obj3, i))) { +- PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings"); +- return NULL; +- } +- } +- +- for(i = 0; i < size; i++) { +- s = PySequence_GetItem(obj3, i); +- arg4[i] = (char*) malloc(PyString_Size(s) + 1); +- strcpy(arg4[i], PyString_AsString(s)); +- } +- arg4[size] = NULL; +- } - result = (int)rpm_execcon(arg1,(char const *)arg2,(char *const (*))arg3,(char *const (*))arg4); -+ { -+ result = (int)rpm_execcon(arg1,(char const *)arg2,(char *const (*))arg3,(char *const (*))arg4); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - { -@@ -7271,11 +7538,11 @@ - SWIGINTERN PyObject *_wrap_is_context_customizable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; +- resultobj = SWIG_From_int((int)(result)); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- int i = 0; +- while(arg3[i]) { +- free(arg3[i]); +- i++; +- } +- free(arg3); +- } +- { +- int i = 0; +- while(arg4[i]) { +- free(arg4[i]); +- i++; +- } +- free(arg4); +- } +- return resultobj; +-fail: +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- int i = 0; +- while(arg3[i]) { +- free(arg3[i]); +- i++; +- } +- free(arg3); +- } +- { +- int i = 0; +- while(arg4[i]) { +- free(arg4[i]); +- i++; +- } +- free(arg4); +- } +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_is_context_customizable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:is_context_customizable",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -7283,7 +7550,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_context_customizable" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:is_context_customizable",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_context_customizable" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); - result = (int)is_context_customizable(arg1); -+ { -+ result = (int)is_context_customizable(arg1); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -@@ -7297,12 +7570,12 @@ - PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_trans_to_raw_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *resultobj = 0; +- security_context_t arg1 = (security_context_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_context_t temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:selinux_trans_to_raw_context",&obj0)) SWIG_fail; -@@ -7311,7 +7584,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_trans_to_raw_context" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_context_t temp2 = 0 ; +- PyObject * obj0 = 0 ; +- +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_trans_to_raw_context",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_trans_to_raw_context" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); - result = (int)selinux_trans_to_raw_context(arg1,arg2); -+ { -+ result = (int)selinux_trans_to_raw_context(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } -+ } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -7333,12 +7612,12 @@ +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- +-SWIGINTERN PyObject *_wrap_selinux_raw_to_trans_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_relabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; security_context_t arg1 = (security_context_t) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- security_context_t temp2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_to_trans_context",&obj0)) SWIG_fail; -@@ -7347,7 +7626,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_to_trans_context" "', argument " "1"" of type '" "security_context_t""'"); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_to_trans_context",&obj0)) SWIG_fail; ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_to_trans_context" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel" "', argument " "1"" of type '" "security_context_t""'"); } arg1 = (security_context_t)(buf1); - result = (int)selinux_raw_to_trans_context(arg1,arg2); -+ { -+ result = (int)selinux_raw_to_trans_context(arg1,arg2); -+ if (result < 0) { -+ PyErr_SetFromErrno(PyExc_OSError); -+ return NULL; -+ } ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel" "', argument " "2"" of type '" "security_context_t""'"); + } - resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -7369,12 +7654,12 @@ - PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - char **arg2 = (char **) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - char *temp2 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_context_to_color",&obj0)) SWIG_fail; -@@ -7383,7 +7668,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_context_to_color" "', argument " "1"" of type '" "security_context_t""'"); - } - arg1 = (security_context_t)(buf1); -- result = (int)selinux_raw_context_to_color(arg1,arg2); ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); + { -+ result = (int)selinux_raw_context_to_color(arg1,arg2); ++ result = (int)security_compute_relabel(arg1,arg2,arg3,arg4); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + } resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -7406,13 +7697,13 @@ - char *arg1 = (char *) 0 ; - char **arg2 = (char **) 0 ; - char **arg3 = (char **) 0 ; +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_raw_context_to_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_relabel_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + security_context_t arg1 = (security_context_t) 0 ; +- char **arg2 = (char **) 0 ; - int result; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - char *temp2 = 0 ; - char *temp3 = 0 ; +- char *temp2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - arg2 = &temp2; - arg3 = &temp3; -@@ -7422,7 +7713,13 @@ - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuserbyname" "', argument " "1"" of type '" "char const *""'"); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_context_to_color",&obj0)) SWIG_fail; ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel_raw",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_context_to_color" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_relabel_raw" "', argument " "1"" of type '" "security_context_t""'"); } - arg1 = (char *)(buf1); -- result = (int)getseuserbyname((char const *)arg1,arg2,arg3); + arg1 = (security_context_t)(buf1); +- result = (int)selinux_raw_context_to_color(arg1,arg2); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_relabel_raw" "', argument " "2"" of type '" "security_context_t""'"); ++ } ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_relabel_raw" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); + { -+ result = (int)getseuserbyname((char const *)arg1,arg2,arg3); ++ result = (int)security_compute_relabel_raw(arg1,arg2,arg3,arg4); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } + } resultobj = SWIG_From_int((int)(result)); - if (*arg2) { - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); -@@ -7448,11 +7745,75 @@ +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- free(*arg2); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; } -+SWIGINTERN PyObject *_wrap_getseuser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ char **arg3 = (char **) 0 ; -+ char **arg4 = (char **) 0 ; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; +-SWIGINTERN PyObject *_wrap_getseuserbyname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- char **arg2 = (char **) 0 ; +- char **arg3 = (char **) 0 ; +- int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- char *temp2 = 0 ; +- char *temp3 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; -+ char *temp3 = 0 ; -+ char *temp4 = 0 ; -+ PyObject * obj0 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; -+ -+ arg3 = &temp3; + +- arg2 = &temp2; +- arg3 = &temp3; +- if (!PyArg_ParseTuple(args,(char *)"O:getseuserbyname",&obj0)) SWIG_fail; + arg4 = &temp4; -+ if (!PyArg_ParseTuple(args,(char *)"OO:getseuser",&obj0,&obj1)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuser" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuserbyname" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (char *)(buf1); +- result = (int)getseuserbyname((char const *)arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- free(*arg2); ++ arg1 = (security_context_t)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getseuser" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member" "', argument " "2"" of type '" "security_context_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg2 = (security_context_t)(buf2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); + { -+ result = (int)getseuser((char const *)arg1,(char const *)arg2,arg3,arg4); ++ result = (int)security_compute_member(arg1,arg2,arg3,arg4); + if (result < 0) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } -+ } + } +- if (*arg3) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); +- free(*arg3); + resultobj = SWIG_From_int((int)(result)); -+ if (*arg3) { -+ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); -+ free(*arg3); -+ } -+ else { -+ Py_INCREF(Py_None); -+ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -+ } + if (*arg4) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); -+ free(*arg4); -+ } -+ else { -+ Py_INCREF(Py_None); -+ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); -+ } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ freecon(*arg4); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_selinux_file_context_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_file_context_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_member_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) (security_context_t)0 ; - security_context_t arg2 = (security_context_t) (security_context_t)0 ; +- security_context_t arg1 = (security_context_t) (security_context_t)0 ; +- security_context_t arg2 = (security_context_t) (security_context_t)0 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t arg2 = (security_context_t) 0 ; ++ security_class_t arg3 ; ++ security_context_t *arg4 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -7461,6 +7822,7 @@ + int res2 ; + char *buf2 = 0 ; int alloc2 = 0 ; ++ unsigned short val3 ; ++ int ecode3 = 0 ; ++ security_context_t temp4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_cmp",&obj0,&obj1)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_cmp",&obj0,&obj1)) SWIG_fail; ++ arg4 = &temp4; ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member_raw",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -7489,7 +7851,6 @@ + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_file_context_cmp" "', argument " "1"" of type '" "security_context_t const""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_member_raw" "', argument " "1"" of type '" "security_context_t""'"); + } + arg1 = (security_context_t)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_file_context_cmp" "', argument " "2"" of type '" "security_context_t const""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_member_raw" "', argument " "2"" of type '" "security_context_t""'"); + } + arg2 = (security_context_t)(buf2); +- result = (int)selinux_file_context_cmp(arg1,arg2); ++ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_compute_member_raw" "', argument " "3"" of type '" "security_class_t""'"); ++ } ++ arg3 = (security_class_t)(val3); ++ { ++ result = (int)security_compute_member_raw(arg1,arg2,arg3,arg4); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); ++ if (*arg4) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); ++ freecon(*arg4); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; +@@ -7485,239 +7015,250 @@ + } + + +-SWIGINTERN PyObject *_wrap_selinux_file_context_verify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_user(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - mode_t arg2 ; +- char *arg1 = (char *) 0 ; +- mode_t arg2 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ security_context_t **arg3 = (security_context_t **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -7497,6 +7858,7 @@ - int ecode2 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; ++ security_context_t *temp3 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_verify",&obj0,&obj1)) SWIG_fail; +- if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_verify",&obj0,&obj1)) SWIG_fail; ++ { ++ arg3 = &temp3; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_compute_user",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -7522,11 +7884,11 @@ - SWIGINTERN PyObject *_wrap_selinux_lsetfilecon_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_file_context_verify" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_user" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); ++ { ++ result = (int)security_compute_user(arg1,(char const *)arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (char *)(buf1); +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { +- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "selinux_file_context_verify" "', argument " "2"" of type '" "mode_t""'"); +- } +- arg2 = (mode_t)(val2); +- result = (int)selinux_file_context_verify((char const *)arg1,arg2); + resultobj = SWIG_From_int((int)(result)); ++ { ++ PyObject* plist; ++ int i, len = 0; ++ ++ if (*arg3) { ++ while((*arg3)[len]) ++ len++; ++ plist = PyList_New(len); ++ for (i = 0; i < len; i++) { ++ PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); ++ } ++ } else { ++ plist = PyList_New(0); ++ } ++ ++ resultobj = SWIG_Python_AppendOutput(resultobj, plist); ++ } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ if (*arg3) freeconary(*arg3); ++ } + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ if (*arg3) freeconary(*arg3); ++ } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_selinux_lsetfilecon_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_compute_user_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; +- char *arg1 = (char *) 0 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ char *arg2 = (char *) 0 ; ++ security_context_t **arg3 = (security_context_t **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; - - if (!PyArg_ParseTuple(args,(char *)"O:selinux_lsetfilecon_default",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -@@ -7544,171 +7906,15 @@ - } - - +- PyObject * obj0 = 0 ; +- +- if (!PyArg_ParseTuple(args,(char *)"O:selinux_lsetfilecon_default",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_lsetfilecon_default" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)selinux_lsetfilecon_default((char const *)arg1); +- resultobj = SWIG_From_int((int)(result)); +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return resultobj; +-fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- return NULL; +-} +- +- -SWIGINTERN PyObject *_wrap_security_id_ctx_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - struct security_id *arg1 = (struct security_id *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- int res2 ; -- char *buf2 = 0 ; -- int alloc2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; ++ security_context_t *temp3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:security_id_ctx_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ { ++ arg3 = &temp3; ++ } ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_compute_user_raw",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_id_ctx_set" "', argument " "1"" of type '" "struct security_id *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_compute_user_raw" "', argument " "1"" of type '" "security_context_t""'"); + } - arg1 = (struct security_id *)(argp1); -- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -- if (!SWIG_IsOK(res2)) { ++ arg1 = (security_context_t)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_id_ctx_set" "', argument " "2"" of type '" "security_context_t""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_compute_user_raw" "', argument " "2"" of type '" "char const *""'"); + } - arg2 = (security_context_t)(buf2); - if (arg1->ctx) free((char*)arg1->ctx); - if (arg2) { @@ -7289,12 +12224,42 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1->ctx = (security_context_t)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); - } else { - arg1->ctx = 0; -- } ++ arg2 = (char *)(buf2); ++ { ++ result = (int)security_compute_user_raw(arg1,(char const *)arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - resultobj = SWIG_Py_Void(); -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -- return resultobj; --fail: -- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ resultobj = SWIG_From_int((int)(result)); ++ { ++ PyObject* plist; ++ int i, len = 0; ++ ++ if (*arg3) { ++ while((*arg3)[len]) ++ len++; ++ plist = PyList_New(len); ++ for (i = 0; i < len; i++) { ++ PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); ++ } ++ } else { ++ plist = PyList_New(0); ++ } ++ ++ resultobj = SWIG_Python_AppendOutput(resultobj, plist); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ if (*arg3) freeconary(*arg3); ++ } + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - @@ -7311,37 +12276,50 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_id_ctx_get" "', argument " "1"" of type '" "struct security_id *""'"); -- } ++ { ++ if (*arg3) freeconary(*arg3); + } - arg1 = (struct security_id *)(argp1); - result = (security_context_t) ((arg1)->ctx); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: -- return NULL; --} -- -- + return NULL; + } + + -SWIGINTERN PyObject *_wrap_security_id_refcnt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct security_id *arg1 = (struct security_id *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; -- int ecode2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ void *arg1 = (void *) 0 ; ++ size_t arg2 ; ++ int res1 ; ++ size_t val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:security_id_refcnt_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_load_policy",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_id_refcnt_set" "', argument " "1"" of type '" "struct security_id *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_load_policy" "', argument " "1"" of type '" "void *""'"); + } - arg1 = (struct security_id *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); -- if (!SWIG_IsOK(ecode2)) { ++ ecode2 = SWIG_AsVal_size_t(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_id_refcnt_set" "', argument " "2"" of type '" "unsigned int""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_load_policy" "', argument " "2"" of type '" "size_t""'"); + } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->refcnt = arg2; - @@ -7364,7 +12342,14 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_id_refcnt_get" "', argument " "1"" of type '" "struct security_id *""'"); -- } ++ arg2 = (size_t)(val2); ++ { ++ result = (int)security_load_policy(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct security_id *)(argp1); - result = (unsigned int) ((arg1)->refcnt); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); @@ -7381,34 +12366,66 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - if (!PyArg_ParseTuple(args,(char *)":new_security_id")) SWIG_fail; - result = (struct security_id *)calloc(1, sizeof(struct security_id)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_id, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_security_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_get_initial_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct security_id *arg1 = (struct security_id *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_context_t temp2 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_security_id",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res1)) { ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_security_id" "', argument " "1"" of type '" "struct security_id *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct security_id *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (char *)(buf1); ++ { ++ result = (int)security_get_initial_context((char const *)arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *security_id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -7416,114 +12433,405 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - return SWIG_Py_Void(); -} - - SWIGINTERN PyObject *_wrap_avc_sid_to_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_avc_sid_to_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_security_get_initial_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; +- security_id_t arg1 = (security_id_t) 0 ; ++ char *arg1 = (char *) 0 ; security_context_t *arg2 = (security_context_t *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; + int result; arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context",&obj0)) SWIG_fail; -@@ -7737,11 +7943,11 @@ +- if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_sid_to_context" "', argument " "1"" of type '" "security_id_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_initial_context_raw" "', argument " "1"" of type '" "char const *""'"); ++ } ++ arg1 = (char *)(buf1); ++ { ++ result = (int)security_get_initial_context_raw((char const *)arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (security_id_t)(argp1); +- result = (int)avc_sid_to_context(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); + if (*arg2) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +@@ -7727,38 +7268,64 @@ + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_avc_sid_to_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_mkload_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_id_t arg1 = (security_id_t) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; - void *argp1 = 0 ; - int res1 = 0 ; - security_context_t temp2 = 0 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- security_context_t temp2 = 0 ; ++ int arg1 ; ++ int val1 ; ++ int ecode1 = 0 ; PyObject * obj0 = 0 ; + int result; - - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context_raw",&obj0)) SWIG_fail; -@@ -7770,12 +7976,12 @@ + +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context_raw",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); +- if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_sid_to_context_raw" "', argument " "1"" of type '" "security_id_t""'"); ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_mkload_policy",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_mkload_policy" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); ++ { ++ result = (int)selinux_mkload_policy(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg1 = (security_id_t)(argp1); +- result = (int)avc_sid_to_context_raw(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_selinux_init_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ int *arg1 = (int *) 0 ; ++ int temp1 ; ++ int res1 = SWIG_TMPOBJ ; ++ int result; ++ ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":selinux_init_load_policy")) SWIG_fail; ++ { ++ result = (int)selinux_init_load_policy(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ resultobj = SWIG_From_int((int)(result)); ++ if (SWIG_IsTmpObj(res1)) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); ++ } else { ++ int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags)); + } + return resultobj; + fail: +@@ -7766,119 +7333,112 @@ + } + + +-SWIGINTERN PyObject *_wrap_avc_context_to_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_SELboolean_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_id_t *arg2 = (security_id_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_id_t *arg2 = (security_id_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_id_t temp2 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_id_t temp2 ; ++ SELboolean *arg1 = (SELboolean *) 0 ; ++ char *arg2 = (char *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ PyObject * obj1 = 0 ; - { - arg2 = &temp2; -@@ -7808,12 +8014,12 @@ +- { +- arg2 = &temp2; +- } +- if (!PyArg_ParseTuple(args,(char *)"O:avc_context_to_sid",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"OO:SELboolean_name_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_context_to_sid" "', argument " "1"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_name_set" "', argument " "1"" of type '" "SELboolean *""'"); + } +- arg1 = (security_context_t)(buf1); +- result = (int)avc_context_to_sid(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- { +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); +- } else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } ++ arg1 = (SELboolean *)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SELboolean_name_set" "', argument " "2"" of type '" "char *""'"); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg2 = (char *)(buf2); ++ if (arg1->name) free((char*)arg1->name); ++ if (arg2) { ++ size_t size = strlen((const char *)(arg2)) + 1; ++ arg1->name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size)); ++ } else { ++ arg1->name = 0; ++ } ++ resultobj = SWIG_Py_Void(); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_avc_context_to_sid_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_SELboolean_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t arg1 = (security_context_t) 0 ; - security_id_t *arg2 = (security_id_t *) 0 ; +- security_context_t arg1 = (security_context_t) 0 ; +- security_id_t *arg2 = (security_id_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_id_t temp2 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_id_t temp2 ; ++ SELboolean *arg1 = (SELboolean *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ char *result = 0 ; - { - arg2 = &temp2; -@@ -7845,10 +8051,10 @@ - SWIGINTERN PyObject *_wrap_sidget(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- { +- arg2 = &temp2; +- } +- if (!PyArg_ParseTuple(args,(char *)"O:avc_context_to_sid_raw",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_name_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_context_to_sid_raw" "', argument " "1"" of type '" "security_context_t""'"); +- } +- arg1 = (security_context_t)(buf1); +- result = (int)avc_context_to_sid_raw(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- { +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); +- } else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_name_get" "', argument " "1"" of type '" "SELboolean *""'"); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (SELboolean *)(argp1); ++ result = (char *) ((arg1)->name); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_sidget(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_SELboolean_value_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; +- security_id_t arg1 = (security_id_t) 0 ; - int result; ++ SELboolean *arg1 = (SELboolean *) 0 ; ++ int arg2 ; void *argp1 = 0 ; int res1 = 0 ; ++ int val2 ; ++ int ecode2 = 0 ; PyObject * obj0 = 0 ; -+ int result; ++ PyObject * obj1 = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:sidget",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -@@ -7867,10 +8073,10 @@ - SWIGINTERN PyObject *_wrap_sidput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- if (!PyArg_ParseTuple(args,(char *)"O:sidget",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"OO:SELboolean_value_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sidget" "', argument " "1"" of type '" "security_id_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_value_set" "', argument " "1"" of type '" "SELboolean *""'"); + } +- arg1 = (security_id_t)(argp1); +- result = (int)sidget(arg1); +- resultobj = SWIG_From_int((int)(result)); ++ arg1 = (SELboolean *)(argp1); ++ ecode2 = SWIG_AsVal_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SELboolean_value_set" "', argument " "2"" of type '" "int""'"); ++ } ++ arg2 = (int)(val2); ++ if (arg1) (arg1)->value = arg2; ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_sidput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_SELboolean_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; +- security_id_t arg1 = (security_id_t) 0 ; - int result; ++ SELboolean *arg1 = (SELboolean *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:sidput",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -@@ -7890,12 +8096,12 @@ +- if (!PyArg_ParseTuple(args,(char *)"O:sidput",&obj0)) SWIG_fail; +- res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); ++ if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_value_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sidput" "', argument " "1"" of type '" "security_id_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SELboolean_value_get" "', argument " "1"" of type '" "SELboolean *""'"); + } +- arg1 = (security_id_t)(argp1); +- result = (int)sidput(arg1); ++ arg1 = (SELboolean *)(argp1); ++ result = (int) ((arg1)->value); + resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: +@@ -7886,506 +7446,619 @@ + } + + +-SWIGINTERN PyObject *_wrap_avc_get_initial_sid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_new_SELboolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - security_id_t *arg2 = (security_id_t *) 0 ; +- char *arg1 = (char *) 0 ; +- security_id_t *arg2 = (security_id_t *) 0 ; - int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - security_id_t temp2 ; +- int res1 ; +- char *buf1 = 0 ; +- int alloc1 = 0 ; +- security_id_t temp2 ; ++ SELboolean *result = 0 ; ++ ++ if (!PyArg_ParseTuple(args,(char *)":new_SELboolean")) SWIG_fail; ++ result = (SELboolean *)calloc(1, sizeof(SELboolean)); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SELboolean, SWIG_POINTER_NEW | 0 ); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_delete_SELboolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ SELboolean *arg1 = (SELboolean *) 0 ; ++ void *argp1 = 0 ; ++ int res1 = 0 ; PyObject * obj0 = 0 ; -+ int result; - { - arg2 = &temp2; -@@ -7924,1587 +8130,70 @@ +- { +- arg2 = &temp2; +- } +- if (!PyArg_ParseTuple(args,(char *)"O:avc_get_initial_sid",&obj0)) SWIG_fail; +- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!PyArg_ParseTuple(args,(char *)"O:delete_SELboolean",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_get_initial_sid" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)avc_get_initial_sid((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- { +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_security_id, 0)); +- } else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SELboolean" "', argument " "1"" of type '" "SELboolean *""'"); + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ arg1 = (SELboolean *)(argp1); ++ free((char *) arg1); ++ resultobj = SWIG_Py_Void(); + return resultobj; + fail: +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; } -SWIGINTERN PyObject *_wrap_avc_entry_ref_ae_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *SELboolean_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *obj; ++ if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; ++ SWIG_TypeNewClientData(SWIGTYPE_p_SELboolean, SWIG_NewClientData(obj)); ++ return SWIG_Py_Void(); ++} ++ ++SWIGINTERN PyObject *_wrap_security_set_boolean_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct avc_entry_ref *arg1 = (struct avc_entry_ref *) 0 ; - struct avc_entry *arg2 = (struct avc_entry *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- void *argp2 = 0 ; -- int res2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ size_t arg1 ; ++ SELboolean *arg2 = (SELboolean *) 0 ; ++ int arg3 ; ++ size_t val1 ; ++ int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; ++ int val3 ; ++ int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_entry_ref_ae_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -7531,76 +12839,161 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg1 = (struct avc_entry_ref *)(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_avc_entry, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res2)) { ++ if (!PyArg_ParseTuple(args,(char *)"OOO:security_set_boolean_list",&obj0,&obj1,&obj2)) SWIG_fail; ++ ecode1 = SWIG_AsVal_size_t(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_set_boolean_list" "', argument " "1"" of type '" "size_t""'"); ++ } ++ arg1 = (size_t)(val1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_SELboolean, 0 | 0 ); + if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_entry_ref_ae_set" "', argument " "2"" of type '" "struct avc_entry *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_set_boolean_list" "', argument " "2"" of type '" "SELboolean *""'"); + } - arg2 = (struct avc_entry *)(argp2); - if (arg1) (arg1)->ae = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg2 = (SELboolean *)(argp2); ++ ecode3 = SWIG_AsVal_int(obj2, &val3); ++ if (!SWIG_IsOK(ecode3)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "security_set_boolean_list" "', argument " "3"" of type '" "int""'"); ++ } ++ arg3 = (int)(val3); ++ { ++ result = (int)security_set_boolean_list(arg1,arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_entry_ref_ae_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_load_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_entry_ref *arg1 = (struct avc_entry_ref *) 0 ; - struct avc_entry *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_entry_ref_ae_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_load_booleans",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_entry_ref_ae_get" "', argument " "1"" of type '" "struct avc_entry_ref *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_load_booleans" "', argument " "1"" of type '" "char *""'"); ++ } ++ arg1 = (char *)(buf1); ++ { ++ result = (int)security_load_booleans(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct avc_entry_ref *)(argp1); - result = (struct avc_entry *) ((arg1)->ae); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_entry, 0 | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_new_avc_entry_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_check_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_entry_ref *result = 0 ; -- ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)":new_avc_entry_ref")) SWIG_fail; - result = (struct avc_entry_ref *)calloc(1, sizeof(struct avc_entry_ref)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_entry_ref, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)"O:security_check_context",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)security_check_context(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_avc_entry_ref(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_check_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_entry_ref *arg1 = (struct avc_entry_ref *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_entry_ref",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_entry_ref, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_check_context_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_entry_ref" "', argument " "1"" of type '" "struct avc_entry_ref *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_check_context_raw" "', argument " "1"" of type '" "security_context_t""'"); + } - arg1 = (struct avc_entry_ref *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)security_check_context_raw(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *avc_entry_ref_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -7609,144 +13002,250 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -} - -SWIGINTERN PyObject *_wrap_avc_memory_callback_func_malloc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_canonicalize_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ; - void *(*arg2)(size_t) = (void *(*)(size_t)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_context_t temp2 = 0 ; + PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_memory_callback_func_malloc_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_memory_callback_func_malloc_set" "', argument " "1"" of type '" "struct avc_memory_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context" "', argument " "1"" of type '" "security_context_t""'"); + } - arg1 = (struct avc_memory_callback *)(argp1); -- { ++ arg1 = (security_context_t)(buf1); + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_size_t__p_void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_memory_callback_func_malloc_set" "', argument " "2"" of type '" "void *(*)(size_t)""'"); -- } -- } ++ result = (int)security_canonicalize_context(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } - if (arg1) (arg1)->func_malloc = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_memory_callback_func_malloc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_canonicalize_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ; - void *(*result)(size_t) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_context_t temp2 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_memory_callback_func_malloc_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context_raw",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_memory_callback_func_malloc_get" "', argument " "1"" of type '" "struct avc_memory_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_canonicalize_context_raw" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)security_canonicalize_context_raw(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } - arg1 = (struct avc_memory_callback *)(argp1); - result = (void *(*)(size_t)) ((arg1)->func_malloc); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_size_t__p_void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_memory_callback_func_free_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_getenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_memory_callback_func_free_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_memory_callback_func_free_set" "', argument " "1"" of type '" "struct avc_memory_callback *""'"); - } - arg1 = (struct avc_memory_callback *)(argp1); -- { ++ if (!PyArg_ParseTuple(args,(char *)":security_getenforce")) SWIG_fail; + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_memory_callback_func_free_set" "', argument " "2"" of type '" "void (*)(void *)""'"); -- } -- } ++ result = (int)security_getenforce(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } - if (arg1) (arg1)->func_free = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_memory_callback_func_free_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_setenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ; - void (*result)(void *) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ int arg1 ; ++ int val1 ; ++ int ecode1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_memory_callback_func_free_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_memory_callback_func_free_get" "', argument " "1"" of type '" "struct avc_memory_callback *""'"); -- } ++ if (!PyArg_ParseTuple(args,(char *)"O:security_setenforce",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_setenforce" "', argument " "1"" of type '" "int""'"); ++ } ++ arg1 = (int)(val1); ++ { ++ result = (int)security_setenforce(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct avc_memory_callback *)(argp1); - result = (void (*)(void *)) ((arg1)->func_free); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_new_avc_memory_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_disable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *result = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)":new_avc_memory_callback")) SWIG_fail; - result = (struct avc_memory_callback *)calloc(1, sizeof(struct avc_memory_callback)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_memory_callback, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":security_disable")) SWIG_fail; ++ { ++ result = (int)security_disable(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_avc_memory_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_policyvers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_memory_callback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_memory_callback" "', argument " "1"" of type '" "struct avc_memory_callback *""'"); -- } ++ if (!PyArg_ParseTuple(args,(char *)":security_policyvers")) SWIG_fail; ++ { ++ result = (int)security_policyvers(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct avc_memory_callback *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *avc_memory_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -7755,100 +13254,191 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -} - -SWIGINTERN PyObject *_wrap_avc_log_callback_func_log_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_get_boolean_names(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ; - void (*arg2)(char const *,...) = (void (*)(char const *,...)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ char ***arg1 = (char ***) 0 ; ++ int *arg2 = (int *) 0 ; ++ char **temp11 ; ++ int temp21 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_log_callback_func_log_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_log_callback_func_log_set" "', argument " "1"" of type '" "struct avc_log_callback *""'"); -- } ++ { ++ arg1 = &temp11; ++ arg2 = &temp21; + } - arg1 = (struct avc_log_callback *)(argp1); -- { ++ if (!PyArg_ParseTuple(args,(char *)":security_get_boolean_names")) SWIG_fail; + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_q_const__char_v_______void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_log_callback_func_log_set" "', argument " "2"" of type '" "void (*)(char const *,...)""'"); -- } -- } ++ result = (int)security_get_boolean_names(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ { ++ PyObject* list = PyList_New(*arg2); ++ int i; ++ for (i = 0; i < *arg2; i++) { ++ PyList_SetItem(list, i, PyString_FromString((*arg1)[i])); ++ } ++ resultobj = SWIG_Python_AppendOutput(resultobj, list); ++ } ++ { ++ int i; ++ if (*arg1) { ++ for (i = 0; i < *arg2; i++) { ++ free((*arg1)[i]); ++ } ++ free(*arg1); + } + } - if (arg1) (arg1)->func_log = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- + return resultobj; + fail: ++ { ++ int i; ++ if (*arg1) { ++ for (i = 0; i < *arg2; i++) { ++ free((*arg1)[i]); ++ } ++ free(*arg1); ++ } ++ } + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_log_callback_func_log_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_get_boolean_pending(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ; - void (*result)(char const *,...) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_log_callback_func_log_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_pending",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_log_callback_func_log_get" "', argument " "1"" of type '" "struct avc_log_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_pending" "', argument " "1"" of type '" "char const *""'"); ++ } ++ arg1 = (char *)(buf1); ++ { ++ result = (int)security_get_boolean_pending((char const *)arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct avc_log_callback *)(argp1); - result = (void (*)(char const *,...)) ((arg1)->func_log); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_v_______void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_log_callback_func_audit_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_get_boolean_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ; - void (*arg2)(void *,security_class_t,char *,size_t) = (void (*)(void *,security_class_t,char *,size_t)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; ++ char *arg1 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_log_callback_func_audit_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_active",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_log_callback_func_audit_set" "', argument " "1"" of type '" "struct avc_log_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_get_boolean_active" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct avc_log_callback *)(argp1); -- { ++ arg1 = (char *)(buf1); + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_log_callback_func_audit_set" "', argument " "2"" of type '" "void (*)(void *,security_class_t,char *,size_t)""'"); -- } -- } ++ result = (int)security_get_boolean_active((char const *)arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } - if (arg1) (arg1)->func_audit = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_log_callback_func_audit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_set_boolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ; - void (*result)(void *,security_class_t,char *,size_t) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ int arg2 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ int val2 ; ++ int ecode2 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_log_callback_func_audit_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_set_boolean",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_log_callback_func_audit_get" "', argument " "1"" of type '" "struct avc_log_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_set_boolean" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct avc_log_callback *)(argp1); - result = (void (*)(void *,security_class_t,char *,size_t)) ((arg1)->func_audit); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_unsigned_short_p_char_size_t__void); @@ -7865,34 +13455,60 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - if (!PyArg_ParseTuple(args,(char *)":new_avc_log_callback")) SWIG_fail; - result = (struct avc_log_callback *)calloc(1, sizeof(struct avc_log_callback)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_log_callback, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (char *)(buf1); ++ ecode2 = SWIG_AsVal_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_set_boolean" "', argument " "2"" of type '" "int""'"); ++ } ++ arg2 = (int)(val2); ++ { ++ result = (int)security_set_boolean((char const *)arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_avc_log_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_commit_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_log_callback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_log_callback" "', argument " "1"" of type '" "struct avc_log_callback *""'"); -- } ++ if (!PyArg_ParseTuple(args,(char *)":security_commit_booleans")) SWIG_fail; ++ { ++ result = (int)security_commit_booleans(); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg1 = (struct avc_log_callback *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *avc_log_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -7901,163 +13517,243 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -} - -SWIGINTERN PyObject *_wrap_avc_thread_callback_func_create_thread_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_class_mapping_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ; - void *(*arg2)(void (*)(void)) = (void *(*)(void (*)(void))) 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; ++ char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_thread_callback_func_create_thread_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_class_mapping_name_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_thread_callback_func_create_thread_set" "', argument " "1"" of type '" "struct avc_thread_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_name_set" "', argument " "1"" of type '" "struct security_class_mapping *""'"); + } - arg1 = (struct avc_thread_callback *)(argp1); - { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_f_void__void__p_void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_thread_callback_func_create_thread_set" "', argument " "2"" of type '" "void *(*)(void (*)(void))""'"); - } -- } ++ arg1 = (struct security_class_mapping *)(argp1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_class_mapping_name_set" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); ++ if (arg2) { ++ size_t size = strlen((const char *)((const char *)(arg2))) + 1; ++ arg1->name = (char const *)(char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); ++ } else { ++ arg1->name = 0; + } - if (arg1) (arg1)->func_create_thread = arg2; - -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- + resultobj = SWIG_Py_Void(); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_thread_callback_func_create_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_class_mapping_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ; - void *(*result)(void (*)(void)) = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_thread_callback_func_create_thread_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_name_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_thread_callback_func_create_thread_get" "', argument " "1"" of type '" "struct avc_thread_callback *""'"); -- } -- arg1 = (struct avc_thread_callback *)(argp1); -- result = (void *(*)(void (*)(void))) ((arg1)->func_create_thread); -- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_f_void__void__p_void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_name_get" "', argument " "1"" of type '" "struct security_class_mapping *""'"); + } +- arg1 = (struct avc_thread_callback *)(argp1); +- result = (void *(*)(void (*)(void))) ((arg1)->func_create_thread); +- resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_f_void__void__p_void); ++ arg1 = (struct security_class_mapping *)(argp1); ++ result = (char *) ((arg1)->name); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_thread_callback_func_stop_thread_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_class_mapping_perms_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; ++ char **arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; ++ void *argp2 = 0 ; ++ int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_thread_callback_func_stop_thread_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_class_mapping_perms_set",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_thread_callback_func_stop_thread_set" "', argument " "1"" of type '" "struct avc_thread_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_perms_set" "', argument " "1"" of type '" "struct security_class_mapping *""'"); + } - arg1 = (struct avc_thread_callback *)(argp1); -- { ++ arg1 = (struct security_class_mapping *)(argp1); ++ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_char, 0 | 0 ); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "security_class_mapping_perms_set" "', argument " "2"" of type '" "char const *[sizeof(access_vector_t)*8+1]""'"); ++ } ++ arg2 = (char **)(argp2); + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_thread_callback_func_stop_thread_set" "', argument " "2"" of type '" "void (*)(void *)""'"); -- } -- } ++ if (arg2) { ++ size_t ii = 0; ++ for (; ii < (size_t)sizeof(access_vector_t)*8+1; ++ii) arg1->perms[ii] = arg2[ii]; ++ } else { ++ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""perms""' of type '""char const *[sizeof(access_vector_t)*8+1]""'"); + } + } - if (arg1) (arg1)->func_stop_thread = arg2; - -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- + resultobj = SWIG_Py_Void(); + return resultobj; + fail: +@@ -8393,56 +8066,55 @@ + } + + -SWIGINTERN PyObject *_wrap_avc_thread_callback_func_stop_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_class_mapping_perms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ; - void (*result)(void *) = 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; ++ char **result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_thread_callback_func_stop_thread_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_perms_get",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 | 0 ); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_thread_callback_func_stop_thread_get" "', argument " "1"" of type '" "struct avc_thread_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "security_class_mapping_perms_get" "', argument " "1"" of type '" "struct security_class_mapping *""'"); + } - arg1 = (struct avc_thread_callback *)(argp1); - result = (void (*)(void *)) ((arg1)->func_stop_thread); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (struct security_class_mapping *)(argp1); ++ result = (char **)(char **) ((arg1)->perms); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 ); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_new_avc_thread_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_new_security_class_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *result = 0 ; -- ++ struct security_class_mapping *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)":new_avc_thread_callback")) SWIG_fail; - result = (struct avc_thread_callback *)calloc(1, sizeof(struct avc_thread_callback)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_thread_callback, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":new_security_class_mapping")) SWIG_fail; ++ result = (struct security_class_mapping *)calloc(1, sizeof(struct security_class_mapping)); ++ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_class_mapping, SWIG_POINTER_NEW | 0 ); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_avc_thread_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_delete_security_class_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ; -- void *argp1 = 0 ; -- int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_thread_callback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:delete_security_class_mapping",&obj0)) SWIG_fail; ++ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_thread_callback" "', argument " "1"" of type '" "struct avc_thread_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_security_class_mapping" "', argument " "1"" of type '" "struct security_class_mapping *""'"); + } - arg1 = (struct avc_thread_callback *)(argp1); -- free((char *) arg1); ++ arg1 = (struct security_class_mapping *)(argp1); + free((char *) arg1); - -- resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- + resultobj = SWIG_Py_Void(); + return resultobj; + fail: +@@ -8450,316 +8122,341 @@ + } + + -SWIGINTERN PyObject *avc_thread_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *obj; -- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; ++SWIGINTERN PyObject *security_class_mapping_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_avc_thread_callback, SWIG_NewClientData(obj)); -- return SWIG_Py_Void(); --} -- ++ SWIG_TypeNewClientData(SWIGTYPE_p_security_class_mapping, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); + } + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_alloc_lock_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_string_to_security_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void *(*arg2)(void) = (void *(*)(void)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; ++ char *arg1 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ security_class_t result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_lock_callback_func_alloc_lock_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:string_to_security_class",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_alloc_lock_set" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); - } - arg1 = (struct avc_lock_callback *)(argp1); @@ -8066,24 +13762,35 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_lock_callback_func_alloc_lock_set" "', argument " "2"" of type '" "void *(*)(void)""'"); - } -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "string_to_security_class" "', argument " "1"" of type '" "char const *""'"); + } - if (arg1) (arg1)->func_alloc_lock = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (char *)(buf1); ++ result = (security_class_t)string_to_security_class((char const *)arg1); ++ resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_alloc_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_class_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void *(*result)(void) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ security_class_t arg1 ; ++ unsigned short val1 ; ++ int ecode1 = 0 ; + PyObject * obj0 = 0 ; ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_alloc_lock_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8092,21 +13799,37 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_lock_callback *)(argp1); - result = (void *(*)(void)) ((arg1)->func_alloc_lock); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_void__p_void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)"O:security_class_to_string",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_class_to_string" "', argument " "1"" of type '" "security_class_t""'"); ++ } ++ arg1 = (security_class_t)(val1); ++ result = (char *)security_class_to_string(arg1); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_get_lock_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_av_perm_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ security_class_t arg1 ; ++ access_vector_t arg2 ; ++ unsigned short val1 ; ++ int ecode1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_lock_callback_func_get_lock_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8122,55 +13845,118 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - if (arg1) (arg1)->func_get_lock = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_av_perm_to_string",&obj0,&obj1)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_av_perm_to_string" "', argument " "1"" of type '" "security_class_t""'"); ++ } ++ arg1 = (security_class_t)(val1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_av_perm_to_string" "', argument " "2"" of type '" "access_vector_t""'"); ++ } ++ arg2 = (access_vector_t)(val2); ++ result = (char *)security_av_perm_to_string(arg1,arg2); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_get_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_string_to_av_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void (*result)(void *) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ security_class_t arg1 ; ++ char *arg2 = (char *) 0 ; ++ unsigned short val1 ; ++ int ecode1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ access_vector_t result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_get_lock_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_get_lock_get" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); -- } ++ if (!PyArg_ParseTuple(args,(char *)"OO:string_to_av_perm",&obj0,&obj1)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "string_to_av_perm" "', argument " "1"" of type '" "security_class_t""'"); ++ } ++ arg1 = (security_class_t)(val1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "string_to_av_perm" "', argument " "2"" of type '" "char const *""'"); + } - arg1 = (struct avc_lock_callback *)(argp1); - result = (void (*)(void *)) ((arg1)->func_get_lock); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg2 = (char *)(buf2); ++ result = (access_vector_t)string_to_av_perm(arg1,(char const *)arg2); ++ resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_release_lock_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_security_av_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ security_class_t arg1 ; ++ access_vector_t arg2 ; ++ char **arg3 = (char **) 0 ; ++ unsigned short val1 ; ++ int ecode1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; ++ char *temp3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_lock_callback_func_release_lock_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_release_lock_set" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); - } - arg1 = (struct avc_lock_callback *)(argp1); -- { ++ arg3 = &temp3; ++ if (!PyArg_ParseTuple(args,(char *)"OO:security_av_string",&obj0,&obj1)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "security_av_string" "', argument " "1"" of type '" "security_class_t""'"); ++ } ++ arg1 = (security_class_t)(val1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "security_av_string" "', argument " "2"" of type '" "access_vector_t""'"); ++ } ++ arg2 = (access_vector_t)(val2); + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_lock_callback_func_release_lock_set" "', argument " "2"" of type '" "void (*)(void *)""'"); -- } -- } ++ result = (int)security_av_string(arg1,arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } - if (arg1) (arg1)->func_release_lock = arg2; - - resultobj = SWIG_Py_Void(); @@ -8192,59 +13978,98 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_release_lock_get" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); -- } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ free(*arg3); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } - arg1 = (struct avc_lock_callback *)(argp1); - result = (void (*)(void *)) ((arg1)->func_release_lock); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); -- return resultobj; --fail: -- return NULL; --} -- -- + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_free_lock_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_matchpathcon_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void (*arg2)(void *) = (void (*)(void *)) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; ++ char *arg1 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; + PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_lock_callback_func_free_lock_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_init",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_free_lock_set" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct avc_lock_callback *)(argp1); -- { ++ arg1 = (char *)(buf1); + { - int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_void__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "avc_lock_callback_func_free_lock_set" "', argument " "2"" of type '" "void (*)(void *)""'"); -- } -- } ++ result = (int)matchpathcon_init((char const *)arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } + } - if (arg1) (arg1)->func_free_lock = arg2; - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_lock_callback_func_free_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_matchpathcon_init_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void (*result)(void *) = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ char *arg2 = (char *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_free_lock_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); -- if (!SWIG_IsOK(res1)) { ++ if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_init_prefix",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_lock_callback_func_free_lock_get" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init_prefix" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct avc_lock_callback *)(argp1); - result = (void (*)(void *)) ((arg1)->func_free_lock); - resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void); @@ -8261,34 +14086,92 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - if (!PyArg_ParseTuple(args,(char *)":new_avc_lock_callback")) SWIG_fail; - result = (struct avc_lock_callback *)calloc(1, sizeof(struct avc_lock_callback)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_lock_callback, SWIG_POINTER_NEW | 0 ); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (char *)(buf1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matchpathcon_init_prefix" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); ++ { ++ result = (int)matchpathcon_init_prefix((char const *)arg1,(char const *)arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_delete_avc_lock_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_matchpathcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -- PyObject * obj0 = 0 ; -- ++ char *arg1 = (char *) 0 ; ++ mode_t arg2 ; ++ security_context_t *arg3 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; ++ security_context_t temp3 = 0 ; + PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_lock_callback",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, SWIG_POINTER_DISOWN | 0 ); -- if (!SWIG_IsOK(res1)) { ++ arg3 = &temp3; ++ if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_lock_callback" "', argument " "1"" of type '" "struct avc_lock_callback *""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon" "', argument " "1"" of type '" "char const *""'"); + } - arg1 = (struct avc_lock_callback *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = (char *)(buf1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon" "', argument " "2"" of type '" "mode_t""'"); ++ } ++ arg2 = (mode_t)(val2); ++ { ++ result = (int)matchpathcon((char const *)arg1,arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ freecon(*arg3); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *avc_lock_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; @@ -8297,16 +14180,19 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -} - -SWIGINTERN PyObject *_wrap_avc_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- char *arg1 = (char *) 0 ; ++SWIGINTERN PyObject *_wrap_matchpathcon_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; - struct avc_memory_callback *arg2 = (struct avc_memory_callback *) 0 ; - struct avc_log_callback *arg3 = (struct avc_log_callback *) 0 ; - struct avc_thread_callback *arg4 = (struct avc_thread_callback *) 0 ; - struct avc_lock_callback *arg5 = (struct avc_lock_callback *) 0 ; - int result; -- int res1 ; -- char *buf1 = 0 ; -- int alloc1 = 0 ; ++ mode_t arg2 ; ++ security_context_t *arg3 = (security_context_t *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; - void *argp2 = 0 ; - int res2 = 0 ; - void *argp3 = 0 ; @@ -8315,18 +14201,25 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; ++ security_context_t temp3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; -- ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OOOOO:avc_init",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; -- res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -- if (!SWIG_IsOK(res1)) { ++ arg3 = &temp3; ++ if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_index",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_init" "', argument " "1"" of type '" "char const *""'"); -- } -- arg1 = (char *)(buf1); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_index" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_init" "', argument " "2"" of type '" "struct avc_memory_callback const *""'"); @@ -8335,98 +14228,230 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_avc_log_callback, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "avc_init" "', argument " "3"" of type '" "struct avc_log_callback const *""'"); -- } ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon_index" "', argument " "2"" of type '" "mode_t""'"); ++ } ++ arg2 = (mode_t)(val2); ++ { ++ result = (int)matchpathcon_index((char const *)arg1,arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } - arg3 = (struct avc_log_callback *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "avc_init" "', argument " "4"" of type '" "struct avc_thread_callback const *""'"); -- } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ freecon(*arg3); + } - arg4 = (struct avc_thread_callback *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_init" "', argument " "5"" of type '" "struct avc_lock_callback const *""'"); -- } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } - arg5 = (struct avc_lock_callback *)(argp5); - result = (int)avc_init((char const *)arg1,(struct avc_memory_callback const *)arg2,(struct avc_log_callback const *)arg3,(struct avc_thread_callback const *)arg4,(struct avc_lock_callback const *)arg5); - resultobj = SWIG_From_int((int)(result)); -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- return resultobj; --fail: -- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -- return NULL; --} -- -- + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: +@@ -8768,900 +8465,727 @@ + } + + -SWIGINTERN PyObject *_wrap_avc_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_matchpathcon_filespec_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; - unsigned int arg2 ; - int result; - void *argp1 = 0 ; -- int res1 = 0 ; ++ ino_t arg1 ; ++ int arg2 ; ++ char *arg3 = (char *) 0 ; ++ void *argp1 ; + int res1 = 0 ; - unsigned int val2 ; -- int ecode2 = 0 ; -- PyObject * obj0 = 0 ; -- PyObject * obj1 = 0 ; -- ++ int val2 ; + int ecode2 = 0 ; ++ int res3 ; ++ char *buf3 = 0 ; ++ int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; ++ PyObject * obj2 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_open",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_open" "', argument " "1"" of type '" "struct selinux_opt *""'"); -- } ++ if (!PyArg_ParseTuple(args,(char *)"OOO:matchpathcon_filespec_add",&obj0,&obj1,&obj2)) SWIG_fail; ++ { ++ res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_ino_t, 0 ); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_filespec_add" "', argument " "1"" of type '" "ino_t""'"); ++ } ++ if (!argp1) { ++ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matchpathcon_filespec_add" "', argument " "1"" of type '" "ino_t""'"); ++ } else { ++ arg1 = *((ino_t *)(argp1)); ++ } + } - arg1 = (struct selinux_opt *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); -- if (!SWIG_IsOK(ecode2)) { ++ ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "avc_open" "', argument " "2"" of type '" "unsigned int""'"); -- } ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matchpathcon_filespec_add" "', argument " "2"" of type '" "int""'"); + } - arg2 = (unsigned int)(val2); - result = (int)avc_open(arg1,arg2); -- resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg2 = (int)(val2); ++ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); ++ if (!SWIG_IsOK(res3)) { ++ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "matchpathcon_filespec_add" "', argument " "3"" of type '" "char const *""'"); ++ } ++ arg3 = (char *)(buf3); ++ { ++ result = (int)matchpathcon_filespec_add(arg1,arg2,(char const *)arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: ++ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- ++SWIGINTERN PyObject *_wrap_matchmediacon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ char *arg1 = (char *) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ security_context_t temp2 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)":avc_cleanup")) SWIG_fail; - avc_cleanup(); - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:matchmediacon",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchmediacon" "', argument " "1"" of type '" "char const *""'"); ++ } ++ arg1 = (char *)(buf1); ++ { ++ result = (int)matchmediacon((char const *)arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- int result; -- ++SWIGINTERN PyObject *_wrap_selinux_getenforcemode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ int *arg1 = (int *) 0 ; ++ int temp1 ; ++ int res1 = SWIG_TMPOBJ ; + int result; + - if (!PyArg_ParseTuple(args,(char *)":avc_reset")) SWIG_fail; - result = (int)avc_reset(); -- resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":selinux_getenforcemode")) SWIG_fail; ++ { ++ result = (int)selinux_getenforcemode(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } + resultobj = SWIG_From_int((int)(result)); ++ if (SWIG_IsTmpObj(res1)) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg1))); ++ } else { ++ int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN | 0 ) : 0 ; ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_int, new_flags)); ++ } + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; -- ++SWIGINTERN PyObject *_wrap_selinux_getpolicytype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ char **arg1 = (char **) 0 ; ++ char *temp1 = 0 ; ++ int result; + - if (!PyArg_ParseTuple(args,(char *)":avc_destroy")) SWIG_fail; - avc_destroy(); - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ arg1 = &temp1; ++ if (!PyArg_ParseTuple(args,(char *)":selinux_getpolicytype")) SWIG_fail; ++ { ++ result = (int)selinux_getpolicytype(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } ++ } ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg1) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); ++ free(*arg1); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_has_perm_noaudit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_policy_root(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_id_t arg2 = (security_id_t) 0 ; - security_class_t arg3 ; @@ -8452,7 +14477,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm_noaudit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8486,14 +14512,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg6 = (struct av_decision *)(argp6); - result = (int)avc_has_perm_noaudit(arg1,arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_policy_root")) SWIG_fail; ++ result = (char *)selinux_policy_root(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_has_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_binary_policy_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_id_t arg2 = (security_id_t) 0 ; - security_class_t arg3 ; @@ -8518,7 +14548,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8551,14 +14582,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - result = (int)avc_has_perm(arg1,arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_binary_policy_path")) SWIG_fail; ++ result = (char *)selinux_binary_policy_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_audit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_failsafe_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_id_t arg2 = (security_id_t) 0 ; - security_class_t arg3 ; @@ -8586,7 +14621,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:avc_audit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8624,14 +14660,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - avc_audit(arg1,arg2,arg3,arg4,arg5,arg6,arg7); - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_failsafe_context_path")) SWIG_fail; ++ result = (char *)selinux_failsafe_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_removable_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_id_t arg2 = (security_id_t) 0 ; - security_class_t arg3 ; @@ -8647,7 +14687,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -- ++ char *result = 0 ; + - { - arg4 = &temp4; - } @@ -8669,14 +14710,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg3 = (security_class_t)(val3); - result = (int)avc_compute_create(arg1,arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_removable_context_path")) SWIG_fail; ++ result = (char *)selinux_removable_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_default_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - security_id_t arg1 = (security_id_t) 0 ; - security_id_t arg2 = (security_id_t) 0 ; - security_class_t arg3 ; @@ -8692,7 +14737,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -- ++ char *result = 0 ; + - { - arg4 = &temp4; - } @@ -8714,14 +14760,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg3 = (security_class_t)(val3); - result = (int)avc_compute_member(arg1,arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_default_context_path")) SWIG_fail; ++ result = (char *)selinux_default_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_lookups_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_user_contexts_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -8743,22 +14793,28 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->entry_lookups = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_user_contexts_path")) SWIG_fail; ++ result = (char *)selinux_user_contexts_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_lookups_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_file_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_lookups_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8767,14 +14823,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->entry_lookups); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_path")) SWIG_fail; ++ result = (char *)selinux_file_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_hits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_file_context_homedir_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -8796,22 +14856,28 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->entry_hits = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_homedir_path")) SWIG_fail; ++ result = (char *)selinux_file_context_homedir_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_hits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_file_context_local_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_hits_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8820,14 +14886,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->entry_hits); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_local_path")) SWIG_fail; ++ result = (char *)selinux_file_context_local_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_misses_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_file_context_subs_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -8849,22 +14919,28 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->entry_misses = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_file_context_subs_path")) SWIG_fail; ++ result = (char *)selinux_file_context_subs_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_misses_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_homedir_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_misses_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8873,14 +14949,18 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->entry_misses); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_homedir_context_path")) SWIG_fail; ++ result = (char *)selinux_homedir_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_discards_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_media_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -8902,22 +14982,28 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->entry_discards = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_media_context_path")) SWIG_fail; ++ result = (char *)selinux_media_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_discards_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_virtual_domain_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_discards_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { @@ -8926,42 +15012,27 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->entry_discards); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_virtual_domain_context_path")) SWIG_fail; ++ result = (char *)selinux_virtual_domain_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_lookups_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_virtual_image_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - unsigned int val2 ; - int ecode2 = 0 ; -+ char *arg1 = (char *) 0 ; -+ struct avc_memory_callback *arg2 = (struct avc_memory_callback *) 0 ; -+ struct avc_log_callback *arg3 = (struct avc_log_callback *) 0 ; -+ struct avc_thread_callback *arg4 = (struct avc_thread_callback *) 0 ; -+ struct avc_lock_callback *arg5 = (struct avc_lock_callback *) 0 ; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ void *argp2 = 0 ; -+ int res2 = 0 ; -+ void *argp3 = 0 ; -+ int res3 = 0 ; -+ void *argp4 = 0 ; -+ int res4 = 0 ; -+ void *argp5 = 0 ; -+ int res5 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ PyObject * obj4 = 0 ; -+ int result; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"OO:avc_cache_stats_cav_lookups_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); @@ -8975,41 +15046,59 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->cav_lookups = arg2; -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_virtual_image_context_path")) SWIG_fail; ++ result = (char *)selinux_virtual_image_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_selinux_x_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_x_context_path")) SWIG_fail; ++ result = (char *)selinux_x_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_lookups_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_contexts_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_lookups_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OOOOO:avc_init",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { +- if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_lookups_get" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_init" "', argument " "1"" of type '" "char const *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->cav_lookups); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_contexts_path")) SWIG_fail; ++ result = (char *)selinux_contexts_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_hits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_securetty_types_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -9018,16 +15107,13 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"OO:avc_cache_stats_cav_hits_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_hits_set" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ arg1 = (char *)(buf1); -+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_avc_memory_callback, 0 | 0 ); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_init" "', argument " "2"" of type '" "struct avc_memory_callback const *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { @@ -9035,42 +15121,72 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->cav_hits = arg2; -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_securetty_types_path")) SWIG_fail; ++ result = (char *)selinux_securetty_types_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_selinux_booleans_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_booleans_path")) SWIG_fail; ++ result = (char *)selinux_booleans_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_hits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_customizable_types_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_hits_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_hits_get" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ arg2 = (struct avc_memory_callback *)(argp2); -+ res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_avc_log_callback, 0 | 0 ); -+ if (!SWIG_IsOK(res3)) { -+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "avc_init" "', argument " "3"" of type '" "struct avc_log_callback const *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->cav_hits); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_customizable_types_path")) SWIG_fail; ++ result = (char *)selinux_customizable_types_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); ++ return resultobj; ++fail: ++ return NULL; ++} ++ ++ ++SWIGINTERN PyObject *_wrap_selinux_users_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++ PyObject *resultobj = 0; ++ char *result = 0 ; ++ ++ if (!PyArg_ParseTuple(args,(char *)":selinux_users_path")) SWIG_fail; ++ result = (char *)selinux_users_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_probes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_usersconf_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; @@ -9084,11 +15200,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_probes_set" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ arg3 = (struct avc_log_callback *)(argp3); -+ res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_avc_thread_callback, 0 | 0 ); -+ if (!SWIG_IsOK(res4)) { -+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "avc_init" "', argument " "4"" of type '" "struct avc_thread_callback const *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { @@ -9096,80 +15208,75 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - } - arg2 = (unsigned int)(val2); - if (arg1) (arg1)->cav_probes = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -- return resultobj; --fail: -- return NULL; --} -- -- ++ if (!PyArg_ParseTuple(args,(char *)":selinux_usersconf_path")) SWIG_fail; ++ result = (char *)selinux_usersconf_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; + fail: + return NULL; + } + + -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_probes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *resultobj = 0; ++SWIGINTERN PyObject *_wrap_selinux_translations_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -- ++ char *result = 0 ; + - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_probes_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_probes_get" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ arg4 = (struct avc_thread_callback *)(argp4); -+ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_lock_callback, 0 | 0 ); -+ if (!SWIG_IsOK(res5)) { -+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_init" "', argument " "5"" of type '" "struct avc_lock_callback const *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->cav_probes); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -+ arg5 = (struct avc_lock_callback *)(argp5); -+ result = (int)avc_init((char const *)arg1,(struct avc_memory_callback const *)arg2,(struct avc_log_callback const *)arg3,(struct avc_thread_callback const *)arg4,(struct avc_lock_callback const *)arg5); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); ++ if (!PyArg_ParseTuple(args,(char *)":selinux_translations_path")) SWIG_fail; ++ result = (char *)selinux_translations_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_misses_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_colors_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; -+ struct selinux_opt *arg1 = (struct selinux_opt *) 0 ; - unsigned int arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; -@@ -9512,109 +8201,256 @@ - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; -+ int result; - +- unsigned int arg2 ; +- void *argp1 = 0 ; +- int res1 = 0 ; +- unsigned int val2 ; +- int ecode2 = 0 ; +- PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; +- - if (!PyArg_ParseTuple(args,(char *)"OO:avc_cache_stats_cav_misses_set",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OO:avc_open",&obj0,&obj1)) SWIG_fail; -+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 | 0 ); - if (!SWIG_IsOK(res1)) { +- if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_cache_stats_cav_misses_set" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_open" "', argument " "1"" of type '" "struct selinux_opt *""'"); - } +- } - arg1 = (struct avc_cache_stats *)(argp1); -+ arg1 = (struct selinux_opt *)(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { +- ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); +- if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "avc_cache_stats_cav_misses_set" "', argument " "2"" of type '" "unsigned int""'"); -+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "avc_open" "', argument " "2"" of type '" "unsigned int""'"); - } - arg2 = (unsigned int)(val2); +- } +- arg2 = (unsigned int)(val2); - if (arg1) (arg1)->cav_misses = arg2; -- ++ char *result = 0 ; + - resultobj = SWIG_Py_Void(); -+ result = (int)avc_open(arg1,arg2); -+ resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)":selinux_colors_path")) SWIG_fail; ++ result = (char *)selinux_colors_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; @@ -9177,14 +15284,14 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_misses_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_netfilter_context_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; - unsigned int result; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; -+ int result; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_misses_get",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 | 0 ); @@ -9194,9 +15301,9 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - arg1 = (struct avc_cache_stats *)(argp1); - result = (unsigned int) ((arg1)->cav_misses); - resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result)); -+ if (!PyArg_ParseTuple(args,(char *)":avc_reset")) SWIG_fail; -+ result = (int)avc_reset(); -+ resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)":selinux_netfilter_context_path")) SWIG_fail; ++ result = (char *)selinux_netfilter_context_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; @@ -9204,71 +15311,17 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -SWIGINTERN PyObject *_wrap_new_avc_cache_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_has_perm_noaudit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct avc_cache_stats *result = 0 ; -+ security_id_t arg1 = (security_id_t) 0 ; -+ security_id_t arg2 = (security_id_t) 0 ; -+ security_class_t arg3 ; -+ access_vector_t arg4 ; -+ struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ; -+ struct av_decision *arg6 = (struct av_decision *) 0 ; -+ void *argp1 = 0 ; -+ int res1 = 0 ; -+ void *argp2 = 0 ; -+ int res2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ unsigned int val4 ; -+ int ecode4 = 0 ; -+ void *argp5 = 0 ; -+ int res5 = 0 ; -+ void *argp6 = 0 ; -+ int res6 = 0 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ PyObject * obj4 = 0 ; -+ PyObject * obj5 = 0 ; -+ int result; ++ char *result = 0 ; - if (!PyArg_ParseTuple(args,(char *)":new_avc_cache_stats")) SWIG_fail; - result = (struct avc_cache_stats *)calloc(1, sizeof(struct avc_cache_stats)); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_cache_stats, SWIG_POINTER_NEW | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm_noaudit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; -+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_has_perm_noaudit" "', argument " "1"" of type '" "security_id_t""'"); -+ } -+ arg1 = (security_id_t)(argp1); -+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_has_perm_noaudit" "', argument " "2"" of type '" "security_id_t""'"); -+ } -+ arg2 = (security_id_t)(argp2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_has_perm_noaudit" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -+ if (!SWIG_IsOK(ecode4)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "avc_has_perm_noaudit" "', argument " "4"" of type '" "access_vector_t""'"); -+ } -+ arg4 = (access_vector_t)(val4); -+ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); -+ if (!SWIG_IsOK(res5)) { -+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_has_perm_noaudit" "', argument " "5"" of type '" "struct avc_entry_ref *""'"); -+ } -+ arg5 = (struct avc_entry_ref *)(argp5); -+ res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_av_decision, 0 | 0 ); -+ if (!SWIG_IsOK(res6)) { -+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "avc_has_perm_noaudit" "', argument " "6"" of type '" "struct av_decision *""'"); -+ } -+ arg6 = (struct av_decision *)(argp6); -+ result = (int)avc_has_perm_noaudit(arg1,arg2,arg3,arg4,arg5,arg6); -+ resultobj = SWIG_From_int((int)(result)); ++ if (!PyArg_ParseTuple(args,(char *)":selinux_path")) SWIG_fail; ++ result = (char *)selinux_path(); ++ resultobj = SWIG_FromCharPtr((const char *)result); return resultobj; fail: return NULL; @@ -9276,325 +15329,953 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -SWIGINTERN PyObject *_wrap_delete_avc_cache_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_has_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_check_passwd_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ; -+ security_id_t arg1 = (security_id_t) 0 ; -+ security_id_t arg2 = (security_id_t) 0 ; -+ security_class_t arg3 ; -+ access_vector_t arg4 ; -+ struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ; -+ void *arg6 = (void *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; -+ void *argp2 = 0 ; -+ int res2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ unsigned int val4 ; -+ int ecode4 = 0 ; -+ void *argp5 = 0 ; -+ int res5 = 0 ; -+ int res6 ; +- void *argp1 = 0 ; +- int res1 = 0 ; ++ access_vector_t arg1 ; ++ unsigned int val1 ; ++ int ecode1 = 0 ; PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ PyObject * obj4 = 0 ; -+ PyObject * obj5 = 0 ; + int result; - if (!PyArg_ParseTuple(args,(char *)"O:delete_avc_cache_stats",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, SWIG_POINTER_DISOWN | 0 ); -+ if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; -+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); - if (!SWIG_IsOK(res1)) { +- if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_avc_cache_stats" "', argument " "1"" of type '" "struct avc_cache_stats *""'"); -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_has_perm" "', argument " "1"" of type '" "security_id_t""'"); ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_passwd_access",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "selinux_check_passwd_access" "', argument " "1"" of type '" "access_vector_t""'"); ++ } ++ arg1 = (access_vector_t)(val1); ++ { ++ result = (int)selinux_check_passwd_access(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } } - arg1 = (struct avc_cache_stats *)(argp1); - free((char *) arg1); - - resultobj = SWIG_Py_Void(); -+ arg1 = (security_id_t)(argp1); -+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_has_perm" "', argument " "2"" of type '" "security_id_t""'"); -+ } -+ arg2 = (security_id_t)(argp2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_has_perm" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ ecode4 = SWIG_AsVal_unsigned_SS_int(obj3, &val4); -+ if (!SWIG_IsOK(ecode4)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "avc_has_perm" "', argument " "4"" of type '" "access_vector_t""'"); ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *avc_cache_stats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +- PyObject *obj; +- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; +- SWIG_TypeNewClientData(SWIGTYPE_p_avc_cache_stats, SWIG_NewClientData(obj)); +- return SWIG_Py_Void(); +-} +- +-SWIGINTERN PyObject *_wrap_avc_av_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_checkPasswdAccess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ access_vector_t arg1 ; ++ unsigned int val1 ; ++ int ecode1 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)":avc_av_stats")) SWIG_fail; +- avc_av_stats(); +- resultobj = SWIG_Py_Void(); ++ if (!PyArg_ParseTuple(args,(char *)"O:checkPasswdAccess",&obj0)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "checkPasswdAccess" "', argument " "1"" of type '" "access_vector_t""'"); + } -+ arg4 = (access_vector_t)(val4); -+ res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_avc_entry_ref, 0 | 0 ); -+ if (!SWIG_IsOK(res5)) { -+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "avc_has_perm" "', argument " "5"" of type '" "struct avc_entry_ref *""'"); ++ arg1 = (access_vector_t)(val1); ++ { ++ result = (int)checkPasswdAccess(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } -+ arg5 = (struct avc_entry_ref *)(argp5); -+ res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); -+ if (!SWIG_IsOK(res6)) { -+ SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "avc_has_perm" "', argument " "6"" of type '" "void *""'"); ++ resultobj = SWIG_From_int((int)(result)); + return resultobj; + fail: + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_avc_sid_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_check_securetty_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; ++ security_context_t arg1 = (security_context_t) 0 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ PyObject * obj0 = 0 ; ++ int result; + +- if (!PyArg_ParseTuple(args,(char *)":avc_sid_stats")) SWIG_fail; +- avc_sid_stats(); +- resultobj = SWIG_Py_Void(); ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_securetty_context",&obj0)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_check_securetty_context" "', argument " "1"" of type '" "security_context_t""'"); ++ } ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)selinux_check_securetty_context(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } -+ result = (int)avc_has_perm(arg1,arg2,arg3,arg4,arg5,arg6); + resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return NULL; } --SWIGINTERN PyObject *avc_cache_stats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -- PyObject *obj; -- if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; -- SWIG_TypeNewClientData(SWIGTYPE_p_avc_cache_stats, SWIG_NewClientData(obj)); -- return SWIG_Py_Void(); --} -- --SWIGINTERN PyObject *_wrap_avc_av_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_compute_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_selinux_default_type_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_rpm_execcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; -+ security_id_t arg1 = (security_id_t) 0 ; -+ security_id_t arg2 = (security_id_t) 0 ; -+ security_class_t arg3 ; -+ security_id_t *arg4 = (security_id_t *) 0 ; -+ void *argp1 = 0 ; -+ int res1 = 0 ; -+ void *argp2 = 0 ; -+ int res2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ security_id_t temp4 ; +- char *result = 0 ; ++ unsigned int arg1 ; ++ char *arg2 = (char *) 0 ; ++ char **arg3 ; ++ char **arg4 ; ++ unsigned int val1 ; ++ int ecode1 = 0 ; ++ int res2 ; ++ char *buf2 = 0 ; ++ int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; ++ PyObject * obj3 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)":avc_av_stats")) SWIG_fail; -- avc_av_stats(); -- resultobj = SWIG_Py_Void(); +- if (!PyArg_ParseTuple(args,(char *)":selinux_default_type_path")) SWIG_fail; +- result = (char *)selinux_default_type_path(); +- resultobj = SWIG_FromCharPtr((const char *)result); ++ if (!PyArg_ParseTuple(args,(char *)"OOOO:rpm_execcon",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ++ ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1); ++ if (!SWIG_IsOK(ecode1)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rpm_execcon" "', argument " "1"" of type '" "unsigned int""'"); ++ } ++ arg1 = (unsigned int)(val1); ++ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); ++ if (!SWIG_IsOK(res2)) { ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rpm_execcon" "', argument " "2"" of type '" "char const *""'"); ++ } ++ arg2 = (char *)(buf2); + { -+ arg4 = &temp4; ++ int i, size; ++ PyObject * s; ++ ++ if (!PySequence_Check(obj2)) { ++ PyErr_SetString(PyExc_ValueError, "Expected a sequence"); ++ return NULL; ++ } ++ ++ size = PySequence_Size(obj2); ++ ++ arg3 = (char**) malloc(size + 1); ++ ++ for(i = 0; i < size; i++) { ++ if (!PyString_Check(PySequence_GetItem(obj2, i))) { ++ PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings"); ++ return NULL; ++ } ++ } ++ ++ for(i = 0; i < size; i++) { ++ s = PySequence_GetItem(obj2, i); ++ arg3[i] = (char*) malloc(PyString_Size(s) + 1); ++ strcpy(arg3[i], PyString_AsString(s)); ++ } ++ arg3[size] = NULL; + } -+ if (!PyArg_ParseTuple(args,(char *)"OOO:avc_compute_create",&obj0,&obj1,&obj2)) SWIG_fail; -+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_compute_create" "', argument " "1"" of type '" "security_id_t""'"); ++ { ++ int i, size; ++ PyObject * s; ++ ++ if (!PySequence_Check(obj3)) { ++ PyErr_SetString(PyExc_ValueError, "Expected a sequence"); ++ return NULL; ++ } ++ ++ size = PySequence_Size(obj3); ++ ++ arg4 = (char**) malloc(size + 1); ++ ++ for(i = 0; i < size; i++) { ++ if (!PyString_Check(PySequence_GetItem(obj3, i))) { ++ PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings"); ++ return NULL; ++ } ++ } ++ ++ for(i = 0; i < size; i++) { ++ s = PySequence_GetItem(obj3, i); ++ arg4[i] = (char*) malloc(PyString_Size(s) + 1); ++ strcpy(arg4[i], PyString_AsString(s)); ++ } ++ arg4[size] = NULL; + } -+ arg1 = (security_id_t)(argp1); -+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_compute_create" "', argument " "2"" of type '" "security_id_t""'"); ++ { ++ result = (int)rpm_execcon(arg1,(char const *)arg2,(char *const (*))arg3,(char *const (*))arg4); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } -+ arg2 = (security_id_t)(argp2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_compute_create" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ result = (int)avc_compute_create(arg1,arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ int i = 0; ++ while(arg3[i]) { ++ free(arg3[i]); ++ i++; ++ } ++ free(arg3); ++ } ++ { ++ int i = 0; ++ while(arg4[i]) { ++ free(arg4[i]); ++ i++; ++ } ++ free(arg4); ++ } return resultobj; fail: ++ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); ++ { ++ int i = 0; ++ while(arg3[i]) { ++ free(arg3[i]); ++ i++; ++ } ++ free(arg3); ++ } ++ { ++ int i = 0; ++ while(arg4[i]) { ++ free(arg4[i]); ++ i++; ++ } ++ free(arg4); ++ } return NULL; } --SWIGINTERN PyObject *_wrap_avc_sid_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_avc_compute_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { +-SWIGINTERN PyObject *_wrap_get_default_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_is_context_customizable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; -+ security_id_t arg1 = (security_id_t) 0 ; -+ security_id_t arg2 = (security_id_t) 0 ; -+ security_class_t arg3 ; -+ security_id_t *arg4 = (security_id_t *) 0 ; -+ void *argp1 = 0 ; -+ int res1 = 0 ; -+ void *argp2 = 0 ; -+ int res2 = 0 ; -+ unsigned short val3 ; -+ int ecode3 = 0 ; -+ security_id_t temp4 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; +- char *arg1 = (char *) 0 ; +- char **arg2 = (char **) 0 ; +- int result; ++ security_context_t arg1 = (security_context_t) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; +- char *temp2 = 0 ; + PyObject * obj0 = 0 ; + int result; -- if (!PyArg_ParseTuple(args,(char *)":avc_sid_stats")) SWIG_fail; -- avc_sid_stats(); -- resultobj = SWIG_Py_Void(); +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:get_default_type",&obj0)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"O:is_context_customizable",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_type" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- result = (int)get_default_type((char const *)arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- free(*arg2); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_context_customizable" "', argument " "1"" of type '" "security_context_t""'"); + } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ arg1 = (security_context_t)(buf1); + { -+ arg4 = &temp4; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"OOO:avc_compute_member",&obj0,&obj1,&obj2)) SWIG_fail; -+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "avc_compute_member" "', argument " "1"" of type '" "security_id_t""'"); -+ } -+ arg1 = (security_id_t)(argp1); -+ res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_security_id, 0 | 0 ); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "avc_compute_member" "', argument " "2"" of type '" "security_id_t""'"); -+ } -+ arg2 = (security_id_t)(argp2); -+ ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3); -+ if (!SWIG_IsOK(ecode3)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "avc_compute_member" "', argument " "3"" of type '" "security_class_t""'"); -+ } -+ arg3 = (security_class_t)(val3); -+ result = (int)avc_compute_member(arg1,arg2,arg3,arg4); ++ result = (int)is_context_customizable(arg1); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } + resultobj = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); return resultobj; fail: - return NULL; -@@ -9638,12 +8474,12 @@ +@@ -9670,295 +9194,235 @@ + } + + +-SWIGINTERN PyObject *_wrap_get_ordered_context_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_trans_to_raw_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char **arg2 = (char **) 0 ; +- char *arg1 = (char *) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_context_t **arg3 = (security_context_t **) 0 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - char *temp2 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- security_context_t *temp3 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; +- PyObject * obj1 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:get_default_type",&obj0)) SWIG_fail; -@@ -9675,7 +8511,6 @@ - char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_context_t **arg3 = (security_context_t **) 0 ; +- { +- arg3 = &temp3; +- } +- if (!PyArg_ParseTuple(args,(char *)"OO:get_ordered_context_list",&obj0,&obj1)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_trans_to_raw_context",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_ordered_context_list" "', argument " "2"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_trans_to_raw_context" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg2 = (security_context_t)(buf2); +- result = (int)get_ordered_context_list((char const *)arg1,arg2,arg3); +- resultobj = SWIG_From_int((int)(result)); ++ arg1 = (security_context_t)(buf1); + { +- PyObject* plist; +- int i; +- +- if (*arg3) { +- plist = PyList_New(result); +- for (i = 0; i < result; i++) { +- PyList_SetItem(plist, i, PyString_FromString((*arg3)[i])); +- } +- } else { +- plist = PyList_New(0); ++ result = (int)selinux_trans_to_raw_context(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } +- /* Only return the Python list, don't need to return the length anymore */ +- resultobj = plist; + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); + } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- { +- if (*arg3) freeconary(*arg3); +- } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_get_ordered_context_list_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_raw_to_trans_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- char *arg2 = (char *) 0 ; +- security_context_t arg3 = (security_context_t) 0 ; +- security_context_t **arg4 = (security_context_t **) 0 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ security_context_t *arg2 = (security_context_t *) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -9685,6 +8520,7 @@ - security_context_t *temp3 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- int res3 ; +- char *buf3 = 0 ; +- int alloc3 = 0 ; +- security_context_t *temp4 ; ++ security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; +- { +- arg4 = &temp4; +- } +- if (!PyArg_ParseTuple(args,(char *)"OOO:get_ordered_context_list_with_level",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_to_trans_context",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list_with_level" "', argument " "1"" of type '" "char const *""'"); +- } +- arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_ordered_context_list_with_level" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); +- if (!SWIG_IsOK(res3)) { +- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_ordered_context_list_with_level" "', argument " "3"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_to_trans_context" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg3 = (security_context_t)(buf3); +- result = (int)get_ordered_context_list_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); +- resultobj = SWIG_From_int((int)(result)); ++ arg1 = (security_context_t)(buf1); { - arg3 = &temp3; -@@ -9739,7 +8575,6 @@ - char *arg2 = (char *) 0 ; - security_context_t arg3 = (security_context_t) 0 ; - security_context_t **arg4 = (security_context_t **) 0 ; +- PyObject* plist; +- int i; +- +- if (*arg4) { +- plist = PyList_New(result); +- for (i = 0; i < result; i++) { +- PyList_SetItem(plist, i, PyString_FromString((*arg4)[i])); +- } +- } else { +- plist = PyList_New(0); ++ result = (int)selinux_raw_to_trans_context(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; + } +- /* Only return the Python list, don't need to return the length anymore */ +- resultobj = plist; + } +- if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- { +- if (*arg4) freeconary(*arg4); ++ resultobj = SWIG_From_int((int)(result)); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ freecon(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- { +- if (*arg4) freeconary(*arg4); +- } + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_get_default_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_raw_context_to_color(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- security_context_t arg2 = (security_context_t) 0 ; +- security_context_t *arg3 = (security_context_t *) 0 ; - int result; ++ security_context_t arg1 = (security_context_t) 0 ; ++ char **arg2 = (char **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -9753,6 +8588,7 @@ +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- security_context_t temp3 = 0 ; ++ char *temp2 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; +- PyObject * obj1 = 0 ; + int result; - { - arg4 = &temp4; -@@ -9813,7 +8649,6 @@ +- arg3 = &temp3; +- if (!PyArg_ParseTuple(args,(char *)"OO:get_default_context",&obj0,&obj1)) SWIG_fail; ++ arg2 = &temp2; ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_context_to_color",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_raw_context_to_color" "', argument " "1"" of type '" "security_context_t""'"); + } +- arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context" "', argument " "2"" of type '" "security_context_t""'"); ++ arg1 = (security_context_t)(buf1); ++ { ++ result = (int)selinux_raw_context_to_color(arg1,arg2); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg2 = (security_context_t)(buf2); +- result = (int)get_default_context((char const *)arg1,arg2,arg3); + resultobj = SWIG_From_int((int)(result)); +- if (*arg3) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); +- freecon(*arg3); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ free(*arg2); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_get_default_context_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getseuserbyname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; char *arg1 = (char *) 0 ; - security_context_t arg2 = (security_context_t) 0 ; - security_context_t *arg3 = (security_context_t *) 0 ; +- char *arg2 = (char *) 0 ; +- security_context_t arg3 = (security_context_t) 0 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; ++ char **arg2 = (char **) 0 ; ++ char **arg3 = (char **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -9823,6 +8658,7 @@ - security_context_t temp3 = 0 ; +- int res2 ; +- char *buf2 = 0 ; +- int alloc2 = 0 ; +- int res3 ; +- char *buf3 = 0 ; +- int alloc3 = 0 ; +- security_context_t temp4 = 0 ; ++ char *temp2 = 0 ; ++ char *temp3 = 0 ; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; +- PyObject * obj1 = 0 ; +- PyObject * obj2 = 0 ; + int result; - arg3 = &temp3; - if (!PyArg_ParseTuple(args,(char *)"OO:get_default_context",&obj0,&obj1)) SWIG_fail; -@@ -9862,7 +8698,6 @@ +- arg4 = &temp4; +- if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_level",&obj0,&obj1,&obj2)) SWIG_fail; ++ arg2 = &temp2; ++ arg3 = &temp3; ++ if (!PyArg_ParseTuple(args,(char *)"O:getseuserbyname",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_level" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuserbyname" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); +- res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); +- if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_level" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); +- if (!SWIG_IsOK(res3)) { +- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_level" "', argument " "3"" of type '" "security_context_t""'"); ++ { ++ result = (int)getseuserbyname((char const *)arg1,arg2,arg3); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg3 = (security_context_t)(buf3); +- result = (int)get_default_context_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); +- if (*arg4) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ if (*arg2) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); ++ free(*arg2); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ free(*arg3); + } + else { + Py_INCREF(Py_None); + resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); +- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_get_default_context_with_role(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_getseuser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; - security_context_t arg3 = (security_context_t) 0 ; - security_context_t *arg4 = (security_context_t *) 0 ; +- security_context_t arg3 = (security_context_t) 0 ; +- security_context_t *arg4 = (security_context_t *) 0 ; - int result; ++ char **arg3 = (char **) 0 ; ++ char **arg4 = (char **) 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -9876,6 +8711,7 @@ + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; +- int res3 ; +- char *buf3 = 0 ; +- int alloc3 = 0 ; +- security_context_t temp4 = 0 ; ++ char *temp3 = 0 ; ++ char *temp4 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; +- PyObject * obj2 = 0 ; + int result; ++ arg3 = &temp3; arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_level",&obj0,&obj1,&obj2)) SWIG_fail; -@@ -9922,7 +8758,6 @@ - char *arg2 = (char *) 0 ; - security_context_t arg3 = (security_context_t) 0 ; - security_context_t *arg4 = (security_context_t *) 0 ; +- if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_role",&obj0,&obj1,&obj2)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OO:getseuser",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_role" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuser" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_role" "', argument " "2"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getseuser" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = (char *)(buf2); +- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); +- if (!SWIG_IsOK(res3)) { +- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_role" "', argument " "3"" of type '" "security_context_t""'"); ++ { ++ result = (int)getseuser((char const *)arg1,(char const *)arg2,arg3,arg4); ++ if (result < 0) { ++ PyErr_SetFromErrno(PyExc_OSError); ++ return NULL; ++ } + } +- arg3 = (security_context_t)(buf3); +- result = (int)get_default_context_with_role((char const *)arg1,(char const *)arg2,arg3,arg4); + resultobj = SWIG_From_int((int)(result)); ++ if (*arg3) { ++ resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3)); ++ free(*arg3); ++ } ++ else { ++ Py_INCREF(Py_None); ++ resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ } + if (*arg4) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4)); +- freecon(*arg4); ++ free(*arg4); + } + else { + Py_INCREF(Py_None); +@@ -9966,151 +9430,102 @@ + } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_get_default_context_with_rolelevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_file_context_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; +- char *arg1 = (char *) 0 ; +- char *arg2 = (char *) 0 ; +- char *arg3 = (char *) 0 ; +- security_context_t arg4 = (security_context_t) 0 ; +- security_context_t *arg5 = (security_context_t *) 0 ; - int result; ++ security_context_t arg1 = (security_context_t) (security_context_t)0 ; ++ security_context_t arg2 = (security_context_t) (security_context_t)0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; -@@ -9936,6 +8771,7 @@ + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; +- int res3 ; +- char *buf3 = 0 ; +- int alloc3 = 0 ; +- int res4 ; +- char *buf4 = 0 ; +- int alloc4 = 0 ; +- security_context_t temp5 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -+ int result; - - arg4 = &temp4; - if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_role",&obj0,&obj1,&obj2)) SWIG_fail; -@@ -9983,7 +8819,6 @@ - char *arg3 = (char *) 0 ; - security_context_t arg4 = (security_context_t) 0 ; - security_context_t *arg5 = (security_context_t *) 0 ; -- int result; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; -@@ -10001,6 +8836,7 @@ - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; +- PyObject * obj2 = 0 ; +- PyObject * obj3 = 0 ; + int result; - arg5 = &temp5; - if (!PyArg_ParseTuple(args,(char *)"OOOO:get_default_context_with_rolelevel",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; -@@ -10052,9 +8888,9 @@ +- arg5 = &temp5; +- if (!PyArg_ParseTuple(args,(char *)"OOOO:get_default_context_with_rolelevel",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_cmp",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_rolelevel" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_file_context_cmp" "', argument " "1"" of type '" "security_context_t const""'"); + } +- arg1 = (char *)(buf1); ++ arg1 = (security_context_t)(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { +- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_rolelevel" "', argument " "2"" of type '" "char const *""'"); +- } +- arg2 = (char *)(buf2); +- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); +- if (!SWIG_IsOK(res3)) { +- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_rolelevel" "', argument " "3"" of type '" "char const *""'"); +- } +- arg3 = (char *)(buf3); +- res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); +- if (!SWIG_IsOK(res4)) { +- SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "get_default_context_with_rolelevel" "', argument " "4"" of type '" "security_context_t""'"); ++ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "selinux_file_context_cmp" "', argument " "2"" of type '" "security_context_t const""'"); + } +- arg4 = (security_context_t)(buf4); +- result = (int)get_default_context_with_rolelevel((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5); ++ arg2 = (security_context_t)(buf2); ++ result = (int)selinux_file_context_cmp(arg1,arg2); + resultobj = SWIG_From_int((int)(result)); +- if (*arg5) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg5)); +- freecon(*arg5); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return resultobj; + fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); +- if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); +- if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_query_user_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_file_context_verify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; -- int result; - security_context_t temp1 = 0 ; - security_context_t temp2 = 0 ; -+ int result; +- security_context_t *arg1 = (security_context_t *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; ++ char *arg1 = (char *) 0 ; ++ mode_t arg2 ; ++ int res1 ; ++ char *buf1 = 0 ; ++ int alloc1 = 0 ; ++ unsigned int val2 ; ++ int ecode2 = 0 ; ++ PyObject * obj0 = 0 ; ++ PyObject * obj1 = 0 ; + int result; +- security_context_t temp1 = 0 ; +- security_context_t temp2 = 0 ; - arg1 = &temp1; - arg2 = &temp2; -@@ -10087,12 +8923,12 @@ +- arg1 = &temp1; +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)":query_user_context")) SWIG_fail; +- result = (int)query_user_context(arg1,arg2); +- resultobj = SWIG_From_int((int)(result)); +- if (*arg1) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg1)); +- freecon(*arg1); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); ++ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_verify",&obj0,&obj1)) SWIG_fail; ++ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); ++ if (!SWIG_IsOK(res1)) { ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_file_context_verify" "', argument " "1"" of type '" "char const *""'"); + } ++ arg1 = (char *)(buf1); ++ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); ++ if (!SWIG_IsOK(ecode2)) { ++ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "selinux_file_context_verify" "', argument " "2"" of type '" "mode_t""'"); ++ } ++ arg2 = (mode_t)(val2); ++ result = (int)selinux_file_context_verify((char const *)arg1,arg2); ++ resultobj = SWIG_From_int((int)(result)); ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: ++ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return NULL; + } + + +-SWIGINTERN PyObject *_wrap_manual_user_enter_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { ++SWIGINTERN PyObject *_wrap_selinux_lsetfilecon_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; char *arg1 = (char *) 0 ; - security_context_t *arg2 = (security_context_t *) 0 ; +- security_context_t *arg2 = (security_context_t *) 0 ; - int result; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - security_context_t temp2 = 0 ; +- security_context_t temp2 = 0 ; PyObject * obj0 = 0 ; + int result; - arg2 = &temp2; - if (!PyArg_ParseTuple(args,(char *)"O:manual_user_enter_context",&obj0)) SWIG_fail; -@@ -10120,6 +8956,7 @@ +- arg2 = &temp2; +- if (!PyArg_ParseTuple(args,(char *)"O:manual_user_enter_context",&obj0)) SWIG_fail; ++ if (!PyArg_ParseTuple(args,(char *)"O:selinux_lsetfilecon_default",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { +- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "manual_user_enter_context" "', argument " "1"" of type '" "char const *""'"); ++ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_lsetfilecon_default" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = (char *)(buf1); +- result = (int)manual_user_enter_context((char const *)arg1,arg2); ++ result = (int)selinux_lsetfilecon_default((char const *)arg1); + resultobj = SWIG_From_int((int)(result)); +- if (*arg2) { +- resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg2)); +- freecon(*arg2); +- } +- else { +- Py_INCREF(Py_None); +- resultobj = SWIG_Python_AppendOutput(resultobj, Py_None); +- } + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return resultobj; + fail: +@@ -10120,6 +9535,52 @@ static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, ++ { (char *)"avc_sid_to_context", _wrap_avc_sid_to_context, METH_VARARGS, NULL}, ++ { (char *)"avc_sid_to_context_raw", _wrap_avc_sid_to_context_raw, METH_VARARGS, NULL}, ++ { (char *)"avc_context_to_sid", _wrap_avc_context_to_sid, METH_VARARGS, NULL}, ++ { (char *)"avc_context_to_sid_raw", _wrap_avc_context_to_sid_raw, METH_VARARGS, NULL}, ++ { (char *)"sidget", _wrap_sidget, METH_VARARGS, NULL}, ++ { (char *)"sidput", _wrap_sidput, METH_VARARGS, NULL}, ++ { (char *)"avc_get_initial_sid", _wrap_avc_get_initial_sid, METH_VARARGS, NULL}, ++ { (char *)"avc_init", _wrap_avc_init, METH_VARARGS, NULL}, ++ { (char *)"avc_open", _wrap_avc_open, METH_VARARGS, NULL}, ++ { (char *)"avc_reset", _wrap_avc_reset, METH_VARARGS, NULL}, ++ { (char *)"avc_has_perm_noaudit", _wrap_avc_has_perm_noaudit, METH_VARARGS, NULL}, ++ { (char *)"avc_has_perm", _wrap_avc_has_perm, METH_VARARGS, NULL}, ++ { (char *)"avc_compute_create", _wrap_avc_compute_create, METH_VARARGS, NULL}, ++ { (char *)"avc_compute_member", _wrap_avc_compute_member, METH_VARARGS, NULL}, ++ { (char *)"context_s_t_ptr_set", _wrap_context_s_t_ptr_set, METH_VARARGS, NULL}, ++ { (char *)"context_s_t_ptr_get", _wrap_context_s_t_ptr_get, METH_VARARGS, NULL}, ++ { (char *)"new_context_s_t", _wrap_new_context_s_t, METH_VARARGS, NULL}, ++ { (char *)"delete_context_s_t", _wrap_delete_context_s_t, METH_VARARGS, NULL}, ++ { (char *)"context_s_t_swigregister", context_s_t_swigregister, METH_VARARGS, NULL}, ++ { (char *)"context_new", _wrap_context_new, METH_VARARGS, NULL}, ++ { (char *)"context_str", _wrap_context_str, METH_VARARGS, NULL}, ++ { (char *)"context_free", _wrap_context_free, METH_VARARGS, NULL}, ++ { (char *)"context_type_get", _wrap_context_type_get, METH_VARARGS, NULL}, ++ { (char *)"context_range_get", _wrap_context_range_get, METH_VARARGS, NULL}, ++ { (char *)"context_role_get", _wrap_context_role_get, METH_VARARGS, NULL}, ++ { (char *)"context_user_get", _wrap_context_user_get, METH_VARARGS, NULL}, ++ { (char *)"context_type_set", _wrap_context_type_set, METH_VARARGS, NULL}, ++ { (char *)"context_range_set", _wrap_context_range_set, METH_VARARGS, NULL}, ++ { (char *)"context_role_set", _wrap_context_role_set, METH_VARARGS, NULL}, ++ { (char *)"context_user_set", _wrap_context_user_set, METH_VARARGS, NULL}, ++ { (char *)"get_ordered_context_list", _wrap_get_ordered_context_list, METH_VARARGS, NULL}, ++ { (char *)"get_ordered_context_list_with_level", _wrap_get_ordered_context_list_with_level, METH_VARARGS, NULL}, ++ { (char *)"get_default_context", _wrap_get_default_context, METH_VARARGS, NULL}, ++ { (char *)"get_default_context_with_level", _wrap_get_default_context_with_level, METH_VARARGS, NULL}, ++ { (char *)"get_default_context_with_role", _wrap_get_default_context_with_role, METH_VARARGS, NULL}, ++ { (char *)"get_default_context_with_rolelevel", _wrap_get_default_context_with_rolelevel, METH_VARARGS, NULL}, ++ { (char *)"query_user_context", _wrap_query_user_context, METH_VARARGS, NULL}, ++ { (char *)"manual_user_enter_context", _wrap_manual_user_enter_context, METH_VARARGS, NULL}, ++ { (char *)"selinux_default_type_path", _wrap_selinux_default_type_path, METH_VARARGS, NULL}, ++ { (char *)"get_default_type", _wrap_get_default_type, METH_VARARGS, NULL}, ++ { (char *)"selabel_open", _wrap_selabel_open, METH_VARARGS, NULL}, ++ { (char *)"selabel_close", _wrap_selabel_close, METH_VARARGS, NULL}, ++ { (char *)"selabel_lookup", _wrap_selabel_lookup, METH_VARARGS, NULL}, ++ { (char *)"selabel_lookup_raw", _wrap_selabel_lookup_raw, METH_VARARGS, NULL}, ++ { (char *)"selabel_stats", _wrap_selabel_stats, METH_VARARGS, NULL}, { (char *)"is_selinux_enabled", _wrap_is_selinux_enabled, METH_VARARGS, NULL}, { (char *)"is_selinux_mls_enabled", _wrap_is_selinux_mls_enabled, METH_VARARGS, NULL}, { (char *)"getcon", _wrap_getcon, METH_VARARGS, NULL}, -@@ -10180,17 +9017,6 @@ +@@ -10180,17 +9641,6 @@ { (char *)"new_selinux_opt", _wrap_new_selinux_opt, METH_VARARGS, NULL}, { (char *)"delete_selinux_opt", _wrap_delete_selinux_opt, METH_VARARGS, NULL}, { (char *)"selinux_opt_swigregister", selinux_opt_swigregister, METH_VARARGS, NULL}, @@ -9612,7 +16293,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel { (char *)"security_compute_av", _wrap_security_compute_av, METH_VARARGS, NULL}, { (char *)"security_compute_av_raw", _wrap_security_compute_av_raw, METH_VARARGS, NULL}, { (char *)"security_compute_create", _wrap_security_compute_create, METH_VARARGS, NULL}, -@@ -10235,23 +9061,16 @@ +@@ -10235,23 +9685,16 @@ { (char *)"new_security_class_mapping", _wrap_new_security_class_mapping, METH_VARARGS, NULL}, { (char *)"delete_security_class_mapping", _wrap_delete_security_class_mapping, METH_VARARGS, NULL}, { (char *)"security_class_mapping_swigregister", security_class_mapping_swigregister, METH_VARARGS, NULL}, @@ -9636,7 +16317,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel { (char *)"matchmediacon", _wrap_matchmediacon, METH_VARARGS, NULL}, { (char *)"selinux_getenforcemode", _wrap_selinux_getenforcemode, METH_VARARGS, NULL}, { (char *)"selinux_getpolicytype", _wrap_selinux_getpolicytype, METH_VARARGS, NULL}, -@@ -10264,8 +9083,11 @@ +@@ -10264,8 +9707,11 @@ { (char *)"selinux_file_context_path", _wrap_selinux_file_context_path, METH_VARARGS, NULL}, { (char *)"selinux_file_context_homedir_path", _wrap_selinux_file_context_homedir_path, METH_VARARGS, NULL}, { (char *)"selinux_file_context_local_path", _wrap_selinux_file_context_local_path, METH_VARARGS, NULL}, @@ -9648,7 +16329,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel { (char *)"selinux_x_context_path", _wrap_selinux_x_context_path, METH_VARARGS, NULL}, { (char *)"selinux_contexts_path", _wrap_selinux_contexts_path, METH_VARARGS, NULL}, { (char *)"selinux_securetty_types_path", _wrap_selinux_securetty_types_path, METH_VARARGS, NULL}, -@@ -10280,23 +9102,16 @@ +@@ -10280,108 +9726,16 @@ { (char *)"selinux_check_passwd_access", _wrap_selinux_check_passwd_access, METH_VARARGS, NULL}, { (char *)"checkPasswdAccess", _wrap_checkPasswdAccess, METH_VARARGS, NULL}, { (char *)"selinux_check_securetty_context", _wrap_selinux_check_securetty_context, METH_VARARGS, NULL}, @@ -9670,13 +16351,13 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - { (char *)"new_security_id", _wrap_new_security_id, METH_VARARGS, NULL}, - { (char *)"delete_security_id", _wrap_delete_security_id, METH_VARARGS, NULL}, - { (char *)"security_id_swigregister", security_id_swigregister, METH_VARARGS, NULL}, - { (char *)"avc_sid_to_context", _wrap_avc_sid_to_context, METH_VARARGS, NULL}, - { (char *)"avc_sid_to_context_raw", _wrap_avc_sid_to_context_raw, METH_VARARGS, NULL}, - { (char *)"avc_context_to_sid", _wrap_avc_context_to_sid, METH_VARARGS, NULL}, -@@ -10304,74 +9119,13 @@ - { (char *)"sidget", _wrap_sidget, METH_VARARGS, NULL}, - { (char *)"sidput", _wrap_sidput, METH_VARARGS, NULL}, - { (char *)"avc_get_initial_sid", _wrap_avc_get_initial_sid, METH_VARARGS, NULL}, +- { (char *)"avc_sid_to_context", _wrap_avc_sid_to_context, METH_VARARGS, NULL}, +- { (char *)"avc_sid_to_context_raw", _wrap_avc_sid_to_context_raw, METH_VARARGS, NULL}, +- { (char *)"avc_context_to_sid", _wrap_avc_context_to_sid, METH_VARARGS, NULL}, +- { (char *)"avc_context_to_sid_raw", _wrap_avc_context_to_sid_raw, METH_VARARGS, NULL}, +- { (char *)"sidget", _wrap_sidget, METH_VARARGS, NULL}, +- { (char *)"sidput", _wrap_sidput, METH_VARARGS, NULL}, +- { (char *)"avc_get_initial_sid", _wrap_avc_get_initial_sid, METH_VARARGS, NULL}, - { (char *)"avc_entry_ref_ae_set", _wrap_avc_entry_ref_ae_set, METH_VARARGS, NULL}, - { (char *)"avc_entry_ref_ae_get", _wrap_avc_entry_ref_ae_get, METH_VARARGS, NULL}, - { (char *)"new_avc_entry_ref", _wrap_new_avc_entry_ref, METH_VARARGS, NULL}, @@ -9714,16 +16395,16 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - { (char *)"new_avc_lock_callback", _wrap_new_avc_lock_callback, METH_VARARGS, NULL}, - { (char *)"delete_avc_lock_callback", _wrap_delete_avc_lock_callback, METH_VARARGS, NULL}, - { (char *)"avc_lock_callback_swigregister", avc_lock_callback_swigregister, METH_VARARGS, NULL}, - { (char *)"avc_init", _wrap_avc_init, METH_VARARGS, NULL}, - { (char *)"avc_open", _wrap_avc_open, METH_VARARGS, NULL}, +- { (char *)"avc_init", _wrap_avc_init, METH_VARARGS, NULL}, +- { (char *)"avc_open", _wrap_avc_open, METH_VARARGS, NULL}, - { (char *)"avc_cleanup", _wrap_avc_cleanup, METH_VARARGS, NULL}, - { (char *)"avc_reset", _wrap_avc_reset, METH_VARARGS, NULL}, +- { (char *)"avc_reset", _wrap_avc_reset, METH_VARARGS, NULL}, - { (char *)"avc_destroy", _wrap_avc_destroy, METH_VARARGS, NULL}, - { (char *)"avc_has_perm_noaudit", _wrap_avc_has_perm_noaudit, METH_VARARGS, NULL}, - { (char *)"avc_has_perm", _wrap_avc_has_perm, METH_VARARGS, NULL}, +- { (char *)"avc_has_perm_noaudit", _wrap_avc_has_perm_noaudit, METH_VARARGS, NULL}, +- { (char *)"avc_has_perm", _wrap_avc_has_perm, METH_VARARGS, NULL}, - { (char *)"avc_audit", _wrap_avc_audit, METH_VARARGS, NULL}, - { (char *)"avc_compute_create", _wrap_avc_compute_create, METH_VARARGS, NULL}, - { (char *)"avc_compute_member", _wrap_avc_compute_member, METH_VARARGS, NULL}, +- { (char *)"avc_compute_create", _wrap_avc_compute_create, METH_VARARGS, NULL}, +- { (char *)"avc_compute_member", _wrap_avc_compute_member, METH_VARARGS, NULL}, - { (char *)"avc_cache_stats_entry_lookups_set", _wrap_avc_cache_stats_entry_lookups_set, METH_VARARGS, NULL}, - { (char *)"avc_cache_stats_entry_lookups_get", _wrap_avc_cache_stats_entry_lookups_get, METH_VARARGS, NULL}, - { (char *)"avc_cache_stats_entry_hits_set", _wrap_avc_cache_stats_entry_hits_set, METH_VARARGS, NULL}, @@ -9745,10 +16426,20 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - { (char *)"avc_cache_stats_swigregister", avc_cache_stats_swigregister, METH_VARARGS, NULL}, - { (char *)"avc_av_stats", _wrap_avc_av_stats, METH_VARARGS, NULL}, - { (char *)"avc_sid_stats", _wrap_avc_sid_stats, METH_VARARGS, NULL}, - { (char *)"selinux_default_type_path", _wrap_selinux_default_type_path, METH_VARARGS, NULL}, - { (char *)"get_default_type", _wrap_get_default_type, METH_VARARGS, NULL}, - { (char *)"get_ordered_context_list", _wrap_get_ordered_context_list, METH_VARARGS, NULL}, -@@ -10390,31 +9144,19 @@ +- { (char *)"selinux_default_type_path", _wrap_selinux_default_type_path, METH_VARARGS, NULL}, +- { (char *)"get_default_type", _wrap_get_default_type, METH_VARARGS, NULL}, +- { (char *)"get_ordered_context_list", _wrap_get_ordered_context_list, METH_VARARGS, NULL}, +- { (char *)"get_ordered_context_list_with_level", _wrap_get_ordered_context_list_with_level, METH_VARARGS, NULL}, +- { (char *)"get_default_context", _wrap_get_default_context, METH_VARARGS, NULL}, +- { (char *)"get_default_context_with_level", _wrap_get_default_context_with_level, METH_VARARGS, NULL}, +- { (char *)"get_default_context_with_role", _wrap_get_default_context_with_role, METH_VARARGS, NULL}, +- { (char *)"get_default_context_with_rolelevel", _wrap_get_default_context_with_rolelevel, METH_VARARGS, NULL}, +- { (char *)"query_user_context", _wrap_query_user_context, METH_VARARGS, NULL}, +- { (char *)"manual_user_enter_context", _wrap_manual_user_enter_context, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } + }; + +@@ -10390,55 +9744,36 @@ static swig_type_info _swigt__p_SELboolean = {"_p_SELboolean", "SELboolean *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_av_decision = {"_p_av_decision", "struct av_decision *|av_decision *", 0, 0, (void*)0, 0}; @@ -9774,6 +16465,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -static swig_type_info _swigt__p_f_p_void_unsigned_short_p_char_size_t__void = {"_p_f_p_void_unsigned_short_p_char_size_t__void", "void (*)(void *,unsigned short,char *,size_t)|void (*)(void *,security_class_t,char *,size_t)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_size_t__p_void = {"_p_f_size_t__p_void", "void *(*)(size_t)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_void__p_void = {"_p_f_void__p_void", "void *(*)(void)", 0, 0, (void*)0, 0}; ++static swig_type_info _swigt__p_context_s_t = {"_p_context_s_t", "context_s_t *|context_t", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_ino_t = {"_p_ino_t", "ino_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **|security_context_t *", 0, 0, (void*)0, 0}; @@ -9783,10 +16475,12 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -static swig_type_info _swigt__p_security_id = {"_p_security_id", "security_id_t|struct security_id *|security_id *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_selinux_callback = {"_p_selinux_callback", "union selinux_callback *|selinux_callback *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_security_id = {"_p_security_id", "security_id_t|struct security_id *", 0, 0, (void*)0, 0}; ++static swig_type_info _swigt__p_selabel_handle = {"_p_selabel_handle", "struct selabel_handle *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_selinux_opt = {"_p_selinux_opt", "struct selinux_opt *|selinux_opt *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|access_vector_t *|mode_t *|pid_t *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "security_class_t *|unsigned short *", 0, 0, (void*)0, 0}; -@@ -10422,23 +9164,12 @@ ++static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; + static swig_type_info *swig_type_initial[] = { &_swigt__p_SELboolean, &_swigt__p_av_decision, @@ -9807,18 +16501,21 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - &_swigt__p_f_p_void_unsigned_short_p_char_size_t__void, - &_swigt__p_f_size_t__p_void, - &_swigt__p_f_void__p_void, ++ &_swigt__p_context_s_t, &_swigt__p_ino_t, &_swigt__p_int, &_swigt__p_p_char, -@@ -10446,7 +9177,6 @@ +@@ -10446,31 +9781,22 @@ &_swigt__p_p_security_id, &_swigt__p_security_class_mapping, &_swigt__p_security_id, - &_swigt__p_selinux_callback, ++ &_swigt__p_selabel_handle, &_swigt__p_selinux_opt, &_swigt__p_unsigned_int, &_swigt__p_unsigned_short, -@@ -10454,23 +9184,12 @@ ++ &_swigt__p_void, + }; static swig_cast_info _swigc__p_SELboolean[] = { {&_swigt__p_SELboolean, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_av_decision[] = { {&_swigt__p_av_decision, 0, 0, 0},{0, 0, 0, 0}}; @@ -9839,18 +16536,21 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel -static swig_cast_info _swigc__p_f_p_void_unsigned_short_p_char_size_t__void[] = { {&_swigt__p_f_p_void_unsigned_short_p_char_size_t__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_size_t__p_void[] = { {&_swigt__p_f_size_t__p_void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_void__p_void[] = { {&_swigt__p_f_void__p_void, 0, 0, 0},{0, 0, 0, 0}}; ++static swig_cast_info _swigc__p_context_s_t[] = { {&_swigt__p_context_s_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_ino_t[] = { {&_swigt__p_ino_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; -@@ -10478,7 +9197,6 @@ +@@ -10478,31 +9804,22 @@ static swig_cast_info _swigc__p_p_security_id[] = { {&_swigt__p_p_security_id, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_security_class_mapping[] = { {&_swigt__p_security_class_mapping, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_security_id[] = { {&_swigt__p_security_id, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_selinux_callback[] = { {&_swigt__p_selinux_callback, 0, 0, 0},{0, 0, 0, 0}}; ++static swig_cast_info _swigc__p_selabel_handle[] = { {&_swigt__p_selabel_handle, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_selinux_opt[] = { {&_swigt__p_selinux_opt, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; -@@ -10486,23 +9204,12 @@ ++static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; + static swig_cast_info *swig_cast_initial[] = { _swigc__p_SELboolean, _swigc__p_av_decision, @@ -9871,18 +16571,24 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel - _swigc__p_f_p_void_unsigned_short_p_char_size_t__void, - _swigc__p_f_size_t__p_void, - _swigc__p_f_void__p_void, ++ _swigc__p_context_s_t, _swigc__p_ino_t, _swigc__p_int, _swigc__p_p_char, -@@ -10510,7 +9217,6 @@ +@@ -10510,10 +9827,11 @@ _swigc__p_p_security_id, _swigc__p_security_class_mapping, _swigc__p_security_id, - _swigc__p_selinux_callback, ++ _swigc__p_selabel_handle, _swigc__p_selinux_opt, _swigc__p_unsigned_int, _swigc__p_unsigned_short, -@@ -10791,18 +9497,48 @@ ++ _swigc__p_void, + }; + + +@@ -10791,18 +10109,48 @@ SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { @@ -9932,7 +16638,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel return str; } -@@ -10810,7 +9546,7 @@ +@@ -10810,7 +10158,7 @@ swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); @@ -9941,7 +16647,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel Py_DECREF(str); return 0; } -@@ -10868,8 +9604,13 @@ +@@ -10868,8 +10216,13 @@ if (!type_init) { const PyTypeObject tmp = { @@ -9955,7 +16661,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel (char *)"swigvarlink", /* Type name (tp_name) */ sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 0, /* Itemsize (tp_itemsize) */ -@@ -10905,7 +9646,10 @@ +@@ -10905,7 +10258,10 @@ #endif }; varlink_type = tmp; @@ -9966,7 +16672,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel type_init = 1; } return &varlink_type; -@@ -11030,13 +9774,35 @@ +@@ -11030,29 +10386,41 @@ #ifdef __cplusplus extern "C" #endif @@ -10003,10 +16709,1179 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libsel d = PyModule_GetDict(m); SWIG_InitializeModule(0); -@@ -11065,5 +9831,10 @@ + SWIG_InstallConstants(d,swig_const_table); + + +- SWIG_Python_SetConstant(d, "SELINUX_CB_LOG",SWIG_From_int((int)(0))); +- SWIG_Python_SetConstant(d, "SELINUX_CB_AUDIT",SWIG_From_int((int)(1))); +- SWIG_Python_SetConstant(d, "SELINUX_CB_VALIDATE",SWIG_From_int((int)(2))); +- SWIG_Python_SetConstant(d, "SELINUX_ERROR",SWIG_From_int((int)(0))); +- SWIG_Python_SetConstant(d, "SELINUX_WARNING",SWIG_From_int((int)(1))); +- SWIG_Python_SetConstant(d, "SELINUX_INFO",SWIG_From_int((int)(2))); +- SWIG_Python_SetConstant(d, "SELINUX_AVC",SWIG_From_int((int)(3))); +- SWIG_Python_SetConstant(d, "MATCHPATHCON_BASEONLY",SWIG_From_int((int)(1))); +- SWIG_Python_SetConstant(d, "MATCHPATHCON_NOTRANS",SWIG_From_int((int)(2))); +- SWIG_Python_SetConstant(d, "MATCHPATHCON_VALIDATE",SWIG_From_int((int)(4))); + SWIG_Python_SetConstant(d, "AVC_OPT_UNUSED",SWIG_From_int((int)(0))); + SWIG_Python_SetConstant(d, "AVC_OPT_SETENFORCE",SWIG_From_int((int)(1))); + SWIG_Python_SetConstant(d, "AVC_CALLBACK_GRANT",SWIG_From_int((int)(1))); +@@ -11064,6 +10432,1163 @@ + SWIG_Python_SetConstant(d, "AVC_CALLBACK_AUDITDENY_ENABLE",SWIG_From_int((int)(64))); SWIG_Python_SetConstant(d, "AVC_CALLBACK_AUDITDENY_DISABLE",SWIG_From_int((int)(128))); SWIG_Python_SetConstant(d, "AVC_CACHE_STATS",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__UNIX_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "COMMON_IPC__UNIX_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "COMMON_DATABASE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__MOUNT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__REMOUNT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__UNMOUNT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__TRANSITION",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__QUOTAMOD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "FILESYSTEM__QUOTAGET",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DIR__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DIR__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DIR__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DIR__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DIR__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DIR__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DIR__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DIR__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DIR__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DIR__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DIR__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "DIR__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "DIR__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "DIR__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "DIR__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "DIR__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "DIR__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "DIR__ADD_NAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "DIR__REMOVE_NAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "DIR__REPARENT",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "DIR__SEARCH",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "DIR__RMDIR",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "DIR__OPEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "FILE__EXECUTE_NO_TRANS",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "FILE__ENTRYPOINT",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "FILE__EXECMOD",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "FILE__OPEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "LNK_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__EXECUTE_NO_TRANS",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__ENTRYPOINT",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__EXECMOD",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "CHR_FILE__OPEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "BLK_FILE__OPEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "SOCK_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__UNLINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__RENAME",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__SWAPON",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__QUOTAON",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__MOUNTON",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "FIFO_FILE__OPEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "FD__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__CONNECTTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__NEWCONN",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__ACCEPTFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x01000000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__NODE_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x02000000UL))); ++ SWIG_Python_SetConstant(d, "TCP_SOCKET__NAME_CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x04000000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "UDP_SOCKET__NODE_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "RAWIP_SOCKET__NODE_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NODE__TCP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NODE__TCP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NODE__UDP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NODE__UDP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NODE__RAWIP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NODE__RAWIP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NODE__ENFORCE_DEST",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NODE__DCCP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NODE__DCCP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NODE__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NODE__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETIF__TCP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETIF__TCP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETIF__UDP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETIF__UDP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETIF__RAWIP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETIF__RAWIP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETIF__DCCP_RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETIF__DCCP_SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETIF__INGRESS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETIF__EGRESS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "PACKET_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "KEY_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__CONNECTTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__NEWCONN",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_STREAM_SOCKET__ACCEPTFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x01000000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "UNIX_DGRAM_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__FORK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__TRANSITION",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGCHLD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGKILL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGSTOP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGNULL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGNAL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__PTRACE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__GETSCHED",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETSCHED",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__GETSESSION",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__GETPGID",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETPGID",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__GETCAP",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETCAP",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SHARE",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETEXEC",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETFSCREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__NOATSECURE",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SIGINH",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETRLIMIT",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__RLIMITINH",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__DYNTRANSITION",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETCURRENT",SWIG_From_unsigned_SS_long((unsigned long)(0x01000000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__EXECMEM",SWIG_From_unsigned_SS_long((unsigned long)(0x02000000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__EXECSTACK",SWIG_From_unsigned_SS_long((unsigned long)(0x04000000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__EXECHEAP",SWIG_From_unsigned_SS_long((unsigned long)(0x08000000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETKEYCREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x10000000UL))); ++ SWIG_Python_SetConstant(d, "PROCESS__SETSOCKCREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x20000000UL))); ++ SWIG_Python_SetConstant(d, "IPC__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "IPC__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "IPC__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "IPC__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "IPC__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "IPC__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "IPC__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "IPC__UNIX_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "IPC__UNIX_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "SEM__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SEM__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SEM__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SEM__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "SEM__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "SEM__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "SEM__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "SEM__UNIX_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "SEM__UNIX_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__UNIX_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__UNIX_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "MSGQ__ENQUEUE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "MSG__SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "MSG__RECEIVE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SHM__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SHM__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SHM__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SHM__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "SHM__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "SHM__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "SHM__ASSOCIATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "SHM__UNIX_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "SHM__UNIX_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "SHM__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__COMPUTE_AV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__COMPUTE_CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__COMPUTE_MEMBER",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__CHECK_CONTEXT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__LOAD_POLICY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__COMPUTE_RELABEL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__COMPUTE_USER",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__SETENFORCE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__SETBOOL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__SETSECPARAM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "SECURITY__SETCHECKREQPROT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "SYSTEM__IPC_INFO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "SYSTEM__SYSLOG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "SYSTEM__SYSLOG_MOD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SYSTEM__SYSLOG_CONSOLE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__CHOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__DAC_OVERRIDE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__DAC_READ_SEARCH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__FOWNER",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__FSETID",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__KILL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SETGID",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SETUID",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SETPCAP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__LINUX_IMMUTABLE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__NET_BIND_SERVICE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__NET_BROADCAST",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__NET_ADMIN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__NET_RAW",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__IPC_LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__IPC_OWNER",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_MODULE",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_RAWIO",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_CHROOT",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_PTRACE",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_PACCT",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_ADMIN",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_BOOT",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_NICE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_RESOURCE",SWIG_From_unsigned_SS_long((unsigned long)(0x01000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_TIME",SWIG_From_unsigned_SS_long((unsigned long)(0x02000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SYS_TTY_CONFIG",SWIG_From_unsigned_SS_long((unsigned long)(0x04000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__MKNOD",SWIG_From_unsigned_SS_long((unsigned long)(0x08000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__LEASE",SWIG_From_unsigned_SS_long((unsigned long)(0x10000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__AUDIT_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x20000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__AUDIT_CONTROL",SWIG_From_unsigned_SS_long((unsigned long)(0x40000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY__SETFCAP",SWIG_From_unsigned_SS_long((unsigned long)(0x80000000UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY2__MAC_OVERRIDE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "CAPABILITY2__MAC_ADMIN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "PASSWD__PASSWD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "PASSWD__CHFN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "PASSWD__CHSH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "PASSWD__ROOTOK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "PASSWD__CRONTAB",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__BLEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__LIST_CHILD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__ADD_CHILD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__REMOVE_CHILD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__LIST_PROPERTY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__GET_PROPERTY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__SET_PROPERTY",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__MANAGE",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__OVERRIDE",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__SHOW",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__HIDE",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "X_DRAWABLE__RECEIVE",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__HIDE_CURSOR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SHOW_CURSOR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SAVER_GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SAVER_SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SAVER_HIDE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_SCREEN__SAVER_SHOW",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "X_GC__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_GC__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_GC__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_GC__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_GC__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__ADD_GLYPH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__REMOVE_GLYPH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_FONT__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__ADD_COLOR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__REMOVE_COLOR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__INSTALL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__UNINSTALL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "X_COLORMAP__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_PROPERTY__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_SELECTION__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_SELECTION__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_SELECTION__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_SELECTION__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_CURSOR__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_CLIENT__DESTROY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_CLIENT__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_CLIENT__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_CLIENT__MANAGE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__GETFOCUS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__SETFOCUS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__BELL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__FORCE_CURSOR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__FREEZE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__GRAB",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "X_DEVICE__MANAGE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__RECORD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__DEBUG",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__GRAB",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "X_SERVER__MANAGE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "X_EXTENSION__QUERY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_EXTENSION__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_RESOURCE__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_RESOURCE__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_EVENT__SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_EVENT__RECEIVE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_SYNTHETIC_EVENT__SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_SYNTHETIC_EVENT__RECEIVE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_ROUTE_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_FIREWALL_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_NFLOG_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_XFRM_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_SELINUX_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NLMSG_RELAY",SWIG_From_unsigned_SS_long((unsigned long)(0x01000000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NLMSG_READPRIV",SWIG_From_unsigned_SS_long((unsigned long)(0x02000000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_AUDIT_SOCKET__NLMSG_TTY_AUDIT",SWIG_From_unsigned_SS_long((unsigned long)(0x04000000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__NLMSG_READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_IP6FW_SOCKET__NLMSG_WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_DNRT_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "DBUS__ACQUIRE_SVC",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DBUS__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NSCD__GETPWD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NSCD__GETGRP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NSCD__GETHOST",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NSCD__GETSTAT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NSCD__ADMIN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NSCD__SHMEMPWD",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NSCD__SHMEMGRP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NSCD__SHMEMHOST",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NSCD__GETSERV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NSCD__SHMEMSERV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "ASSOCIATION__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "ASSOCIATION__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "ASSOCIATION__SETCONTEXT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "ASSOCIATION__POLMATCH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "APPLETALK_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "PACKET__SEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "PACKET__RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "PACKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "PACKET__FLOW_IN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "PACKET__FLOW_OUT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "PACKET__FORWARD_IN",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "PACKET__FORWARD_OUT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "KEY__VIEW",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "KEY__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "KEY__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "KEY__SEARCH",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "KEY__LINK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "KEY__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "KEY__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "CONTEXT__TRANSLATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "CONTEXT__CONTAINS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__IOCTL",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__APPEND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__LISTEN",SWIG_From_unsigned_SS_long((unsigned long)(0x00001000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__ACCEPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00002000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__GETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00004000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__SETOPT",SWIG_From_unsigned_SS_long((unsigned long)(0x00008000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__SHUTDOWN",SWIG_From_unsigned_SS_long((unsigned long)(0x00010000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__RECVFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00020000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__SENDTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00040000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__RECV_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00080000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__SEND_MSG",SWIG_From_unsigned_SS_long((unsigned long)(0x00100000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__NAME_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00200000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__NODE_BIND",SWIG_From_unsigned_SS_long((unsigned long)(0x00400000UL))); ++ SWIG_Python_SetConstant(d, "DCCP_SOCKET__NAME_CONNECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00800000UL))); ++ SWIG_Python_SetConstant(d, "MEMPROTECT__MMAP_ZERO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__ACCESS",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__INSTALL_MODULE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__LOAD_MODULE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__GET_PARAM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DB_DATABASE__SET_PARAM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__SELECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__UPDATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__INSERT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__DELETE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000400UL))); ++ SWIG_Python_SetConstant(d, "DB_TABLE__LOCK",SWIG_From_unsigned_SS_long((unsigned long)(0x00000800UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__EXECUTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_PROCEDURE__ENTRYPOINT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__SELECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__UPDATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DB_COLUMN__INSERT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__USE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__SELECT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__UPDATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__INSERT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_TUPLE__DELETE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__CREATE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__DROP",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__GETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__SETATTR",SWIG_From_unsigned_SS_long((unsigned long)(0x00000008UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__RELABELFROM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000010UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__RELABELTO",SWIG_From_unsigned_SS_long((unsigned long)(0x00000020UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__READ",SWIG_From_unsigned_SS_long((unsigned long)(0x00000040UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__WRITE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000080UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__IMPORT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000100UL))); ++ SWIG_Python_SetConstant(d, "DB_BLOB__EXPORT",SWIG_From_unsigned_SS_long((unsigned long)(0x00000200UL))); ++ SWIG_Python_SetConstant(d, "PEER__RECV",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_APPLICATION_DATA__PASTE",SWIG_From_unsigned_SS_long((unsigned long)(0x00000001UL))); ++ SWIG_Python_SetConstant(d, "X_APPLICATION_DATA__PASTE_AFTER_CONFIRM",SWIG_From_unsigned_SS_long((unsigned long)(0x00000002UL))); ++ SWIG_Python_SetConstant(d, "X_APPLICATION_DATA__COPY",SWIG_From_unsigned_SS_long((unsigned long)(0x00000004UL))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SECURITY",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SECCLASS_PROCESS",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SYSTEM",SWIG_From_int((int)(3))); ++ SWIG_Python_SetConstant(d, "SECCLASS_CAPABILITY",SWIG_From_int((int)(4))); ++ SWIG_Python_SetConstant(d, "SECCLASS_FILESYSTEM",SWIG_From_int((int)(5))); ++ SWIG_Python_SetConstant(d, "SECCLASS_FILE",SWIG_From_int((int)(6))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DIR",SWIG_From_int((int)(7))); ++ SWIG_Python_SetConstant(d, "SECCLASS_FD",SWIG_From_int((int)(8))); ++ SWIG_Python_SetConstant(d, "SECCLASS_LNK_FILE",SWIG_From_int((int)(9))); ++ SWIG_Python_SetConstant(d, "SECCLASS_CHR_FILE",SWIG_From_int((int)(10))); ++ SWIG_Python_SetConstant(d, "SECCLASS_BLK_FILE",SWIG_From_int((int)(11))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SOCK_FILE",SWIG_From_int((int)(12))); ++ SWIG_Python_SetConstant(d, "SECCLASS_FIFO_FILE",SWIG_From_int((int)(13))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SOCKET",SWIG_From_int((int)(14))); ++ SWIG_Python_SetConstant(d, "SECCLASS_TCP_SOCKET",SWIG_From_int((int)(15))); ++ SWIG_Python_SetConstant(d, "SECCLASS_UDP_SOCKET",SWIG_From_int((int)(16))); ++ SWIG_Python_SetConstant(d, "SECCLASS_RAWIP_SOCKET",SWIG_From_int((int)(17))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NODE",SWIG_From_int((int)(18))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETIF",SWIG_From_int((int)(19))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_SOCKET",SWIG_From_int((int)(20))); ++ SWIG_Python_SetConstant(d, "SECCLASS_PACKET_SOCKET",SWIG_From_int((int)(21))); ++ SWIG_Python_SetConstant(d, "SECCLASS_KEY_SOCKET",SWIG_From_int((int)(22))); ++ SWIG_Python_SetConstant(d, "SECCLASS_UNIX_STREAM_SOCKET",SWIG_From_int((int)(23))); ++ SWIG_Python_SetConstant(d, "SECCLASS_UNIX_DGRAM_SOCKET",SWIG_From_int((int)(24))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SEM",SWIG_From_int((int)(25))); ++ SWIG_Python_SetConstant(d, "SECCLASS_MSG",SWIG_From_int((int)(26))); ++ SWIG_Python_SetConstant(d, "SECCLASS_MSGQ",SWIG_From_int((int)(27))); ++ SWIG_Python_SetConstant(d, "SECCLASS_SHM",SWIG_From_int((int)(28))); ++ SWIG_Python_SetConstant(d, "SECCLASS_IPC",SWIG_From_int((int)(29))); ++ SWIG_Python_SetConstant(d, "SECCLASS_PASSWD",SWIG_From_int((int)(30))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_DRAWABLE",SWIG_From_int((int)(31))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_SCREEN",SWIG_From_int((int)(32))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_GC",SWIG_From_int((int)(33))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_FONT",SWIG_From_int((int)(34))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_COLORMAP",SWIG_From_int((int)(35))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_PROPERTY",SWIG_From_int((int)(36))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_SELECTION",SWIG_From_int((int)(37))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_CURSOR",SWIG_From_int((int)(38))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_CLIENT",SWIG_From_int((int)(39))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_DEVICE",SWIG_From_int((int)(40))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_SERVER",SWIG_From_int((int)(41))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_EXTENSION",SWIG_From_int((int)(42))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_ROUTE_SOCKET",SWIG_From_int((int)(43))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_FIREWALL_SOCKET",SWIG_From_int((int)(44))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_TCPDIAG_SOCKET",SWIG_From_int((int)(45))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_NFLOG_SOCKET",SWIG_From_int((int)(46))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_XFRM_SOCKET",SWIG_From_int((int)(47))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_SELINUX_SOCKET",SWIG_From_int((int)(48))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_AUDIT_SOCKET",SWIG_From_int((int)(49))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_IP6FW_SOCKET",SWIG_From_int((int)(50))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_DNRT_SOCKET",SWIG_From_int((int)(51))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DBUS",SWIG_From_int((int)(52))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NSCD",SWIG_From_int((int)(53))); ++ SWIG_Python_SetConstant(d, "SECCLASS_ASSOCIATION",SWIG_From_int((int)(54))); ++ SWIG_Python_SetConstant(d, "SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET",SWIG_From_int((int)(55))); ++ SWIG_Python_SetConstant(d, "SECCLASS_APPLETALK_SOCKET",SWIG_From_int((int)(56))); ++ SWIG_Python_SetConstant(d, "SECCLASS_PACKET",SWIG_From_int((int)(57))); ++ SWIG_Python_SetConstant(d, "SECCLASS_KEY",SWIG_From_int((int)(58))); ++ SWIG_Python_SetConstant(d, "SECCLASS_CONTEXT",SWIG_From_int((int)(59))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DCCP_SOCKET",SWIG_From_int((int)(60))); ++ SWIG_Python_SetConstant(d, "SECCLASS_MEMPROTECT",SWIG_From_int((int)(61))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_DATABASE",SWIG_From_int((int)(62))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_TABLE",SWIG_From_int((int)(63))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_PROCEDURE",SWIG_From_int((int)(64))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_COLUMN",SWIG_From_int((int)(65))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_TUPLE",SWIG_From_int((int)(66))); ++ SWIG_Python_SetConstant(d, "SECCLASS_DB_BLOB",SWIG_From_int((int)(67))); ++ SWIG_Python_SetConstant(d, "SECCLASS_PEER",SWIG_From_int((int)(68))); ++ SWIG_Python_SetConstant(d, "SECCLASS_CAPABILITY2",SWIG_From_int((int)(69))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_RESOURCE",SWIG_From_int((int)(70))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_EVENT",SWIG_From_int((int)(71))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_SYNTHETIC_EVENT",SWIG_From_int((int)(72))); ++ SWIG_Python_SetConstant(d, "SECCLASS_X_APPLICATION_DATA",SWIG_From_int((int)(73))); ++ SWIG_Python_SetConstant(d, "SECINITSID_KERNEL",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SECURITY",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SECINITSID_UNLABELED",SWIG_From_int((int)(3))); ++ SWIG_Python_SetConstant(d, "SECINITSID_FS",SWIG_From_int((int)(4))); ++ SWIG_Python_SetConstant(d, "SECINITSID_FILE",SWIG_From_int((int)(5))); ++ SWIG_Python_SetConstant(d, "SECINITSID_FILE_LABELS",SWIG_From_int((int)(6))); ++ SWIG_Python_SetConstant(d, "SECINITSID_INIT",SWIG_From_int((int)(7))); ++ SWIG_Python_SetConstant(d, "SECINITSID_ANY_SOCKET",SWIG_From_int((int)(8))); ++ SWIG_Python_SetConstant(d, "SECINITSID_PORT",SWIG_From_int((int)(9))); ++ SWIG_Python_SetConstant(d, "SECINITSID_NETIF",SWIG_From_int((int)(10))); ++ SWIG_Python_SetConstant(d, "SECINITSID_NETMSG",SWIG_From_int((int)(11))); ++ SWIG_Python_SetConstant(d, "SECINITSID_NODE",SWIG_From_int((int)(12))); ++ SWIG_Python_SetConstant(d, "SECINITSID_IGMP_PACKET",SWIG_From_int((int)(13))); ++ SWIG_Python_SetConstant(d, "SECINITSID_ICMP_SOCKET",SWIG_From_int((int)(14))); ++ SWIG_Python_SetConstant(d, "SECINITSID_TCP_SOCKET",SWIG_From_int((int)(15))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_MODPROBE",SWIG_From_int((int)(16))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL",SWIG_From_int((int)(17))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_FS",SWIG_From_int((int)(18))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_KERNEL",SWIG_From_int((int)(19))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_NET",SWIG_From_int((int)(20))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_NET_UNIX",SWIG_From_int((int)(21))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_VM",SWIG_From_int((int)(22))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SYSCTL_DEV",SWIG_From_int((int)(23))); ++ SWIG_Python_SetConstant(d, "SECINITSID_KMOD",SWIG_From_int((int)(24))); ++ SWIG_Python_SetConstant(d, "SECINITSID_POLICY",SWIG_From_int((int)(25))); ++ SWIG_Python_SetConstant(d, "SECINITSID_SCMP_PACKET",SWIG_From_int((int)(26))); ++ SWIG_Python_SetConstant(d, "SECINITSID_DEVNULL",SWIG_From_int((int)(27))); ++ SWIG_Python_SetConstant(d, "SECINITSID_NUM",SWIG_From_int((int)(27))); SWIG_Python_SetConstant(d, "SELINUX_DEFAULTUSER",SWIG_FromCharPtr("user_u")); ++ SWIG_Python_SetConstant(d, "SELABEL_CTX_FILE",SWIG_From_int((int)(0))); ++ SWIG_Python_SetConstant(d, "SELABEL_CTX_MEDIA",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SELABEL_CTX_X",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SELABEL_OPT_UNUSED",SWIG_From_int((int)(0))); ++ SWIG_Python_SetConstant(d, "SELABEL_OPT_VALIDATE",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SELABEL_OPT_BASEONLY",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SELABEL_OPT_PATH",SWIG_From_int((int)(3))); ++ SWIG_Python_SetConstant(d, "SELABEL_OPT_SUBSET",SWIG_From_int((int)(4))); ++ SWIG_Python_SetConstant(d, "SELABEL_NOPT",SWIG_From_int((int)(5))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_PROP",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_EXT",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_CLIENT",SWIG_From_int((int)(3))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_EVENT",SWIG_From_int((int)(4))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_SELN",SWIG_From_int((int)(5))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_POLYPROP",SWIG_From_int((int)(6))); ++ SWIG_Python_SetConstant(d, "SELABEL_X_POLYSELN",SWIG_From_int((int)(7))); ++ SWIG_Python_SetConstant(d, "SELINUX_CB_LOG",SWIG_From_int((int)(0))); ++ SWIG_Python_SetConstant(d, "SELINUX_CB_AUDIT",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SELINUX_CB_VALIDATE",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SELINUX_ERROR",SWIG_From_int((int)(0))); ++ SWIG_Python_SetConstant(d, "SELINUX_WARNING",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "SELINUX_INFO",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "SELINUX_AVC",SWIG_From_int((int)(3))); ++ SWIG_Python_SetConstant(d, "MATCHPATHCON_BASEONLY",SWIG_From_int((int)(1))); ++ SWIG_Python_SetConstant(d, "MATCHPATHCON_NOTRANS",SWIG_From_int((int)(2))); ++ SWIG_Python_SetConstant(d, "MATCHPATHCON_VALIDATE",SWIG_From_int((int)(4))); +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else diff --git a/libselinux.spec b/libselinux.spec index 542a878..67b354e 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -5,7 +5,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.0.79 -Release: 2%{?dist} +Release: 3%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/research/selinux/%{name}-%{version}.tgz @@ -164,7 +164,7 @@ exit 0 %{ruby_sitearch}/selinux.so %changelog -* Thu Mar 12 2009 Dan Walsh - 2.0.79-2 +* Fri Mar 27 2009 Dan Walsh - 2.0.79-3 - Add back in av_decision to python swig * Thu Mar 12 2009 Dan Walsh - 2.0.79-1