fs_config: remove empty fs_config_* automation.
The code to manage citing empty <partition>/etc/fs_config_{files|dirs} content by specifically setting the file(s) to access mode 00000 is bitrotted and ill-suited for multiple partitions and was written for a more paranoid time when DAC and MAC rules were not nearly as mature. Striking out the complications as it affected deterministic results. Test: compile and boot Bug: 119310326 Change-Id: Iec02e0c1194eaa799ab95adff4ff0951a24652a4
This commit is contained in:
parent
1e57a89bf9
commit
640816eb42
|
@ -41,22 +41,7 @@ static const struct fs_path_config android_device_dirs[] = { };
|
|||
#endif
|
||||
|
||||
#ifdef NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_FILES
|
||||
static const struct fs_path_config android_device_files[] = {
|
||||
#ifdef NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "system/etc/fs_config_dirs"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "vendor/etc/fs_config_dirs"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "oem/etc/fs_config_dirs"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "odm/etc/fs_config_dirs"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "product/etc/fs_config_dirs"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "product_services/etc/fs_config_dirs"},
|
||||
#endif
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "system/etc/fs_config_files"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "vendor/etc/fs_config_files"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "oem/etc/fs_config_files"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "odm/etc/fs_config_files"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "product/etc/fs_config_files"},
|
||||
{0000, AID_ROOT, AID_ROOT, 0, "product_services/etc/fs_config_files"},
|
||||
};
|
||||
static const struct fs_path_config android_device_files[] = { };
|
||||
#endif
|
||||
|
||||
static void usage() {
|
||||
|
|
|
@ -909,22 +909,6 @@ class FSConfigGen(BaseGenerator):
|
|||
'#warning No device-supplied android_filesystem_config.h,'
|
||||
' using empty default.')
|
||||
|
||||
# Long names.
|
||||
# pylint: disable=invalid-name
|
||||
_NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS_ENTRY = (
|
||||
'{ 00000, AID_ROOT, AID_ROOT, 0,'
|
||||
'"system/etc/fs_config_dirs" },')
|
||||
|
||||
_NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_FILES_ENTRY = (
|
||||
'{ 00000, AID_ROOT, AID_ROOT, 0,'
|
||||
'"system/etc/fs_config_files" },')
|
||||
|
||||
_IFDEF_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS = (
|
||||
'#ifdef NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS')
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
_ENDIF = '#endif'
|
||||
|
||||
_OPEN_FILE_STRUCT = (
|
||||
'static const struct fs_path_config android_device_files[] = {')
|
||||
|
||||
|
@ -1082,12 +1066,6 @@ class FSConfigGen(BaseGenerator):
|
|||
for fs_config in files:
|
||||
self._to_fs_entry(fs_config)
|
||||
|
||||
if not are_dirs:
|
||||
print FSConfigGen._IFDEF_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
|
||||
print(
|
||||
' ' +
|
||||
FSConfigGen._NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS_ENTRY)
|
||||
print FSConfigGen._ENDIF
|
||||
print FSConfigGen._CLOSE_FILE_STRUCT
|
||||
|
||||
if are_dirs:
|
||||
|
|
Loading…
Reference in New Issue