diff options
Diffstat (limited to 'sys/security/mac/mac_sysv_sem.c')
-rw-r--r-- | sys/security/mac/mac_sysv_sem.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/security/mac/mac_sysv_sem.c b/sys/security/mac/mac_sysv_sem.c index 94a1107..9fc13fa 100644 --- a/sys/security/mac/mac_sysv_sem.c +++ b/sys/security/mac/mac_sysv_sem.c @@ -1,6 +1,7 @@ /*- * Copyright (c) 2003-2004 Networks Associates Technology, Inc. * Copyright (c) 2006 SPARTA, Inc. + * Copyright (c) 2009 Robert N. M. Watson * All rights reserved. * * This software was developed for the FreeBSD Project in part by Network @@ -11,6 +12,9 @@ * This software was enhanced by SPARTA ISSO under SPAWAR contract * N66001-04-C-6019 ("SEFOS"). * + * This software was developed at the University of Cambridge Computer + * Laboratory with support from a grant from Google, Inc. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -36,6 +40,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_kdtrace.h" #include "opt_mac.h" #include <sys/param.h> @@ -49,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mount.h> #include <sys/file.h> #include <sys/namei.h> +#include <sys/sdt.h> #include <sys/sysctl.h> #include <sys/sem.h> @@ -108,6 +114,9 @@ mac_sysvsem_cleanup(struct semid_kernel *semakptr) MAC_PERFORM(sysvsem_cleanup, semakptr->label); } +MAC_CHECK_PROBE_DEFINE3(sysvsem_check_semctl, "struct ucred *", + "struct semid_kernel *", "int"); + int mac_sysvsem_check_semctl(struct ucred *cred, struct semid_kernel *semakptr, int cmd) @@ -116,10 +125,14 @@ mac_sysvsem_check_semctl(struct ucred *cred, struct semid_kernel *semakptr, MAC_CHECK(sysvsem_check_semctl, cred, semakptr, semakptr->label, cmd); + MAC_CHECK_PROBE3(sysvsem_check_semctl, error, cred, semakptr, cmd); return (error); } +MAC_CHECK_PROBE_DEFINE2(sysvsem_check_semget, "struct ucred *", + "struct semid_kernel *"); + int mac_sysvsem_check_semget(struct ucred *cred, struct semid_kernel *semakptr) { @@ -130,6 +143,9 @@ mac_sysvsem_check_semget(struct ucred *cred, struct semid_kernel *semakptr) return (error); } +MAC_CHECK_PROBE_DEFINE3(sysvsem_check_semop, "struct ucred *", + "struct semid_kernel *", "size_t"); + int mac_sysvsem_check_semop(struct ucred *cred, struct semid_kernel *semakptr, size_t accesstype) @@ -138,6 +154,8 @@ mac_sysvsem_check_semop(struct ucred *cred, struct semid_kernel *semakptr, MAC_CHECK(sysvsem_check_semop, cred, semakptr, semakptr->label, accesstype); + MAC_CHECK_PROBE3(sysvsem_check_semop, error, cred, semakptr, + accesstype); return (error); } |