summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/os/policy.c')
-rw-r--r--usr/src/uts/common/os/policy.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/usr/src/uts/common/os/policy.c b/usr/src/uts/common/os/policy.c
index d2bdb4ce37..82c06a37be 100644
--- a/usr/src/uts/common/os/policy.c
+++ b/usr/src/uts/common/os/policy.c
@@ -1401,9 +1401,9 @@ secpolicy_xvattr(xvattr_t *xvap, uid_t owner, cred_t *cr, vtype_t vtype)
int
secpolicy_vnode_setattr(cred_t *cr, struct vnode *vp, struct vattr *vap,
- const struct vattr *ovap, int flags,
- int unlocked_access(void *, int, cred_t *),
- void *node)
+ const struct vattr *ovap, int flags,
+ int unlocked_access(void *, int, cred_t *),
+ void *node)
{
int mask = vap->va_mask;
int error = 0;
@@ -1745,6 +1745,19 @@ secpolicy_pset(const cred_t *cr)
return (PRIV_POLICY(cr, PRIV_SYS_RES_CONFIG, B_FALSE, EPERM, NULL));
}
+/* Process security flags */
+int
+secpolicy_psecflags(const cred_t *cr, proc_t *tp, proc_t *sp)
+{
+ if (PRIV_POLICY(cr, PRIV_PROC_SECFLAGS, B_FALSE, EPERM, NULL) != 0)
+ return (EPERM);
+
+ if (!prochasprocperm(tp, sp, cr))
+ return (EPERM);
+
+ return (0);
+}
+
/*
* Processor set binding.
*/