#include <sys/proc.h>

#define KAUTH_VNODE_READ_DATA 1
#define  KAUTH_VNODE_WRITE_DATA 2
#define  KAUTH_VNODE_EXECUTE 3
#define  KKAUTH_VNODE_DELETE 4
#define KAUTH_VNODE_APPEND_DATA 5
#define  KAUTH_VNODE_DELETE_CHILD 6
#define  KAUTH_VNODE_READ_ATTRIBUTES 7
#define  KAUTH_VNODE_WRITE_ATTRIBUTES 8
#define  KAUTH_VNODE_READ_EXTATTRIBUTES 9
#define  KAUTH_VNODE_WRITE_EXTATTRIBUTES 10
#define  KAUTH_VNODE_READ_SECURITY 11
#define KAUTH_VNODE_WRITE_SECURITY 12
#define KAUTH_VNODE_TAKE_OWNERSHIP 13
#define  KAUTH_VNODE_SYNCHRONIZE 14
#define  KAUTH_VNODE_LINKTARGET 15
#define  KAUTH_VNODE_CHECKIMMUTABLE 16
#define  KAUTH_VNODE_ACCESS 17
#define KAUTH_VNODE_NOIMMUTABLE 18
#define  KAUTH_VNODE_DELETE 10

#define KAUTH_SCOPE_PROCESS "a"
#define KAUTH_SCOPE_VNODE "a"
#define KAUTH_SCOPE_FILEOP "a"
#define KAUTH_SCOPE_GENERIC	"aa"

#define KAUTH_GENERIC_ISSUSER 1

#define KAUTH_RESULT_DEFER 1

#define KAUTH_PROCESS_CANSIGNAL 1
#define KAUTH_PROCESS_CANTRACE 2

#define KAUTH_FILEOP_OPEN 1
#define KAUTH_FILEOP_CLOSE 2
#define KAUTH_FILEOP_RENAME 3
#define KAUTH_FILEOP_EXCHANGE 4
#define KAUTH_FILEOP_LINK 5
#define KAUTH_FILEOP_EXEC 6
#define KAUTH_FILEOP_CLOSE_MODIFIED 1

typedef int kauth_action_t;
typedef int  *kauth_listener_t;
typedef int * kauth_scope_callback_t;

int kauth_getuid();
int kauth_cred_getuid(int a);
int kauth_unlisten_scope(int a);
int kauth_listen_scope(int a, int b,int c);