Path: blob/master/security/apparmor/include/capability.h
26439 views
/* SPDX-License-Identifier: GPL-2.0-only */1/*2* AppArmor security module3*4* This file contains AppArmor capability mediation definitions.5*6* Copyright (C) 1998-2008 Novell/SUSE7* Copyright 2009-2013 Canonical Ltd.8*/910#ifndef __AA_CAPABILITY_H11#define __AA_CAPABILITY_H1213#include <linux/sched.h>1415#include "apparmorfs.h"1617struct aa_label;1819/* aa_caps - confinement data for capabilities20* @allowed: capabilities mask21* @audit: caps that are to be audited22* @denied: caps that are explicitly denied23* @quiet: caps that should not be audited24* @kill: caps that when requested will result in the task being killed25* @extended: caps that are subject finer grained mediation26*/27struct aa_caps {28kernel_cap_t allow;29kernel_cap_t audit;30kernel_cap_t denied;31kernel_cap_t quiet;32kernel_cap_t kill;33kernel_cap_t extended;34};3536extern struct aa_sfs_entry aa_sfs_entry_caps[];3738kernel_cap_t aa_profile_capget(struct aa_profile *profile);39int aa_capable(const struct cred *subj_cred, struct aa_label *label,40int cap, unsigned int opts);4142static inline void aa_free_cap_rules(struct aa_caps *caps)43{44/* NOP */45}4647#endif /* __AA_CAPBILITY_H */484950