Linux Audio

Check our new training course

Loading...
v4.6
 
 1/*
 2 * Implementation of the security services.
 3 *
 4 * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
 5 */
 
 6#ifndef _SS_SERVICES_H_
 7#define _SS_SERVICES_H_
 8
 9#include "policydb.h"
10#include "sidtab.h"
11
12extern struct policydb policydb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
14void services_compute_xperms_drivers(struct extended_perms *xperms,
15				struct avtab_node *node);
16
17void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
18					struct avtab_node *node);
19
20#endif	/* _SS_SERVICES_H_ */
 
 
21
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Implementation of the security services.
 4 *
 5 * Author : Stephen Smalley, <stephen.smalley.work@gmail.com>
 6 */
 7
 8#ifndef _SS_SERVICES_H_
 9#define _SS_SERVICES_H_
10
11#include "policydb.h"
 
12
13/* Mapping for a single class */
14struct selinux_mapping {
15	u16 value; /* policy value for class */
16	u16 num_perms; /* number of permissions in class */
17	u32 perms[sizeof(u32) * 8]; /* policy values for permissions */
18};
19
20/* Map for all of the classes, with array size */
21struct selinux_map {
22	struct selinux_mapping *mapping; /* indexed by class */
23	u16 size; /* array size of mapping */
24};
25
26struct selinux_policy {
27	struct sidtab *sidtab;
28	struct policydb policydb;
29	struct selinux_map map;
30	u32 latest_granting;
31} __randomize_layout;
32
33struct convert_context_args {
34	struct policydb *oldp;
35	struct policydb *newp;
36};
37
38void services_compute_xperms_drivers(struct extended_perms *xperms,
39				     struct avtab_node *node);
 
40void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
41				      struct avtab_node *node);
42
43int services_convert_context(struct convert_context_args *args,
44			     struct context *oldc, struct context *newc,
45			     gfp_t gfp_flags);
46
47#endif /* _SS_SERVICES_H_ */