| 1 |
/* |
| 2 |
* Copyright 2011 Tresys Technology, LLC. All rights reserved. |
| 3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without |
| 5 |
* modification, are permitted provided that the following conditions are met: |
| 6 |
* |
| 7 |
* 1. Redistributions of source code must retain the above copyright notice, |
| 8 |
* this list of conditions and the following disclaimer. |
| 9 |
* |
| 10 |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
* this list of conditions and the following disclaimer in the documentation |
| 12 |
* and/or other materials provided with the distribution. |
| 13 |
* |
| 14 |
* THIS SOFTWARE IS PROVIDED BY TRESYS TECHNOLOGY, LLC ``AS IS'' AND ANY EXPRESS |
| 15 |
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 16 |
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 17 |
* EVENT SHALL TRESYS TECHNOLOGY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 18 |
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 19 |
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 20 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 21 |
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 22 |
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 23 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 |
* |
| 25 |
* The views and conclusions contained in the software and documentation are those |
| 26 |
* of the authors and should not be interpreted as representing official policies, |
| 27 |
* either expressed or implied, of Tresys Technology, LLC. |
| 28 |
*/ |
| 29 |
|
| 30 |
#ifndef CIL_INTERNAL_H_ |
| 31 |
#define CIL_INTERNAL_H_ |
| 32 |
|
| 33 |
#include <stdlib.h> |
| 34 |
#include <stdio.h> |
| 35 |
#include <stdint.h> |
| 36 |
#include <arpa/inet.h> |
| 37 |
|
| 38 |
#include <sepol/policydb/services.h> |
| 39 |
#include <sepol/policydb/policydb.h> |
| 40 |
#include <sepol/policydb/flask_types.h> |
| 41 |
|
| 42 |
#include <cil/cil.h> |
| 43 |
|
| 44 |
#include "cil_flavor.h" |
| 45 |
#include "cil_tree.h" |
| 46 |
#include "cil_symtab.h" |
| 47 |
#include "cil_mem.h" |
| 48 |
|
| 49 |
#define CIL_MAX_NAME_LENGTH 2048 |
| 50 |
|
| 51 |
#define CIL_DEGENERATE_INHERITANCE_DEPTH 10UL |
| 52 |
#define CIL_DEGENERATE_INHERITANCE_MINIMUM (0x01 << CIL_DEGENERATE_INHERITANCE_DEPTH) |
| 53 |
#define CIL_DEGENERATE_INHERITANCE_GROWTH 10UL |
| 54 |
|
| 55 |
enum cil_pass { |
| 56 |
CIL_PASS_INIT = 0, |
| 57 |
|
| 58 |
CIL_PASS_TIF, |
| 59 |
CIL_PASS_IN_BEFORE, |
| 60 |
CIL_PASS_BLKIN_LINK, |
| 61 |
CIL_PASS_BLKIN_COPY, |
| 62 |
CIL_PASS_BLKABS, |
| 63 |
CIL_PASS_IN_AFTER, |
| 64 |
CIL_PASS_CALL1, |
| 65 |
CIL_PASS_CALL2, |
| 66 |
CIL_PASS_ALIAS1, |
| 67 |
CIL_PASS_ALIAS2, |
| 68 |
CIL_PASS_MISC1, |
| 69 |
CIL_PASS_MLS, |
| 70 |
CIL_PASS_MISC2, |
| 71 |
CIL_PASS_MISC3, |
| 72 |
|
| 73 |
CIL_PASS_NUM |
| 74 |
}; |
| 75 |
|
| 76 |
|
| 77 |
/* |
| 78 |
Keywords |
| 79 |
*/ |
| 80 |
extern char *CIL_KEY_CONS_T1; |
| 81 |
extern char *CIL_KEY_CONS_T2; |
| 82 |
extern char *CIL_KEY_CONS_T3; |
| 83 |
extern char *CIL_KEY_CONS_R1; |
| 84 |
extern char *CIL_KEY_CONS_R2; |
| 85 |
extern char *CIL_KEY_CONS_R3; |
| 86 |
extern char *CIL_KEY_CONS_U1; |
| 87 |
extern char *CIL_KEY_CONS_U2; |
| 88 |
extern char *CIL_KEY_CONS_U3; |
| 89 |
extern char *CIL_KEY_CONS_L1; |
| 90 |
extern char *CIL_KEY_CONS_L2; |
| 91 |
extern char *CIL_KEY_CONS_H1; |
| 92 |
extern char *CIL_KEY_CONS_H2; |
| 93 |
extern char *CIL_KEY_AND; |
| 94 |
extern char *CIL_KEY_OR; |
| 95 |
extern char *CIL_KEY_NOT; |
| 96 |
extern char *CIL_KEY_EQ; |
| 97 |
extern char *CIL_KEY_NEQ; |
| 98 |
extern char *CIL_KEY_CONS_DOM; |
| 99 |
extern char *CIL_KEY_CONS_DOMBY; |
| 100 |
extern char *CIL_KEY_CONS_INCOMP; |
| 101 |
extern char *CIL_KEY_CONDTRUE; |
| 102 |
extern char *CIL_KEY_CONDFALSE; |
| 103 |
extern char *CIL_KEY_SELF; |
| 104 |
extern char *CIL_KEY_NOTSELF; |
| 105 |
extern char *CIL_KEY_OTHER; |
| 106 |
extern char *CIL_KEY_OBJECT_R; |
| 107 |
extern char *CIL_KEY_STAR; |
| 108 |
extern char *CIL_KEY_TCP; |
| 109 |
extern char *CIL_KEY_UDP; |
| 110 |
extern char *CIL_KEY_DCCP; |
| 111 |
extern char *CIL_KEY_SCTP; |
| 112 |
extern char *CIL_KEY_AUDITALLOW; |
| 113 |
extern char *CIL_KEY_TUNABLEIF; |
| 114 |
extern char *CIL_KEY_ALLOW; |
| 115 |
extern char *CIL_KEY_DONTAUDIT; |
| 116 |
extern char *CIL_KEY_TYPETRANSITION; |
| 117 |
extern char *CIL_KEY_TYPECHANGE; |
| 118 |
extern char *CIL_KEY_CALL; |
| 119 |
extern char *CIL_KEY_TUNABLE; |
| 120 |
extern char *CIL_KEY_XOR; |
| 121 |
extern char *CIL_KEY_ALL; |
| 122 |
extern char *CIL_KEY_RANGE; |
| 123 |
extern char *CIL_KEY_GLOB; |
| 124 |
extern char *CIL_KEY_FILE; |
| 125 |
extern char *CIL_KEY_DIR; |
| 126 |
extern char *CIL_KEY_CHAR; |
| 127 |
extern char *CIL_KEY_BLOCK; |
| 128 |
extern char *CIL_KEY_SOCKET; |
| 129 |
extern char *CIL_KEY_PIPE; |
| 130 |
extern char *CIL_KEY_SYMLINK; |
| 131 |
extern char *CIL_KEY_ANY; |
| 132 |
extern char *CIL_KEY_XATTR; |
| 133 |
extern char *CIL_KEY_TASK; |
| 134 |
extern char *CIL_KEY_TRANS; |
| 135 |
extern char *CIL_KEY_TYPE; |
| 136 |
extern char *CIL_KEY_ROLE; |
| 137 |
extern char *CIL_KEY_USER; |
| 138 |
extern char *CIL_KEY_USERATTRIBUTE; |
| 139 |
extern char *CIL_KEY_USERATTRIBUTESET; |
| 140 |
extern char *CIL_KEY_SENSITIVITY; |
| 141 |
extern char *CIL_KEY_CATEGORY; |
| 142 |
extern char *CIL_KEY_CATSET; |
| 143 |
extern char *CIL_KEY_LEVEL; |
| 144 |
extern char *CIL_KEY_LEVELRANGE; |
| 145 |
extern char *CIL_KEY_CLASS; |
| 146 |
extern char *CIL_KEY_IPADDR; |
| 147 |
extern char *CIL_KEY_MAP_CLASS; |
| 148 |
extern char *CIL_KEY_CLASSPERMISSION; |
| 149 |
extern char *CIL_KEY_BOOL; |
| 150 |
extern char *CIL_KEY_STRING; |
| 151 |
extern char *CIL_KEY_NAME; |
| 152 |
extern char *CIL_KEY_SOURCE; |
| 153 |
extern char *CIL_KEY_TARGET; |
| 154 |
extern char *CIL_KEY_LOW; |
| 155 |
extern char *CIL_KEY_HIGH; |
| 156 |
extern char *CIL_KEY_LOW_HIGH; |
| 157 |
extern char *CIL_KEY_GLBLUB; |
| 158 |
extern char *CIL_KEY_HANDLEUNKNOWN; |
| 159 |
extern char *CIL_KEY_HANDLEUNKNOWN_ALLOW; |
| 160 |
extern char *CIL_KEY_HANDLEUNKNOWN_DENY; |
| 161 |
extern char *CIL_KEY_HANDLEUNKNOWN_REJECT; |
| 162 |
extern char *CIL_KEY_MACRO; |
| 163 |
extern char *CIL_KEY_IN; |
| 164 |
extern char *CIL_KEY_IN_BEFORE; |
| 165 |
extern char *CIL_KEY_IN_AFTER; |
| 166 |
extern char *CIL_KEY_MLS; |
| 167 |
extern char *CIL_KEY_DEFAULTRANGE; |
| 168 |
extern char *CIL_KEY_BLOCKINHERIT; |
| 169 |
extern char *CIL_KEY_BLOCKABSTRACT; |
| 170 |
extern char *CIL_KEY_CLASSORDER; |
| 171 |
extern char *CIL_KEY_CLASSMAPPING; |
| 172 |
extern char *CIL_KEY_CLASSPERMISSIONSET; |
| 173 |
extern char *CIL_KEY_COMMON; |
| 174 |
extern char *CIL_KEY_CLASSCOMMON; |
| 175 |
extern char *CIL_KEY_SID; |
| 176 |
extern char *CIL_KEY_SIDCONTEXT; |
| 177 |
extern char *CIL_KEY_SIDORDER; |
| 178 |
extern char *CIL_KEY_USERLEVEL; |
| 179 |
extern char *CIL_KEY_USERRANGE; |
| 180 |
extern char *CIL_KEY_USERBOUNDS; |
| 181 |
extern char *CIL_KEY_USERPREFIX; |
| 182 |
extern char *CIL_KEY_SELINUXUSER; |
| 183 |
extern char *CIL_KEY_SELINUXUSERDEFAULT; |
| 184 |
extern char *CIL_KEY_TYPEATTRIBUTE; |
| 185 |
extern char *CIL_KEY_TYPEATTRIBUTESET; |
| 186 |
extern char *CIL_KEY_EXPANDTYPEATTRIBUTE; |
| 187 |
extern char *CIL_KEY_TYPEALIAS; |
| 188 |
extern char *CIL_KEY_TYPEALIASACTUAL; |
| 189 |
extern char *CIL_KEY_TYPEBOUNDS; |
| 190 |
extern char *CIL_KEY_TYPEPERMISSIVE; |
| 191 |
extern char *CIL_KEY_TYPENEVERAUDIT; |
| 192 |
extern char *CIL_KEY_RANGETRANSITION; |
| 193 |
extern char *CIL_KEY_USERROLE; |
| 194 |
extern char *CIL_KEY_ROLETYPE; |
| 195 |
extern char *CIL_KEY_ROLETRANSITION; |
| 196 |
extern char *CIL_KEY_ROLEALLOW; |
| 197 |
extern char *CIL_KEY_ROLEATTRIBUTE; |
| 198 |
extern char *CIL_KEY_ROLEATTRIBUTESET; |
| 199 |
extern char *CIL_KEY_ROLEBOUNDS; |
| 200 |
extern char *CIL_KEY_BOOLEANIF; |
| 201 |
extern char *CIL_KEY_NEVERALLOW; |
| 202 |
extern char *CIL_KEY_TYPEMEMBER; |
| 203 |
extern char *CIL_KEY_SENSALIAS; |
| 204 |
extern char *CIL_KEY_SENSALIASACTUAL; |
| 205 |
extern char *CIL_KEY_CATALIAS; |
| 206 |
extern char *CIL_KEY_CATALIASACTUAL; |
| 207 |
extern char *CIL_KEY_CATORDER; |
| 208 |
extern char *CIL_KEY_SENSITIVITYORDER; |
| 209 |
extern char *CIL_KEY_SENSCAT; |
| 210 |
extern char *CIL_KEY_CONSTRAIN; |
| 211 |
extern char *CIL_KEY_MLSCONSTRAIN; |
| 212 |
extern char *CIL_KEY_VALIDATETRANS; |
| 213 |
extern char *CIL_KEY_MLSVALIDATETRANS; |
| 214 |
extern char *CIL_KEY_CONTEXT; |
| 215 |
extern char *CIL_KEY_FILECON; |
| 216 |
extern char *CIL_KEY_IBPKEYCON; |
| 217 |
extern char *CIL_KEY_IBENDPORTCON; |
| 218 |
extern char *CIL_KEY_PORTCON; |
| 219 |
extern char *CIL_KEY_NODECON; |
| 220 |
extern char *CIL_KEY_GENFSCON; |
| 221 |
extern char *CIL_KEY_NETIFCON; |
| 222 |
extern char *CIL_KEY_PIRQCON; |
| 223 |
extern char *CIL_KEY_IOMEMCON; |
| 224 |
extern char *CIL_KEY_IOPORTCON; |
| 225 |
extern char *CIL_KEY_PCIDEVICECON; |
| 226 |
extern char *CIL_KEY_DEVICETREECON; |
| 227 |
extern char *CIL_KEY_FSUSE; |
| 228 |
extern char *CIL_KEY_POLICYCAP; |
| 229 |
extern char *CIL_KEY_OPTIONAL; |
| 230 |
extern char *CIL_KEY_DEFAULTUSER; |
| 231 |
extern char *CIL_KEY_DEFAULTROLE; |
| 232 |
extern char *CIL_KEY_DEFAULTTYPE; |
| 233 |
extern char *CIL_KEY_ROOT; |
| 234 |
extern char *CIL_KEY_NODE; |
| 235 |
extern char *CIL_KEY_PERM; |
| 236 |
extern char *CIL_KEY_ALLOWX; |
| 237 |
extern char *CIL_KEY_AUDITALLOWX; |
| 238 |
extern char *CIL_KEY_DONTAUDITX; |
| 239 |
extern char *CIL_KEY_NEVERALLOWX; |
| 240 |
extern char *CIL_KEY_PERMISSIONX; |
| 241 |
extern char *CIL_KEY_IOCTL; |
| 242 |
extern char *CIL_KEY_NLMSG; |
| 243 |
extern char *CIL_KEY_UNORDERED; |
| 244 |
extern char *CIL_KEY_SRC_INFO; |
| 245 |
extern char *CIL_KEY_SRC_CIL; |
| 246 |
extern char *CIL_KEY_SRC_HLL_LMS; |
| 247 |
extern char *CIL_KEY_SRC_HLL_LMX; |
| 248 |
extern char *CIL_KEY_SRC_HLL_LME; |
| 249 |
extern char *CIL_KEY_DENY_RULE; |
| 250 |
|
| 251 |
/* |
| 252 |
Symbol Table Array Indices |
| 253 |
*/ |
| 254 |
enum cil_sym_index { |
| 255 |
CIL_SYM_BLOCKS = 0, |
| 256 |
CIL_SYM_USERS, |
| 257 |
CIL_SYM_ROLES, |
| 258 |
CIL_SYM_TYPES, |
| 259 |
CIL_SYM_COMMONS, |
| 260 |
CIL_SYM_CLASSES, |
| 261 |
CIL_SYM_CLASSPERMSETS, |
| 262 |
CIL_SYM_BOOLS, |
| 263 |
CIL_SYM_TUNABLES, |
| 264 |
CIL_SYM_SENS, |
| 265 |
CIL_SYM_CATS, |
| 266 |
CIL_SYM_SIDS, |
| 267 |
CIL_SYM_CONTEXTS, |
| 268 |
CIL_SYM_LEVELS, |
| 269 |
CIL_SYM_LEVELRANGES, |
| 270 |
CIL_SYM_POLICYCAPS, |
| 271 |
CIL_SYM_IPADDRS, |
| 272 |
CIL_SYM_STRINGS, |
| 273 |
CIL_SYM_PERMX, |
| 274 |
CIL_SYM_NUM, |
| 275 |
CIL_SYM_UNKNOWN, |
| 276 |
CIL_SYM_PERMS // Special case for permissions. This symtab is not included in arrays |
| 277 |
}; |
| 278 |
|
| 279 |
enum cil_sym_array { |
| 280 |
CIL_SYM_ARRAY_ROOT = 0, |
| 281 |
CIL_SYM_ARRAY_BLOCK, |
| 282 |
CIL_SYM_ARRAY_IN, |
| 283 |
CIL_SYM_ARRAY_MACRO, |
| 284 |
CIL_SYM_ARRAY_CONDBLOCK, |
| 285 |
CIL_SYM_ARRAY_NUM |
| 286 |
}; |
| 287 |
|
| 288 |
extern const int cil_sym_sizes[CIL_SYM_ARRAY_NUM][CIL_SYM_NUM]; |
| 289 |
|
| 290 |
#define CIL_CLASS_SYM_SIZE 256 |
| 291 |
#define CIL_PERMS_PER_CLASS (sizeof(sepol_access_vector_t) * 8) |
| 292 |
|
| 293 |
struct cil_db { |
| 294 |
struct cil_tree *parse; |
| 295 |
struct cil_tree *ast; |
| 296 |
struct cil_type *selftype; |
| 297 |
struct cil_type *notselftype; |
| 298 |
struct cil_type *othertype; |
| 299 |
struct cil_list *sidorder; |
| 300 |
struct cil_list *classorder; |
| 301 |
struct cil_list *catorder; |
| 302 |
struct cil_list *sensitivityorder; |
| 303 |
struct cil_sort *netifcon; |
| 304 |
struct cil_sort *genfscon; |
| 305 |
struct cil_sort *filecon; |
| 306 |
struct cil_sort *nodecon; |
| 307 |
struct cil_sort *ibpkeycon; |
| 308 |
struct cil_sort *ibendportcon; |
| 309 |
struct cil_sort *portcon; |
| 310 |
struct cil_sort *pirqcon; |
| 311 |
struct cil_sort *iomemcon; |
| 312 |
struct cil_sort *ioportcon; |
| 313 |
struct cil_sort *pcidevicecon; |
| 314 |
struct cil_sort *devicetreecon; |
| 315 |
struct cil_sort *fsuse; |
| 316 |
struct cil_list *userprefixes; |
| 317 |
struct cil_list *selinuxusers; |
| 318 |
struct cil_list *declared_strings; |
| 319 |
int num_types_and_attrs; |
| 320 |
int num_classes; |
| 321 |
int num_cats; |
| 322 |
int num_types; |
| 323 |
int num_roles; |
| 324 |
int num_users; |
| 325 |
struct cil_type **val_to_type; |
| 326 |
struct cil_role **val_to_role; |
| 327 |
struct cil_user **val_to_user; |
| 328 |
int disable_dontaudit; |
| 329 |
int disable_neverallow; |
| 330 |
int attrs_expand_generated; |
| 331 |
unsigned attrs_expand_size; |
| 332 |
int preserve_tunables; |
| 333 |
int handle_unknown; |
| 334 |
int mls; |
| 335 |
int multiple_decls; |
| 336 |
int qualified_names; |
| 337 |
int target_platform; |
| 338 |
int policy_version; |
| 339 |
}; |
| 340 |
|
| 341 |
struct cil_root { |
| 342 |
symtab_t symtab[CIL_SYM_NUM]; |
| 343 |
}; |
| 344 |
|
| 345 |
struct cil_sort { |
| 346 |
enum cil_flavor flavor; |
| 347 |
uint32_t count; |
| 348 |
uint32_t index; |
| 349 |
void **array; |
| 350 |
}; |
| 351 |
|
| 352 |
struct cil_ordered { |
| 353 |
int merged; |
| 354 |
struct cil_list *strs; |
| 355 |
struct cil_list *datums; |
| 356 |
}; |
| 357 |
|
| 358 |
struct cil_block { |
| 359 |
struct cil_symtab_datum datum; |
| 360 |
symtab_t symtab[CIL_SYM_NUM]; |
| 361 |
uint16_t is_abstract; |
| 362 |
struct cil_list *bi_nodes; |
| 363 |
}; |
| 364 |
|
| 365 |
struct cil_blockinherit { |
| 366 |
char *block_str; |
| 367 |
struct cil_block *block; |
| 368 |
}; |
| 369 |
|
| 370 |
struct cil_blockabstract { |
| 371 |
char *block_str; |
| 372 |
struct cil_block *block; |
| 373 |
}; |
| 374 |
|
| 375 |
struct cil_in { |
| 376 |
symtab_t symtab[CIL_SYM_NUM]; |
| 377 |
int is_after; |
| 378 |
char *block_str; |
| 379 |
struct cil_block *block; |
| 380 |
}; |
| 381 |
|
| 382 |
struct cil_optional { |
| 383 |
struct cil_symtab_datum datum; |
| 384 |
}; |
| 385 |
|
| 386 |
struct cil_perm { |
| 387 |
struct cil_symtab_datum datum; |
| 388 |
unsigned int value; |
| 389 |
struct cil_list *classperms; /* Only used for map perms */ |
| 390 |
}; |
| 391 |
|
| 392 |
struct cil_class { |
| 393 |
struct cil_symtab_datum datum; |
| 394 |
symtab_t perms; |
| 395 |
unsigned int num_perms; |
| 396 |
struct cil_class *common; /* Only used for kernel class */ |
| 397 |
uint32_t ordered; /* Only used for kernel class */ |
| 398 |
}; |
| 399 |
|
| 400 |
struct cil_classperms_set { |
| 401 |
char *set_str; |
| 402 |
struct cil_classpermission *set; |
| 403 |
}; |
| 404 |
|
| 405 |
struct cil_classperms { |
| 406 |
char *class_str; |
| 407 |
struct cil_class *class; |
| 408 |
struct cil_list *perm_strs; |
| 409 |
struct cil_list *perms; |
| 410 |
}; |
| 411 |
|
| 412 |
struct cil_classpermission { |
| 413 |
struct cil_symtab_datum datum; |
| 414 |
struct cil_list *classperms; |
| 415 |
}; |
| 416 |
|
| 417 |
struct cil_classpermissionset { |
| 418 |
char *set_str; |
| 419 |
struct cil_classpermission *set; |
| 420 |
struct cil_list *classperms; |
| 421 |
}; |
| 422 |
|
| 423 |
struct cil_classmapping { |
| 424 |
char *map_class_str; |
| 425 |
struct cil_class *map_class; |
| 426 |
char *map_perm_str; |
| 427 |
struct cil_perm *map_perm; |
| 428 |
struct cil_list *classperms; |
| 429 |
}; |
| 430 |
|
| 431 |
struct cil_classcommon { |
| 432 |
char *class_str; |
| 433 |
struct cil_class *class; |
| 434 |
char *common_str; |
| 435 |
struct cil_class *common; |
| 436 |
}; |
| 437 |
|
| 438 |
struct cil_alias { |
| 439 |
struct cil_symtab_datum datum; |
| 440 |
void *actual; |
| 441 |
}; |
| 442 |
|
| 443 |
struct cil_aliasactual { |
| 444 |
char *alias_str; |
| 445 |
void *alias; |
| 446 |
char *actual_str; |
| 447 |
void *actual; |
| 448 |
}; |
| 449 |
|
| 450 |
struct cil_sid { |
| 451 |
struct cil_symtab_datum datum; |
| 452 |
struct cil_context *context; |
| 453 |
uint32_t ordered; |
| 454 |
}; |
| 455 |
|
| 456 |
struct cil_sidcontext { |
| 457 |
char *sid_str; |
| 458 |
struct cil_sid *sid; |
| 459 |
char *context_str; |
| 460 |
struct cil_context *context; |
| 461 |
}; |
| 462 |
|
| 463 |
struct cil_user { |
| 464 |
struct cil_symtab_datum datum; |
| 465 |
struct cil_user *bounds; |
| 466 |
ebitmap_t *roles; |
| 467 |
struct cil_level *dftlevel; |
| 468 |
struct cil_levelrange *range; |
| 469 |
int value; |
| 470 |
}; |
| 471 |
|
| 472 |
struct cil_userattribute { |
| 473 |
struct cil_symtab_datum datum; |
| 474 |
struct cil_list *expr_list; |
| 475 |
ebitmap_t *users; |
| 476 |
}; |
| 477 |
|
| 478 |
struct cil_userattributeset { |
| 479 |
char *attr_str; |
| 480 |
struct cil_userattribute *attr; |
| 481 |
struct cil_list *str_expr; |
| 482 |
struct cil_list *datum_expr; |
| 483 |
}; |
| 484 |
|
| 485 |
struct cil_userrole { |
| 486 |
char *user_str; |
| 487 |
void *user; |
| 488 |
char *role_str; |
| 489 |
void *role; |
| 490 |
}; |
| 491 |
|
| 492 |
struct cil_userlevel { |
| 493 |
char *user_str; |
| 494 |
void *user; |
| 495 |
char *level_str; |
| 496 |
struct cil_level *level; |
| 497 |
}; |
| 498 |
|
| 499 |
struct cil_userrange { |
| 500 |
char *user_str; |
| 501 |
void *user; |
| 502 |
char *range_str; |
| 503 |
struct cil_levelrange *range; |
| 504 |
}; |
| 505 |
|
| 506 |
struct cil_userprefix { |
| 507 |
char *user_str; |
| 508 |
struct cil_user *user; |
| 509 |
char *prefix_str; |
| 510 |
}; |
| 511 |
|
| 512 |
struct cil_selinuxuser { |
| 513 |
char *name_str; |
| 514 |
char *user_str; |
| 515 |
struct cil_user *user; |
| 516 |
char *range_str; |
| 517 |
struct cil_levelrange *range; |
| 518 |
}; |
| 519 |
|
| 520 |
struct cil_role { |
| 521 |
struct cil_symtab_datum datum; |
| 522 |
struct cil_role *bounds; |
| 523 |
ebitmap_t *types; |
| 524 |
int value; |
| 525 |
}; |
| 526 |
|
| 527 |
struct cil_roleattribute { |
| 528 |
struct cil_symtab_datum datum; |
| 529 |
struct cil_list *expr_list; |
| 530 |
ebitmap_t *roles; |
| 531 |
}; |
| 532 |
|
| 533 |
struct cil_roleattributeset { |
| 534 |
char *attr_str; |
| 535 |
struct cil_roleattribute *attr; |
| 536 |
struct cil_list *str_expr; |
| 537 |
struct cil_list *datum_expr; |
| 538 |
}; |
| 539 |
|
| 540 |
struct cil_roletype { |
| 541 |
char *role_str; |
| 542 |
void *role; /* role or attribute */ |
| 543 |
char *type_str; |
| 544 |
void *type; /* type, alias, or attribute */ |
| 545 |
}; |
| 546 |
|
| 547 |
struct cil_type { |
| 548 |
struct cil_symtab_datum datum; |
| 549 |
struct cil_type *bounds; |
| 550 |
int value; |
| 551 |
}; |
| 552 |
|
| 553 |
#define CIL_ATTR_AVRULE (1 << 0) |
| 554 |
#define CIL_ATTR_NEVERALLOW (1 << 1) |
| 555 |
#define CIL_ATTR_CONSTRAINT (1 << 2) |
| 556 |
#define CIL_ATTR_EXPAND_TRUE (1 << 3) |
| 557 |
#define CIL_ATTR_EXPAND_FALSE (1 << 4) |
| 558 |
struct cil_typeattribute { |
| 559 |
struct cil_symtab_datum datum; |
| 560 |
struct cil_list *expr_list; |
| 561 |
ebitmap_t *types; |
| 562 |
int used; // whether or not this attribute was used in a binary policy rule |
| 563 |
int keep; |
| 564 |
}; |
| 565 |
|
| 566 |
struct cil_typeattributeset { |
| 567 |
char *attr_str; |
| 568 |
struct cil_typeattribute *attr; |
| 569 |
struct cil_list *str_expr; |
| 570 |
struct cil_list *datum_expr; |
| 571 |
}; |
| 572 |
|
| 573 |
struct cil_expandtypeattribute { |
| 574 |
struct cil_list *attr_strs; |
| 575 |
struct cil_list *attr_datums; |
| 576 |
int expand; |
| 577 |
}; |
| 578 |
|
| 579 |
struct cil_typepermissive { |
| 580 |
char *type_str; |
| 581 |
void *type; /* type or alias */ |
| 582 |
}; |
| 583 |
|
| 584 |
struct cil_typeneveraudit { |
| 585 |
char *type_str; |
| 586 |
void *type; /* type or alias */ |
| 587 |
}; |
| 588 |
|
| 589 |
struct cil_nametypetransition { |
| 590 |
char *src_str; |
| 591 |
void *src; /* type, alias, or attribute */ |
| 592 |
char *tgt_str; |
| 593 |
void *tgt; /* type, alias, or attribute */ |
| 594 |
char *obj_str; |
| 595 |
struct cil_class *obj; |
| 596 |
char *name_str; |
| 597 |
struct cil_symtab_datum *name; |
| 598 |
char *result_str; |
| 599 |
void *result; /* type or alias */ |
| 600 |
|
| 601 |
}; |
| 602 |
|
| 603 |
struct cil_rangetransition { |
| 604 |
char *src_str; |
| 605 |
void *src; /* type, alias, or attribute */ |
| 606 |
char *exec_str; |
| 607 |
void *exec; /* type, alias, or attribute */ |
| 608 |
char *obj_str; |
| 609 |
struct cil_class *obj; |
| 610 |
char *range_str; |
| 611 |
struct cil_levelrange *range; |
| 612 |
}; |
| 613 |
|
| 614 |
struct cil_bool { |
| 615 |
struct cil_symtab_datum datum; |
| 616 |
uint16_t value; |
| 617 |
}; |
| 618 |
|
| 619 |
struct cil_tunable { |
| 620 |
struct cil_symtab_datum datum; |
| 621 |
uint16_t value; |
| 622 |
}; |
| 623 |
|
| 624 |
#define CIL_AVRULE_ALLOWED 1 |
| 625 |
#define CIL_AVRULE_AUDITALLOW 2 |
| 626 |
#define CIL_AVRULE_DONTAUDIT 8 |
| 627 |
#define CIL_AVRULE_NEVERALLOW 128 |
| 628 |
#define CIL_AVRULE_AV (AVRULE_ALLOWED | AVRULE_AUDITALLOW | AVRULE_DONTAUDIT | AVRULE_NEVERALLOW) |
| 629 |
struct cil_avrule { |
| 630 |
int is_extended; |
| 631 |
uint32_t rule_kind; |
| 632 |
char *src_str; |
| 633 |
void *src; /* type, alias, or attribute */ |
| 634 |
char *tgt_str; |
| 635 |
void *tgt; /* type, alias, or attribute */ |
| 636 |
union { |
| 637 |
struct cil_list *classperms; |
| 638 |
struct { |
| 639 |
char *permx_str; |
| 640 |
struct cil_permissionx *permx; |
| 641 |
} x; |
| 642 |
} perms; |
| 643 |
}; |
| 644 |
|
| 645 |
#define CIL_PERMX_KIND_IOCTL 1 |
| 646 |
#define CIL_PERMX_KIND_NLMSG 2 |
| 647 |
struct cil_permissionx { |
| 648 |
struct cil_symtab_datum datum; |
| 649 |
uint32_t kind; |
| 650 |
char *obj_str; |
| 651 |
struct cil_class *obj; |
| 652 |
struct cil_list *expr_str; |
| 653 |
ebitmap_t *perms; |
| 654 |
}; |
| 655 |
|
| 656 |
struct cil_deny_rule { |
| 657 |
char *src_str; |
| 658 |
void *src; /* type, alias, or attribute */ |
| 659 |
char *tgt_str; |
| 660 |
void *tgt; /* type, alias, or attribute */ |
| 661 |
struct cil_list *classperms; |
| 662 |
}; |
| 663 |
|
| 664 |
#define CIL_TYPE_TRANSITION 16 |
| 665 |
#define CIL_TYPE_MEMBER 32 |
| 666 |
#define CIL_TYPE_CHANGE 64 |
| 667 |
#define CIL_AVRULE_TYPE (AVRULE_TRANSITION | AVRULE_MEMBER | AVRULE_CHANGE) |
| 668 |
struct cil_type_rule { |
| 669 |
uint32_t rule_kind; |
| 670 |
char *src_str; |
| 671 |
void *src; /* type, alias, or attribute */ |
| 672 |
char *tgt_str; |
| 673 |
void *tgt; /* type, alias, or attribute */ |
| 674 |
char *obj_str; |
| 675 |
struct cil_class *obj; |
| 676 |
char *result_str; |
| 677 |
void *result; /* type or alias */ |
| 678 |
}; |
| 679 |
|
| 680 |
struct cil_roletransition { |
| 681 |
char *src_str; |
| 682 |
struct cil_role *src; |
| 683 |
char *tgt_str; |
| 684 |
void *tgt; /* type, alias, or attribute */ |
| 685 |
char *obj_str; |
| 686 |
struct cil_class *obj; |
| 687 |
char *result_str; |
| 688 |
struct cil_role *result; |
| 689 |
}; |
| 690 |
|
| 691 |
struct cil_roleallow { |
| 692 |
char *src_str; |
| 693 |
void *src; /* role or attribute */ |
| 694 |
char *tgt_str; |
| 695 |
void *tgt; /* role or attribute */ |
| 696 |
}; |
| 697 |
|
| 698 |
struct cil_sens { |
| 699 |
struct cil_symtab_datum datum; |
| 700 |
struct cil_list *cats_list; |
| 701 |
uint32_t ordered; |
| 702 |
}; |
| 703 |
|
| 704 |
struct cil_cat { |
| 705 |
struct cil_symtab_datum datum; |
| 706 |
uint32_t ordered; |
| 707 |
int value; |
| 708 |
}; |
| 709 |
|
| 710 |
struct cil_cats { |
| 711 |
uint32_t evaluated; |
| 712 |
struct cil_list *str_expr; |
| 713 |
struct cil_list *datum_expr; |
| 714 |
}; |
| 715 |
|
| 716 |
struct cil_catset { |
| 717 |
struct cil_symtab_datum datum; |
| 718 |
struct cil_cats *cats; |
| 719 |
}; |
| 720 |
|
| 721 |
struct cil_senscat { |
| 722 |
char *sens_str; |
| 723 |
struct cil_sens *sens; |
| 724 |
struct cil_cats *cats; |
| 725 |
}; |
| 726 |
|
| 727 |
struct cil_level { |
| 728 |
struct cil_symtab_datum datum; |
| 729 |
char *sens_str; |
| 730 |
struct cil_sens *sens; |
| 731 |
struct cil_cats *cats; |
| 732 |
}; |
| 733 |
|
| 734 |
struct cil_levelrange { |
| 735 |
struct cil_symtab_datum datum; |
| 736 |
char *low_str; |
| 737 |
struct cil_level *low; |
| 738 |
char *high_str; |
| 739 |
struct cil_level *high; |
| 740 |
}; |
| 741 |
|
| 742 |
struct cil_context { |
| 743 |
struct cil_symtab_datum datum; |
| 744 |
char *user_str; |
| 745 |
struct cil_user *user; |
| 746 |
char *role_str; |
| 747 |
struct cil_role *role; |
| 748 |
char *type_str; |
| 749 |
void *type; /* type or alias */ |
| 750 |
char *range_str; |
| 751 |
struct cil_levelrange *range; |
| 752 |
}; |
| 753 |
|
| 754 |
enum cil_filecon_types { |
| 755 |
CIL_FILECON_ANY = 0, |
| 756 |
CIL_FILECON_FILE, |
| 757 |
CIL_FILECON_DIR, |
| 758 |
CIL_FILECON_CHAR, |
| 759 |
CIL_FILECON_BLOCK, |
| 760 |
CIL_FILECON_SOCKET, |
| 761 |
CIL_FILECON_PIPE, |
| 762 |
CIL_FILECON_SYMLINK, |
| 763 |
}; |
| 764 |
|
| 765 |
struct cil_filecon { |
| 766 |
char *path_str; |
| 767 |
struct cil_symtab_datum *path; |
| 768 |
enum cil_filecon_types type; |
| 769 |
char *context_str; |
| 770 |
struct cil_context *context; |
| 771 |
}; |
| 772 |
|
| 773 |
enum cil_protocol { |
| 774 |
CIL_PROTOCOL_UDP = 1, |
| 775 |
CIL_PROTOCOL_TCP, |
| 776 |
CIL_PROTOCOL_DCCP, |
| 777 |
CIL_PROTOCOL_SCTP |
| 778 |
}; |
| 779 |
|
| 780 |
struct cil_ibpkeycon { |
| 781 |
char *subnet_prefix_str; |
| 782 |
uint32_t pkey_low; |
| 783 |
uint32_t pkey_high; |
| 784 |
char *context_str; |
| 785 |
struct cil_context *context; |
| 786 |
}; |
| 787 |
|
| 788 |
struct cil_portcon { |
| 789 |
enum cil_protocol proto; |
| 790 |
uint32_t port_low; |
| 791 |
uint32_t port_high; |
| 792 |
char *context_str; |
| 793 |
struct cil_context *context; |
| 794 |
}; |
| 795 |
|
| 796 |
struct cil_nodecon { |
| 797 |
char *addr_str; |
| 798 |
struct cil_ipaddr *addr; |
| 799 |
char *mask_str; |
| 800 |
struct cil_ipaddr *mask; |
| 801 |
char *context_str; |
| 802 |
struct cil_context *context; |
| 803 |
}; |
| 804 |
|
| 805 |
struct cil_ipaddr { |
| 806 |
struct cil_symtab_datum datum; |
| 807 |
int family; |
| 808 |
union { |
| 809 |
struct in_addr v4; |
| 810 |
struct in6_addr v6; |
| 811 |
} ip; |
| 812 |
}; |
| 813 |
|
| 814 |
struct cil_genfscon { |
| 815 |
char *fs_str; |
| 816 |
char *path_str; |
| 817 |
enum cil_filecon_types file_type; |
| 818 |
char *context_str; |
| 819 |
struct cil_context *context; |
| 820 |
}; |
| 821 |
|
| 822 |
struct cil_netifcon { |
| 823 |
char *interface_str; |
| 824 |
char *if_context_str; |
| 825 |
struct cil_context *if_context; |
| 826 |
char *packet_context_str; |
| 827 |
struct cil_context *packet_context; |
| 828 |
char *context_str; |
| 829 |
}; |
| 830 |
|
| 831 |
struct cil_ibendportcon { |
| 832 |
char *dev_name_str; |
| 833 |
uint32_t port; |
| 834 |
char *context_str; |
| 835 |
struct cil_context *context; |
| 836 |
}; |
| 837 |
struct cil_pirqcon { |
| 838 |
uint32_t pirq; |
| 839 |
char *context_str; |
| 840 |
struct cil_context *context; |
| 841 |
}; |
| 842 |
|
| 843 |
struct cil_iomemcon { |
| 844 |
uint64_t iomem_low; |
| 845 |
uint64_t iomem_high; |
| 846 |
char *context_str; |
| 847 |
struct cil_context *context; |
| 848 |
}; |
| 849 |
|
| 850 |
struct cil_ioportcon { |
| 851 |
uint32_t ioport_low; |
| 852 |
uint32_t ioport_high; |
| 853 |
char *context_str; |
| 854 |
struct cil_context *context; |
| 855 |
}; |
| 856 |
|
| 857 |
struct cil_pcidevicecon { |
| 858 |
uint32_t dev; |
| 859 |
char *context_str; |
| 860 |
struct cil_context *context; |
| 861 |
}; |
| 862 |
|
| 863 |
struct cil_devicetreecon { |
| 864 |
char *path; |
| 865 |
char *context_str; |
| 866 |
struct cil_context *context; |
| 867 |
}; |
| 868 |
|
| 869 |
|
| 870 |
/* Ensure that CIL uses the same values as sepol services.h */ |
| 871 |
enum cil_fsuse_types { |
| 872 |
CIL_FSUSE_XATTR = SECURITY_FS_USE_XATTR, |
| 873 |
CIL_FSUSE_TASK = SECURITY_FS_USE_TASK, |
| 874 |
CIL_FSUSE_TRANS = SECURITY_FS_USE_TRANS |
| 875 |
}; |
| 876 |
|
| 877 |
struct cil_fsuse { |
| 878 |
enum cil_fsuse_types type; |
| 879 |
char *fs_str; |
| 880 |
char *context_str; |
| 881 |
struct cil_context *context; |
| 882 |
}; |
| 883 |
|
| 884 |
#define CIL_MLS_LEVELS "l1 l2 h1 h2" |
| 885 |
#define CIL_CONSTRAIN_KEYS "t1 t2 r1 r2 u1 u2" |
| 886 |
#define CIL_MLSCONSTRAIN_KEYS CIL_MLS_LEVELS CIL_CONSTRAIN_KEYS |
| 887 |
#define CIL_CONSTRAIN_OPER "== != eq dom domby incomp not and or" |
| 888 |
struct cil_constrain { |
| 889 |
struct cil_list *classperms; |
| 890 |
struct cil_list *str_expr; |
| 891 |
struct cil_list *datum_expr; |
| 892 |
}; |
| 893 |
|
| 894 |
struct cil_validatetrans { |
| 895 |
char *class_str; |
| 896 |
struct cil_class *class; |
| 897 |
struct cil_list *str_expr; |
| 898 |
struct cil_list *datum_expr; |
| 899 |
}; |
| 900 |
|
| 901 |
struct cil_param { |
| 902 |
char *str; |
| 903 |
enum cil_flavor flavor; |
| 904 |
}; |
| 905 |
|
| 906 |
struct cil_macro { |
| 907 |
struct cil_symtab_datum datum; |
| 908 |
symtab_t symtab[CIL_SYM_NUM]; |
| 909 |
struct cil_list *params; |
| 910 |
}; |
| 911 |
|
| 912 |
struct cil_args { |
| 913 |
char *arg_str; |
| 914 |
struct cil_symtab_datum *arg; |
| 915 |
char *param_str; |
| 916 |
enum cil_flavor flavor; |
| 917 |
}; |
| 918 |
|
| 919 |
struct cil_call { |
| 920 |
char *macro_str; |
| 921 |
struct cil_macro *macro; |
| 922 |
struct cil_tree *args_tree; |
| 923 |
struct cil_list *args; |
| 924 |
int copied; |
| 925 |
}; |
| 926 |
|
| 927 |
#define CIL_TRUE 1 |
| 928 |
#define CIL_FALSE 0 |
| 929 |
|
| 930 |
struct cil_condblock { |
| 931 |
enum cil_flavor flavor; |
| 932 |
symtab_t symtab[CIL_SYM_NUM]; |
| 933 |
}; |
| 934 |
|
| 935 |
struct cil_booleanif { |
| 936 |
struct cil_list *str_expr; |
| 937 |
struct cil_list *datum_expr; |
| 938 |
int preserved_tunable; |
| 939 |
}; |
| 940 |
|
| 941 |
struct cil_tunableif { |
| 942 |
struct cil_list *str_expr; |
| 943 |
struct cil_list *datum_expr; |
| 944 |
}; |
| 945 |
|
| 946 |
struct cil_policycap { |
| 947 |
struct cil_symtab_datum datum; |
| 948 |
}; |
| 949 |
|
| 950 |
struct cil_bounds { |
| 951 |
char *parent_str; |
| 952 |
void *parent; |
| 953 |
char *child_str; |
| 954 |
void *child; |
| 955 |
}; |
| 956 |
|
| 957 |
/* Ensure that CIL uses the same values as sepol policydb.h */ |
| 958 |
enum cil_default_object { |
| 959 |
CIL_DEFAULT_SOURCE = DEFAULT_SOURCE, |
| 960 |
CIL_DEFAULT_TARGET = DEFAULT_TARGET, |
| 961 |
}; |
| 962 |
|
| 963 |
/* Default labeling behavior for users, roles, and types */ |
| 964 |
struct cil_default { |
| 965 |
enum cil_flavor flavor; |
| 966 |
struct cil_list *class_strs; |
| 967 |
struct cil_list *class_datums; |
| 968 |
enum cil_default_object object; |
| 969 |
}; |
| 970 |
|
| 971 |
/* Ensure that CIL uses the same values as sepol policydb.h */ |
| 972 |
enum cil_default_object_range { |
| 973 |
CIL_DEFAULT_SOURCE_LOW = DEFAULT_SOURCE_LOW, |
| 974 |
CIL_DEFAULT_SOURCE_HIGH = DEFAULT_SOURCE_HIGH, |
| 975 |
CIL_DEFAULT_SOURCE_LOW_HIGH = DEFAULT_SOURCE_LOW_HIGH, |
| 976 |
CIL_DEFAULT_TARGET_LOW = DEFAULT_TARGET_LOW, |
| 977 |
CIL_DEFAULT_TARGET_HIGH = DEFAULT_TARGET_HIGH, |
| 978 |
CIL_DEFAULT_TARGET_LOW_HIGH = DEFAULT_TARGET_LOW_HIGH, |
| 979 |
CIL_DEFAULT_GLBLUB = DEFAULT_GLBLUB, |
| 980 |
}; |
| 981 |
|
| 982 |
/* Default labeling behavior for range */ |
| 983 |
struct cil_defaultrange { |
| 984 |
struct cil_list *class_strs; |
| 985 |
struct cil_list *class_datums; |
| 986 |
enum cil_default_object_range object_range; |
| 987 |
}; |
| 988 |
|
| 989 |
struct cil_handleunknown { |
| 990 |
int handle_unknown; |
| 991 |
}; |
| 992 |
|
| 993 |
struct cil_mls { |
| 994 |
int value; |
| 995 |
}; |
| 996 |
|
| 997 |
struct cil_src_info { |
| 998 |
char *kind; |
| 999 |
uint32_t hll_line; |
| 1000 |
char *path; |
| 1001 |
}; |
| 1002 |
|
| 1003 |
void cil_db_init(struct cil_db **db); |
| 1004 |
void cil_db_destroy(struct cil_db **db); |
| 1005 |
|
| 1006 |
void cil_root_init(struct cil_root **root); |
| 1007 |
void cil_root_destroy(struct cil_root *root); |
| 1008 |
|
| 1009 |
void cil_destroy_data(void **data, enum cil_flavor flavor); |
| 1010 |
|
| 1011 |
int cil_flavor_to_symtab_index(enum cil_flavor flavor, enum cil_sym_index *index); |
| 1012 |
const char * cil_node_to_string(struct cil_tree_node *node); |
| 1013 |
|
| 1014 |
int cil_userprefixes_to_string(struct cil_db *db, char **out, size_t *size); |
| 1015 |
int cil_selinuxusers_to_string(struct cil_db *db, char **out, size_t *size); |
| 1016 |
int cil_filecons_to_string(struct cil_db *db, char **out, size_t *size); |
| 1017 |
|
| 1018 |
void cil_symtab_array_init(symtab_t symtab[], const int symtab_sizes[CIL_SYM_NUM]); |
| 1019 |
void cil_symtab_array_destroy(symtab_t symtab[]); |
| 1020 |
void cil_destroy_ast_symtabs(struct cil_tree_node *root); |
| 1021 |
int cil_get_symtab(struct cil_tree_node *ast_node, symtab_t **symtab, enum cil_sym_index sym_index); |
| 1022 |
int cil_string_to_uint32(const char *string, uint32_t *value, int base); |
| 1023 |
int cil_string_to_uint64(const char *string, uint64_t *value, int base); |
| 1024 |
|
| 1025 |
void cil_sort_init(struct cil_sort **sort); |
| 1026 |
void cil_sort_destroy(struct cil_sort **sort); |
| 1027 |
void cil_ordered_init(struct cil_ordered **ordered); |
| 1028 |
void cil_netifcon_init(struct cil_netifcon **netifcon); |
| 1029 |
void cil_ibendportcon_init(struct cil_ibendportcon **ibendportcon); |
| 1030 |
void cil_context_init(struct cil_context **context); |
| 1031 |
void cil_level_init(struct cil_level **level); |
| 1032 |
void cil_levelrange_init(struct cil_levelrange **lvlrange); |
| 1033 |
void cil_sens_init(struct cil_sens **sens); |
| 1034 |
void cil_block_init(struct cil_block **block); |
| 1035 |
void cil_blockinherit_init(struct cil_blockinherit **inherit); |
| 1036 |
void cil_blockabstract_init(struct cil_blockabstract **abstract); |
| 1037 |
void cil_in_init(struct cil_in **in); |
| 1038 |
void cil_class_init(struct cil_class **class); |
| 1039 |
void cil_classcommon_init(struct cil_classcommon **classcommon); |
| 1040 |
void cil_sid_init(struct cil_sid **sid); |
| 1041 |
void cil_sidcontext_init(struct cil_sidcontext **sidcontext); |
| 1042 |
void cil_userrole_init(struct cil_userrole **userrole); |
| 1043 |
void cil_userprefix_init(struct cil_userprefix **userprefix); |
| 1044 |
void cil_selinuxuser_init(struct cil_selinuxuser **selinuxuser); |
| 1045 |
void cil_roleattribute_init(struct cil_roleattribute **attribute); |
| 1046 |
void cil_roleattributeset_init(struct cil_roleattributeset **attrset); |
| 1047 |
void cil_roletype_init(struct cil_roletype **roletype); |
| 1048 |
void cil_typeattribute_init(struct cil_typeattribute **attribute); |
| 1049 |
void cil_typeattributeset_init(struct cil_typeattributeset **attrset); |
| 1050 |
void cil_expandtypeattribute_init(struct cil_expandtypeattribute **expandattr); |
| 1051 |
void cil_alias_init(struct cil_alias **alias); |
| 1052 |
void cil_aliasactual_init(struct cil_aliasactual **aliasactual); |
| 1053 |
void cil_typepermissive_init(struct cil_typepermissive **typeperm); |
| 1054 |
void cil_typeneveraudit_init(struct cil_typeneveraudit **typeperm); |
| 1055 |
void cil_nametypetransition_init(struct cil_nametypetransition **nametypetrans); |
| 1056 |
void cil_rangetransition_init(struct cil_rangetransition **rangetrans); |
| 1057 |
void cil_bool_init(struct cil_bool **cilbool); |
| 1058 |
void cil_boolif_init(struct cil_booleanif **bif); |
| 1059 |
void cil_condblock_init(struct cil_condblock **cb); |
| 1060 |
void cil_tunable_init(struct cil_tunable **ciltun); |
| 1061 |
void cil_tunif_init(struct cil_tunableif **tif); |
| 1062 |
void cil_avrule_init(struct cil_avrule **avrule); |
| 1063 |
void cil_permissionx_init(struct cil_permissionx **permx); |
| 1064 |
void cil_deny_rule_init(struct cil_deny_rule **rule); |
| 1065 |
void cil_type_rule_init(struct cil_type_rule **type_rule); |
| 1066 |
void cil_roletransition_init(struct cil_roletransition **roletrans); |
| 1067 |
void cil_roleallow_init(struct cil_roleallow **role_allow); |
| 1068 |
void cil_catset_init(struct cil_catset **catset); |
| 1069 |
void cil_cats_init(struct cil_cats **cats); |
| 1070 |
void cil_senscat_init(struct cil_senscat **senscat); |
| 1071 |
void cil_filecon_init(struct cil_filecon **filecon); |
| 1072 |
void cil_ibpkeycon_init(struct cil_ibpkeycon **ibpkeycon); |
| 1073 |
void cil_portcon_init(struct cil_portcon **portcon); |
| 1074 |
void cil_nodecon_init(struct cil_nodecon **nodecon); |
| 1075 |
void cil_genfscon_init(struct cil_genfscon **genfscon); |
| 1076 |
void cil_pirqcon_init(struct cil_pirqcon **pirqcon); |
| 1077 |
void cil_iomemcon_init(struct cil_iomemcon **iomemcon); |
| 1078 |
void cil_ioportcon_init(struct cil_ioportcon **ioportcon); |
| 1079 |
void cil_pcidevicecon_init(struct cil_pcidevicecon **pcidevicecon); |
| 1080 |
void cil_devicetreecon_init(struct cil_devicetreecon **devicetreecon); |
| 1081 |
void cil_fsuse_init(struct cil_fsuse **fsuse); |
| 1082 |
void cil_constrain_init(struct cil_constrain **constrain); |
| 1083 |
void cil_validatetrans_init(struct cil_validatetrans **validtrans); |
| 1084 |
void cil_ipaddr_init(struct cil_ipaddr **ipaddr); |
| 1085 |
void cil_perm_init(struct cil_perm **perm); |
| 1086 |
void cil_classpermission_init(struct cil_classpermission **cp); |
| 1087 |
void cil_classpermissionset_init(struct cil_classpermissionset **cps); |
| 1088 |
void cil_classperms_set_init(struct cil_classperms_set **cp_set); |
| 1089 |
void cil_classperms_init(struct cil_classperms **cp); |
| 1090 |
void cil_classmapping_init(struct cil_classmapping **mapping); |
| 1091 |
void cil_user_init(struct cil_user **user); |
| 1092 |
void cil_userlevel_init(struct cil_userlevel **usrlvl); |
| 1093 |
void cil_userrange_init(struct cil_userrange **userrange); |
| 1094 |
void cil_role_init(struct cil_role **role); |
| 1095 |
void cil_type_init(struct cil_type **type); |
| 1096 |
void cil_cat_init(struct cil_cat **cat); |
| 1097 |
void cil_args_init(struct cil_args **args); |
| 1098 |
void cil_call_init(struct cil_call **call); |
| 1099 |
void cil_optional_init(struct cil_optional **optional); |
| 1100 |
void cil_param_init(struct cil_param **param); |
| 1101 |
void cil_macro_init(struct cil_macro **macro); |
| 1102 |
void cil_policycap_init(struct cil_policycap **policycap); |
| 1103 |
void cil_bounds_init(struct cil_bounds **bounds); |
| 1104 |
void cil_default_init(struct cil_default **def); |
| 1105 |
void cil_defaultrange_init(struct cil_defaultrange **def); |
| 1106 |
void cil_handleunknown_init(struct cil_handleunknown **unk); |
| 1107 |
void cil_mls_init(struct cil_mls **mls); |
| 1108 |
void cil_src_info_init(struct cil_src_info **info); |
| 1109 |
void cil_userattribute_init(struct cil_userattribute **attribute); |
| 1110 |
void cil_userattributeset_init(struct cil_userattributeset **attrset); |
| 1111 |
|
| 1112 |
#endif |