085f22f82d
This adds two macros which can be used in te files and contexts files. * is_flag_enabled(flag_name, codes) * is_flag_disabled(flag_name, codes) Also flag-guarding requires to process input files before any validations. Property contexts test and seapp contexts test are modified a little to handle that. Bug: 306563735 Test: build with manual guarding Change-Id: Ia1c6d00b7aab0da3901c19f16d553153aace018c
32 lines
1 KiB
Text
32 lines
1 KiB
Text
// Copyright (C) 2023 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// This file contains a list of flags for sepolicy.
|
|
se_policy_conf_defaults {
|
|
name: "se_policy_conf_flags_defaults",
|
|
srcs: [":sepolicy_flagging_macros"],
|
|
flags: [],
|
|
}
|
|
|
|
contexts_defaults {
|
|
name: "contexts_flags_defaults",
|
|
srcs: [":sepolicy_flagging_macros"],
|
|
neverallow_files: [":sepolicy_flagging_macros"], // for seapp_contexts
|
|
flags: [],
|
|
}
|
|
|
|
filegroup {
|
|
name: "sepolicy_flagging_macros",
|
|
srcs: ["te_macros"],
|
|
}
|