1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Implementation of the security services.
5 * Author : Stephen Smalley, <sds@tycho.nsa.gov>
7 #ifndef _SS_SERVICES_H_
8 #define _SS_SERVICES_H_
13 /* Mapping for a single class */
14 struct selinux_mapping {
15 u16 value; /* policy value for class */
16 unsigned int num_perms; /* number of permissions in class */
17 u32 perms[sizeof(u32) * 8]; /* policy values for permissions */
20 /* Map for all of the classes, with array size */
22 struct selinux_mapping *mapping; /* indexed by class */
23 u16 size; /* array size of mapping */
27 struct sidtab *sidtab;
28 struct policydb policydb;
29 rwlock_t policy_rwlock;
31 struct selinux_map map;
32 struct page *status_page;
33 struct mutex status_lock;
36 void services_compute_xperms_drivers(struct extended_perms *xperms,
37 struct avtab_node *node);
39 void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
40 struct avtab_node *node);
42 #endif /* _SS_SERVICES_H_ */