label.h (97acb6a8fcc4e5c2cdc2693a35acdc5a7461aaa3) | label.h (33fc95d8293cfca352ac875668857293e22d7d51) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor label definitions 6 * 7 * Copyright 2017 Canonical Ltd. 8 */ --- 319 unchanged lines hidden (view full) --- 328 size_t n, gfp_t gfp, bool create, 329 bool force_stack); 330struct aa_label *aa_label_parse(struct aa_label *base, const char *str, 331 gfp_t gfp, bool create, bool force_stack); 332 333static inline const char *aa_label_strn_split(const char *str, int n) 334{ 335 const char *pos; | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * AppArmor security module 4 * 5 * This file contains AppArmor label definitions 6 * 7 * Copyright 2017 Canonical Ltd. 8 */ --- 319 unchanged lines hidden (view full) --- 328 size_t n, gfp_t gfp, bool create, 329 bool force_stack); 330struct aa_label *aa_label_parse(struct aa_label *base, const char *str, 331 gfp_t gfp, bool create, bool force_stack); 332 333static inline const char *aa_label_strn_split(const char *str, int n) 334{ 335 const char *pos; |
336 unsigned int state; | 336 aa_state_t state; |
337 338 state = aa_dfa_matchn_until(stacksplitdfa, DFA_START, str, n, &pos); 339 if (!ACCEPT_TABLE(stacksplitdfa)[state]) 340 return NULL; 341 342 return pos - 3; 343} 344 345static inline const char *aa_label_str_split(const char *str) 346{ 347 const char *pos; | 337 338 state = aa_dfa_matchn_until(stacksplitdfa, DFA_START, str, n, &pos); 339 if (!ACCEPT_TABLE(stacksplitdfa)[state]) 340 return NULL; 341 342 return pos - 3; 343} 344 345static inline const char *aa_label_str_split(const char *str) 346{ 347 const char *pos; |
348 unsigned int state; | 348 aa_state_t state; |
349 350 state = aa_dfa_match_until(stacksplitdfa, DFA_START, str, &pos); 351 if (!ACCEPT_TABLE(stacksplitdfa)[state]) 352 return NULL; 353 354 return pos - 3; 355} 356 357 358 359struct aa_perms; 360int aa_label_match(struct aa_profile *profile, struct aa_label *label, | 349 350 state = aa_dfa_match_until(stacksplitdfa, DFA_START, str, &pos); 351 if (!ACCEPT_TABLE(stacksplitdfa)[state]) 352 return NULL; 353 354 return pos - 3; 355} 356 357 358 359struct aa_perms; 360int aa_label_match(struct aa_profile *profile, struct aa_label *label, |
361 unsigned int state, bool subns, u32 request, | 361 aa_state_t state, bool subns, u32 request, |
362 struct aa_perms *perms); 363 364 365/** 366 * __aa_get_label - get a reference count to uncounted label reference 367 * @l: reference to get a count on 368 * 369 * Returns: pointer to reference OR NULL if race is lost and reference is --- 98 unchanged lines hidden --- | 362 struct aa_perms *perms); 363 364 365/** 366 * __aa_get_label - get a reference count to uncounted label reference 367 * @l: reference to get a count on 368 * 369 * Returns: pointer to reference OR NULL if race is lost and reference is --- 98 unchanged lines hidden --- |