X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..c18c124eaa464aaaa5549e99e5a70fc9cbb50944:/bsd/kern/kern_priv.c diff --git a/bsd/kern/kern_priv.c b/bsd/kern/kern_priv.c index e7ceb6075..ee17dd2a8 100644 --- a/bsd/kern/kern_priv.c +++ b/bsd/kern/kern_priv.c @@ -68,6 +68,8 @@ #include #endif +int proc_check_footprint_priv(void); + /* * Check a credential for privilege. Lots of good reasons to deny privilege; * only a few to grant it. @@ -75,6 +77,9 @@ int priv_check_cred(kauth_cred_t cred, int priv, __unused int flags) { +#if !CONFIG_MACF +#pragma unused(priv) +#endif int error; /* @@ -117,3 +122,9 @@ priv_check_cred(kauth_cred_t cred, int priv, __unused int flags) out: return (error); } + +int +proc_check_footprint_priv(void) +{ + return (priv_check_cred(kauth_cred_get(), PRIV_VM_FOOTPRINT_LIMIT, 0)); +}