No description
Find a file
Yi-Yo Chiang ea4369d141 fs_mgr: Strengthen ReadFstabFromFile() around gsi_public_metadata_file
ReadFstabFromFile() calls access() to check the existence of DSU
metadata files to determine if device is in DSU running state. This is
error prone because a failed access() can mean non-exsitent file as well
as the caller lacking the permission to path resolute the pathname.

Strengthen ReadFstabFromFile() to check the errno after a failed
access() or open(), if the errno is not ENOENT, then return with error,
as this may be indicating the caller doesn't have sufficient access
rights to call ReadFstabFromFile().

After this change, processes would need these policies to call
ReadFstabFromFile():
  allow scontext { metadata_file gsi_metadata_file_type }:dir search;
And these policies to call ReadFstabFromFile() within a DSU system:
  allow scontext gsi_public_metadata_file:file r_file_perms;

Bug: 181110285
Test: Presubmit
Change-Id: I1a6a796cb9b7b49af3aa5e7a5e8d99cde25e5857
2021-04-02 05:25:46 +00:00
bootstat bootstat: Add Tj thermal shutdown 2021-03-17 08:56:06 +00:00
cli-test [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
code_coverage [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
cpio [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
debuggerd Merge "debuggerd: store commandline instead of process name." 2021-03-31 08:29:54 +00:00
diagnose_usb [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
fastboot Merge "fastboot: Don't fail when unable to get boot partition size" 2021-03-29 18:56:28 +00:00
fs_mgr fs_mgr: Strengthen ReadFstabFromFile() around gsi_public_metadata_file 2021-04-02 05:25:46 +00:00
gatekeeperd Keystore 2.0: Remove references to Keystore 1.0 2021-03-18 15:32:19 -07:00
healthd [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
include Remove include/backtrace symlink. 2020-10-20 12:46:14 -07:00
init fs_mgr: Suppress SkipMountingPartitions log in ReadFstabFromFile 2021-04-02 05:23:02 +00:00
janitors Add the two best build system janitors. 2019-03-25 10:25:13 -07:00
libappfuse [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libasyncio [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libbinderwrapper [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libcrypto_utils [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libcutils Merge "Add UID for virtmanager" 2021-03-29 07:26:44 +00:00
libdiskconfig [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libgrallocusage [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libkeyutils Separate out libkeyutils and mini_keyctl. 2021-03-16 17:39:00 -07:00
libmodprobe libmodprobe: refactor blocklist functionality 2021-03-31 09:34:47 -07:00
libnetutils [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libpackagelistparser [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libprocessgroup libprocessgroup: introduce optional attribute for cgroup controllers 2021-03-11 17:42:30 +00:00
libqtaguid [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libsparse [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libstats [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-03-17 12:59:19 -07:00
libsuspend [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libsync [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libsystem [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libsysutils [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libusbhost [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
libutils Disallow exit-time destructors in libutils. 2021-03-04 09:46:23 -08:00
libvndksupport [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
llkd Merge "Add support for a hw_timeout_multiplier system property." 2021-03-17 18:18:51 +00:00
mini_keyctl Separate out libkeyutils and mini_keyctl. 2021-03-16 17:39:00 -07:00
property_service [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
qemu_pipe [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
reboot [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
rootdir Merge "Revert "libdexfile_external is being replaced by libdexfile."" 2021-04-01 14:22:53 +00:00
run-as [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
sdcard [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
set-verity-state [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
shell_and_utilities [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
storaged [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
toolbox Update owners for modprobe.c 2021-04-01 12:42:21 -07:00
trusty Merge "trusty: apploader: Log errors to logcat" 2021-04-01 05:30:25 +00:00
usbd [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
watchdogd [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Move clang-formats to build. 2019-01-18 14:26:33 -08:00
.clang-format-4 Move clang-formats to build. 2019-01-18 14:26:33 -08:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
CleanSpec.mk snapshotctl don't auto-merge. 2020-03-03 13:19:49 -08:00
METADATA Add METADATA to system/core: Apache2+BSD=NOTICE 2020-04-29 13:16:41 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
OWNERS Remove baligh@ from owners. CodeShuffle done. 2020-10-17 00:28:10 +00:00
PREUPLOAD.cfg Add AOSP preupload hook. 2020-04-23 11:02:00 -07:00
TEST_MAPPING Clean up cc_test TEST_MAPPING after default update 2021-02-19 20:07:05 +00:00