This is necessary to match the mapping in the internal infrastructure.
Bug: 21724738
Change-Id: I292166ff5c0dea7f3d771627120f16af4c56073b
(cherry picked from commit 6f74c0b843)
When packages change, existing package-specific directories may have
gained/lost a UID mapping, so we need to update the permissions for
any in-memory nodes.
This allows an app to deliver data for another package before that
package is installed, which is the typical pattern of how OBB files
are delivered.
Also fix bug by re-deriving permissions when files are moved.
Bug: 25399427
Change-Id: I06f38a24ad7dee5f5099ba81429aef03208e5683
(cherry picked from commit f7aad11c1c)
This value is read from the ro.boot.bootreason system property.
Bug: 21724738
Change-Id: I43bef3d85ba9c8d87669a91da1aa675d9a86e348
(cherry picked from commit a4a1a4ac85)
Preload libraries needed by the public namespace
at the earlier stage. This saves time on
InitPublicNamespace and saves memory because
the libraries are linked before zygote fork.
Bug: http://b/26409579
Change-Id: I59153a4180b930f31b542d8d2cb17b5d63c36774
Don't look for breadcrumb files like convert_fde unless the fstab
flags indicate we actually care whether they are present or absent.
Bug: 26989796
Change-Id: I3cde9896b22fc6f5a4b63dc3f97ac4e3588b5568
The recent uapi header update moved all the interesting constants
out into another file. Track that, and add the missing makefile
dependency.
Bug: http://b/27073568
(cherry picked from commit bd02a47b22)
Change-Id: I9323a995511b12905949cba22c59cc28623068f3
This will make sure we get invoked in time,
and combined with a kernel change to increase
the window size (and thus rate-limit the
notifications) based on the amount of memory
on the device, this should provide a nice
balance between receiving too many notifications
vs getting notified too late.
Change-Id: I2f5e92390b94e582aaa06d88763a232e39673496
libprocessgroup checks whether it can use memory
cgroups for keeping track of forked processes by
seeing whether /dev/memcg/apps is writable. However,
on systems with memory cgroups disabled, SELinux
(correctly) no longer classifies this directory as a cgroup,
and starts denying zygote access. To fix this,
first check whether /dev/memcg/apps/tasks exists to
see if the cgroup is mounted; only then check whether
we can write to the directory.
Bug: 27046965
Change-Id: I6e44cd62d8c396e20ceb162c50606b3e86f2cb3e
The Shell app that stores bugreports now lives under DE storage for
all devices, both FBE and non-FBE.
Bug: 26668510
Change-Id: Iead1dcb98181a5caccf4d0c1e86de62abc6dc990
When creating an UnwindMapLocal fails in the Build() function call,
the destructor for UnwindMap is called. Unfortunately, the map_cursor_
member variable has not been initialized, so the call to destroy it
winds up operating on garbage data.
Part of this is a result of a bad class hierarchy, so this refactors
the classes slightly, and properly initializes the map_cursor_ member
variable in the base class.
Bug: 26931578
Change-Id: I885596bf65e4ef63559cee2c56cd41576d5ecc1b
When child (pid==0) executes fork branch 'pid_str'
will always be 0 writting wrong value to file(s).
Fix by utilizing getpid() to obtain correct pid.
Tracker link provides some insight on why use cases
aren't broken.
Bug: https://code.google.com/p/android/issues/detail?id=200392
Change-Id: I29989365a8bac94502c090918fa30e5cc88eb1ea
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
Clang static analyzer does not know the transfer of
object ownership to hashmapPut. Use a fake global
pointer variable to trick the analyzer.
BUG: 26955438
Change-Id: Id3ac595fff14e48d28a1147461cd836914857086
This ensures that all users on device follow a consistent path for
setup and validation of encryption policy.
Also add remaining user-specific directories and fix linking order.
Bug: 25796509
Change-Id: I8c2e42a78569817f7f5ea03f54b743a6661fdb9c