Files

38 lines
1002 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0-only */
2010-07-29 14:48:00 -07:00
/*
* AppArmor security module
*
2017-01-16 00:42:17 -08:00
* This file contains AppArmor security identifier (secid) definitions
2010-07-29 14:48:00 -07:00
*
* Copyright 2009-2018 Canonical Ltd.
2010-07-29 14:48:00 -07:00
*/
2017-01-16 00:42:17 -08:00
#ifndef __AA_SECID_H
#define __AA_SECID_H
2010-07-29 14:48:00 -07:00
#include <linux/slab.h>
2010-07-29 14:48:00 -07:00
#include <linux/types.h>
struct aa_label;
2017-01-16 00:42:17 -08:00
/* secid value that will not be allocated */
#define AA_SECID_INVALID 0
2010-07-29 14:48:00 -07:00
2018-05-24 13:27:45 -07:00
/* secid value that matches any other secid */
#define AA_SECID_WILDCARD 1
/* sysctl to enable displaying mode when converting secid to secctx */
extern int apparmor_display_secid_mode;
struct aa_label *aa_secid_to_label(u32 secid);
2024-10-23 14:21:55 -07:00
int apparmor_secid_to_secctx(u32 secid, struct lsm_context *cp);
int apparmor_lsmprop_to_secctx(struct lsm_prop *prop, struct lsm_context *cp);
int apparmor_secctx_to_secid(const char *secdata, u32 seclen, u32 *secid);
void apparmor_release_secctx(struct lsm_context *cp);
int aa_alloc_secid(struct aa_label *label, gfp_t gfp);
2017-01-16 00:42:17 -08:00
void aa_free_secid(u32 secid);
2010-07-29 14:48:00 -07:00
2017-01-16 00:42:17 -08:00
#endif /* __AA_SECID_H */