Deleted Added
full compact
mac_policy.h (225344) mac_policy.h (254603)
1/*-
2 * Copyright (c) 1999-2002, 2007-2011 Robert N. M. Watson
3 * Copyright (c) 2001-2005 Networks Associates Technology, Inc.
4 * Copyright (c) 2005-2006 SPARTA, Inc.
5 * Copyright (c) 2008 Apple Inc.
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson for the TrustedBSD Project.

--- 25 unchanged lines hidden (view full) ---

34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
1/*-
2 * Copyright (c) 1999-2002, 2007-2011 Robert N. M. Watson
3 * Copyright (c) 2001-2005 Networks Associates Technology, Inc.
4 * Copyright (c) 2005-2006 SPARTA, Inc.
5 * Copyright (c) 2008 Apple Inc.
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson for the TrustedBSD Project.

--- 25 unchanged lines hidden (view full) ---

34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
42 * $FreeBSD: head/sys/security/mac/mac_policy.h 225344 2011-09-02 17:40:39Z rwatson $
42 * $FreeBSD: head/sys/security/mac/mac_policy.h 254603 2013-08-21 17:45:00Z kib $
43 */
44/*
45 * Kernel interface for MAC policy modules.
46 */
47#ifndef _SECURITY_MAC_MAC_POLICY_H_
48#define _SECURITY_MAC_MAC_POLICY_H_
49
50#ifndef _KERNEL

--- 307 unchanged lines hidden (view full) ---

358typedef int (*mpo_posixshm_check_create_t)(struct ucred *cred,
359 const char *path);
360typedef int (*mpo_posixshm_check_mmap_t)(struct ucred *cred,
361 struct shmfd *shmfd, struct label *shmlabel, int prot,
362 int flags);
363typedef int (*mpo_posixshm_check_open_t)(struct ucred *cred,
364 struct shmfd *shmfd, struct label *shmlabel,
365 accmode_t accmode);
43 */
44/*
45 * Kernel interface for MAC policy modules.
46 */
47#ifndef _SECURITY_MAC_MAC_POLICY_H_
48#define _SECURITY_MAC_MAC_POLICY_H_
49
50#ifndef _KERNEL

--- 307 unchanged lines hidden (view full) ---

358typedef int (*mpo_posixshm_check_create_t)(struct ucred *cred,
359 const char *path);
360typedef int (*mpo_posixshm_check_mmap_t)(struct ucred *cred,
361 struct shmfd *shmfd, struct label *shmlabel, int prot,
362 int flags);
363typedef int (*mpo_posixshm_check_open_t)(struct ucred *cred,
364 struct shmfd *shmfd, struct label *shmlabel,
365 accmode_t accmode);
366typedef int (*mpo_posixshm_check_read_t)(struct ucred *active_cred,
367 struct ucred *file_cred, struct shmfd *shmfd,
368 struct label *shmlabel);
366typedef int (*mpo_posixshm_check_setmode_t)(struct ucred *cred,
367 struct shmfd *shmfd, struct label *shmlabel,
368 mode_t mode);
369typedef int (*mpo_posixshm_check_setowner_t)(struct ucred *cred,
370 struct shmfd *shmfd, struct label *shmlabel,
371 uid_t uid, gid_t gid);
372typedef int (*mpo_posixshm_check_stat_t)(struct ucred *active_cred,
373 struct ucred *file_cred, struct shmfd *shmfd,
374 struct label *shmlabel);
375typedef int (*mpo_posixshm_check_truncate_t)(struct ucred *active_cred,
376 struct ucred *file_cred, struct shmfd *shmfd,
377 struct label *shmlabel);
378typedef int (*mpo_posixshm_check_unlink_t)(struct ucred *cred,
379 struct shmfd *shmfd, struct label *shmlabel);
369typedef int (*mpo_posixshm_check_setmode_t)(struct ucred *cred,
370 struct shmfd *shmfd, struct label *shmlabel,
371 mode_t mode);
372typedef int (*mpo_posixshm_check_setowner_t)(struct ucred *cred,
373 struct shmfd *shmfd, struct label *shmlabel,
374 uid_t uid, gid_t gid);
375typedef int (*mpo_posixshm_check_stat_t)(struct ucred *active_cred,
376 struct ucred *file_cred, struct shmfd *shmfd,
377 struct label *shmlabel);
378typedef int (*mpo_posixshm_check_truncate_t)(struct ucred *active_cred,
379 struct ucred *file_cred, struct shmfd *shmfd,
380 struct label *shmlabel);
381typedef int (*mpo_posixshm_check_unlink_t)(struct ucred *cred,
382 struct shmfd *shmfd, struct label *shmlabel);
383typedef int (*mpo_posixshm_check_write_t)(struct ucred *active_cred,
384 struct ucred *file_cred, struct shmfd *shmfd,
385 struct label *shmlabel);
380typedef void (*mpo_posixshm_create_t)(struct ucred *cred,
381 struct shmfd *shmfd, struct label *shmlabel);
382typedef void (*mpo_posixshm_destroy_label_t)(struct label *label);
383typedef void (*mpo_posixshm_init_label_t)(struct label *label);
384
385typedef int (*mpo_priv_check_t)(struct ucred *cred, int priv);
386typedef int (*mpo_priv_grant_t)(struct ucred *cred, int priv);
387

--- 425 unchanged lines hidden (view full) ---

813 mpo_posixsem_check_wait_t mpo_posixsem_check_wait;
814 mpo_posixsem_create_t mpo_posixsem_create;
815 mpo_posixsem_destroy_label_t mpo_posixsem_destroy_label;
816 mpo_posixsem_init_label_t mpo_posixsem_init_label;
817
818 mpo_posixshm_check_create_t mpo_posixshm_check_create;
819 mpo_posixshm_check_mmap_t mpo_posixshm_check_mmap;
820 mpo_posixshm_check_open_t mpo_posixshm_check_open;
386typedef void (*mpo_posixshm_create_t)(struct ucred *cred,
387 struct shmfd *shmfd, struct label *shmlabel);
388typedef void (*mpo_posixshm_destroy_label_t)(struct label *label);
389typedef void (*mpo_posixshm_init_label_t)(struct label *label);
390
391typedef int (*mpo_priv_check_t)(struct ucred *cred, int priv);
392typedef int (*mpo_priv_grant_t)(struct ucred *cred, int priv);
393

--- 425 unchanged lines hidden (view full) ---

819 mpo_posixsem_check_wait_t mpo_posixsem_check_wait;
820 mpo_posixsem_create_t mpo_posixsem_create;
821 mpo_posixsem_destroy_label_t mpo_posixsem_destroy_label;
822 mpo_posixsem_init_label_t mpo_posixsem_init_label;
823
824 mpo_posixshm_check_create_t mpo_posixshm_check_create;
825 mpo_posixshm_check_mmap_t mpo_posixshm_check_mmap;
826 mpo_posixshm_check_open_t mpo_posixshm_check_open;
827 mpo_posixshm_check_read_t mpo_posixshm_check_read;
821 mpo_posixshm_check_setmode_t mpo_posixshm_check_setmode;
822 mpo_posixshm_check_setowner_t mpo_posixshm_check_setowner;
823 mpo_posixshm_check_stat_t mpo_posixshm_check_stat;
824 mpo_posixshm_check_truncate_t mpo_posixshm_check_truncate;
825 mpo_posixshm_check_unlink_t mpo_posixshm_check_unlink;
828 mpo_posixshm_check_setmode_t mpo_posixshm_check_setmode;
829 mpo_posixshm_check_setowner_t mpo_posixshm_check_setowner;
830 mpo_posixshm_check_stat_t mpo_posixshm_check_stat;
831 mpo_posixshm_check_truncate_t mpo_posixshm_check_truncate;
832 mpo_posixshm_check_unlink_t mpo_posixshm_check_unlink;
833 mpo_posixshm_check_write_t mpo_posixshm_check_write;
826 mpo_posixshm_create_t mpo_posixshm_create;
827 mpo_posixshm_destroy_label_t mpo_posixshm_destroy_label;
828 mpo_posixshm_init_label_t mpo_posixshm_init_label;
829
830 mpo_priv_check_t mpo_priv_check;
831 mpo_priv_grant_t mpo_priv_grant;
832
833 mpo_proc_check_debug_t mpo_proc_check_debug;

--- 204 unchanged lines hidden ---
834 mpo_posixshm_create_t mpo_posixshm_create;
835 mpo_posixshm_destroy_label_t mpo_posixshm_destroy_label;
836 mpo_posixshm_init_label_t mpo_posixshm_init_label;
837
838 mpo_priv_check_t mpo_priv_check;
839 mpo_priv_grant_t mpo_priv_grant;
840
841 mpo_proc_check_debug_t mpo_proc_check_debug;

--- 204 unchanged lines hidden ---