aboutsummaryrefslogtreecommitdiff
path: root/sys/security
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2025-09-16 13:43:47 +0000
committerMark Johnston <markj@FreeBSD.org>2025-09-16 13:44:58 +0000
commit1c3ca0c733a4e4ba550cedfa8019260fb0cf5707 (patch)
treed79cef68de87f3acfbfb0470ccb8bc230ea09896 /sys/security
parent9b8224b950fb74c8674d257a5a4795baa759c35b (diff)
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/audit/audit_syscalls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/security/audit/audit_syscalls.c b/sys/security/audit/audit_syscalls.c
index 262f2c1ae1e3..40b2fb3d1c9f 100644
--- a/sys/security/audit/audit_syscalls.c
+++ b/sys/security/audit/audit_syscalls.c
@@ -592,6 +592,8 @@ sys_getauid(struct thread *td, struct getauid_args *uap)
{
int error;
+ if (jailed(td->td_ucred))
+ return (ENOSYS);
error = priv_check(td, PRIV_AUDIT_GETAUDIT);
if (error)
return (error);
@@ -607,6 +609,8 @@ sys_setauid(struct thread *td, struct setauid_args *uap)
au_id_t id;
int error;
+ if (jailed(td->td_ucred))
+ return (ENOSYS);
error = copyin(uap->auid, &id, sizeof(id));
if (error)
return (error);
@@ -646,6 +650,8 @@ sys_getaudit(struct thread *td, struct getaudit_args *uap)
int error;
cred = td->td_ucred;
+ if (jailed(cred))
+ return (ENOSYS);
error = priv_check(td, PRIV_AUDIT_GETAUDIT);
if (error)
return (error);
@@ -668,6 +674,8 @@ sys_setaudit(struct thread *td, struct setaudit_args *uap)
struct auditinfo ai;
int error;
+ if (jailed(td->td_ucred))
+ return (ENOSYS);
error = copyin(uap->auditinfo, &ai, sizeof(ai));
if (error)
return (error);
@@ -707,6 +715,8 @@ sys_getaudit_addr(struct thread *td, struct getaudit_addr_args *uap)
{
int error;
+ if (jailed(td->td_ucred))
+ return (ENOSYS);
if (uap->length < sizeof(*uap->auditinfo_addr))
return (EOVERFLOW);
error = priv_check(td, PRIV_AUDIT_GETAUDIT);
@@ -724,6 +734,8 @@ sys_setaudit_addr(struct thread *td, struct setaudit_addr_args *uap)
struct auditinfo_addr aia;
int error;
+ if (jailed(td->td_ucred))
+ return (ENOSYS);
error = copyin(uap->auditinfo_addr, &aia, sizeof(aia));
if (error)
return (error);