Inseob Kim | 085f22f | 2023-11-09 11:13:01 +0900 | [diff] [blame] | 1 | #################################### |
| 2 | # is_flag_enabled(flag, rules) |
| 3 | # SELinux rules which apply only if given feature is turned on |
Inseob Kim | 9868a0c | 2023-11-17 18:02:25 +0900 | [diff] [blame] | 4 | define(`is_flag_enabled', `ifelse(target_flag_$1, `true', `$2')') |
Inseob Kim | 085f22f | 2023-11-09 11:13:01 +0900 | [diff] [blame] | 5 | |
| 6 | #################################### |
| 7 | # is_flag_disabled(flag, rules) |
| 8 | # SELinux rules which apply only if given feature is turned off |
Inseob Kim | 9868a0c | 2023-11-17 18:02:25 +0900 | [diff] [blame] | 9 | define(`is_flag_disabled', `ifelse(target_flag_$1, `true', , `$2')') |
Inseob Kim | 8697fc8 | 2024-04-16 14:45:32 +0900 | [diff] [blame] | 10 | |
| 11 | #################################### |
Vadim Caen | d90d5ce | 2024-08-19 15:08:35 +0200 | [diff] [blame^] | 12 | # starting_at_board_api(api_level, rules_if_api_level) |
Inseob Kim | 8697fc8 | 2024-04-16 14:45:32 +0900 | [diff] [blame] | 13 | # |
Vadim Caen | d90d5ce | 2024-08-19 15:08:35 +0200 | [diff] [blame^] | 14 | # This macro conditionally exposes SELinux rules ensuring they are available |
| 15 | # only when the board API level is at or above the specified 'api_level'. |
Inseob Kim | 8697fc8 | 2024-04-16 14:45:32 +0900 | [diff] [blame] | 16 | define(`starting_at_board_api', `ifelse(eval(target_board_api_level >= $1), 1, `$2')') |
Vadim Caen | d90d5ce | 2024-08-19 15:08:35 +0200 | [diff] [blame^] | 17 | |
| 18 | #################################### |
| 19 | # until_board_api(api_level, rules_if_lower_api_level) |
| 20 | # |
| 21 | # This macro conditionally exposes SELinux rules ensuring they are available |
| 22 | # only when the board API level is below the specified 'api_level'. |
| 23 | define(`until_board_api', `ifelse(eval(target_board_api_level < $1), 1, `$2')') |