Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Implementation of the security services.
0004  *
0005  * Author : Stephen Smalley, <sds@tycho.nsa.gov>
0006  */
0007 #ifndef _SS_SERVICES_H_
0008 #define _SS_SERVICES_H_
0009 
0010 #include "policydb.h"
0011 
0012 /* Mapping for a single class */
0013 struct selinux_mapping {
0014     u16 value; /* policy value for class */
0015     unsigned int num_perms; /* number of permissions in class */
0016     u32 perms[sizeof(u32) * 8]; /* policy values for permissions */
0017 };
0018 
0019 /* Map for all of the classes, with array size */
0020 struct selinux_map {
0021     struct selinux_mapping *mapping; /* indexed by class */
0022     u16 size; /* array size of mapping */
0023 };
0024 
0025 struct selinux_policy {
0026     struct sidtab *sidtab;
0027     struct policydb policydb;
0028     struct selinux_map map;
0029     u32 latest_granting;
0030 } __randomize_layout;
0031 
0032 void services_compute_xperms_drivers(struct extended_perms *xperms,
0033                 struct avtab_node *node);
0034 
0035 void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
0036                     struct avtab_node *node);
0037 
0038 #endif  /* _SS_SERVICES_H_ */