Commit graph

6 commits

Author SHA1 Message Date
Daniel Rosenberg
e4c966648e Allow setattr for chattr
Bug: 138322712
Test: No denial for chattr on boot
Change-Id: I9fdfc8ff4d3d0b2743ca572f4c3e64477f97cd84
2020-02-03 17:57:03 -08:00
Martijn Coenen
4de3228c46 Allow toolbox to set project quota IDs.
These ioctls are required to set a default project quota ID on
/data/media.

Bug: 146419093
Test: verified chattr call from rootdir/init.rc
Change-Id: I0c9028e0a6502302fe81a73dfa087261a36d9863
2020-01-31 16:09:04 +01:00
Daniel Rosenberg
5b8df30e47 Add permissions for chattr
This allows init to call chattr to allow casefolding on /data/media

Test: lsattr on /data/media on device with casefolding support
Bug: 138322712
Change-Id: I5715484d872088517f67c62a78344a2d417dd77f
2020-01-29 16:20:07 -08:00
Paul Crowley
2367ba358f Allow toolbox to rm -rf /data/per_boot
Bug: 140882488
Test: create files and dirs in /data/per_boot, check they're removed.
Change-Id: Idf0ba09cbe51cbff6a7b2a464c4651a1f7fcf343
2019-09-16 10:18:57 -07:00
Nick Kralevich
5e37271df8 Introduce system_file_type
system_file_type is a new attribute used to identify files which exist
on the /system partition. It's useful for allow rules in init, which are
based off of a blacklist of writable files. Additionally, it's useful
for constructing neverallow rules to prevent regressions.

Additionally, add commented out tests which enforce that all files on
the /system partition have the system_file_type attribute. These tests
will be uncommented in a future change after all the device-specific
policies are cleaned up.

Test: Device boots and no obvious problems.
Change-Id: Id9bae6625f042594c8eba74ca712abb09702c1e5
2018-09-27 12:52:09 -07:00
dcashman
cc39f63773 Split general policy into public and private components.
Divide policy into public and private components.  This is the first
step in splitting the policy creation for platform and non-platform
policies.  The policy in the public directory will be exported for use
in non-platform policy creation.  Backwards compatibility with it will
be achieved by converting the exported policy into attribute-based
policy when included as part of the non-platform policy and a mapping
file will be maintained to be included with the platform policy that
maps exported attributes of previous versions to the current platform
version.

Eventually we would like to create a clear interface between the
platform and non-platform device components so that the exported policy,
and the need for attributes is minimal.  For now, almost all types and
avrules are left in public.

Test: Tested by building policy and running on device.

Change-Id: Idef796c9ec169259787c3f9d8f423edf4ce27f8c
2016-10-06 13:09:06 -07:00
Renamed from toolbox.te (Browse further)