Commit Graph

518 Commits

Author SHA1 Message Date
Jeff Sharkey fb7e395455 am 9b41f452: am a9e453f1: Merge "vold no longer does MS_MOVE; remove tmpfs." into klp-dev
* commit '9b41f452013123d0a394e696f597467da73108ed':
  vold no longer does MS_MOVE; remove tmpfs.
2013-10-17 18:50:43 -07:00
Jeff Sharkey 9b41f45201 am a9e453f1: Merge "vold no longer does MS_MOVE; remove tmpfs." into klp-dev
* commit 'a9e453f1b552699f69dca19599c7624a581089bd':
  vold no longer does MS_MOVE; remove tmpfs.
2013-10-17 18:48:45 -07:00
Jeff Sharkey 00c8e1a219 vold no longer does MS_MOVE; remove tmpfs.
MS_MOVE was used when staging external storage devices, which no
longer occurs.  In fact, having a writable tmpfs was masking a vold
bug around moving apps to SD cards.

Bug: 11175082
Change-Id: Ib2d7561c3a0b6fde94f651a496cb0c1f12f88d96
2013-10-17 16:47:20 -07:00
Jeff Sharkey eef6fca832 am a5fdea71: am e93a0517: Set GID required to write, media_rw mount point.
* commit 'a5fdea7189239d7edeafa528c299306cba55e6c6':
  Set GID required to write, media_rw mount point.
2013-10-08 16:02:41 -07:00
Jeff Sharkey a5fdea7189 am e93a0517: Set GID required to write, media_rw mount point.
* commit 'e93a0517f4c88310066ac39c6b268ebfcceef44e':
  Set GID required to write, media_rw mount point.
2013-10-08 14:12:38 -07:00
Jeff Sharkey e93a0517f4 Set GID required to write, media_rw mount point.
Add sdcard FUSE daemon flag to specify the GID required for a package
to have write access.  Normally sdcard_rw, but it will be media_rw
for secondary external storage devices, so DefaultContainerService
can still clean up package directories after uninstall.

Create /mnt/media_rw which is where vold will mount raw secondary
external storage devices before wrapping them in a FUSE instance.

Bug: 10330128, 10330229
Change-Id: I4385c36fd9035cdf56892aaf7b36ef4b81f4418a
2013-10-08 12:56:37 -07:00
Colin Cross ecb2e3903b am ad296139: am 410f8c30: am 79b277ab: Merge "Set security context of /adb_keys and /data/misc/adb/adb_keys."
* commit 'ad2961397f1c7b79b114672108a3bc9b87dc8174':
  Set security context of /adb_keys and /data/misc/adb/adb_keys.
2013-10-03 15:17:53 -07:00
Alex Klyubin dcf2771bb7 am ea1f56e7: am b1dd1765: am b42fc74f: Merge "Expose /dev/hw_random to group "system"."
* commit 'ea1f56e7ffec235cc5d48e7cd9cb7d39f4ba1598':
  Expose /dev/hw_random to group "system".
2013-10-03 15:17:53 -07:00
Colin Cross ad2961397f am 410f8c30: am 79b277ab: Merge "Set security context of /adb_keys and /data/misc/adb/adb_keys."
* commit '410f8c305b416484f17f068c37b785605a2f69eb':
  Set security context of /adb_keys and /data/misc/adb/adb_keys.
2013-10-03 15:15:43 -07:00
Alex Klyubin ea1f56e7ff am b1dd1765: am b42fc74f: Merge "Expose /dev/hw_random to group "system"."
* commit 'b1dd176520896efacbabd1df65d8bb56e1bfeb71':
  Expose /dev/hw_random to group "system".
2013-10-03 15:15:43 -07:00
Colin Cross 410f8c305b am 79b277ab: Merge "Set security context of /adb_keys and /data/misc/adb/adb_keys."
* commit '79b277ab73711313690d03a9fb2e9cb3f9242b39':
  Set security context of /adb_keys and /data/misc/adb/adb_keys.
2013-10-03 15:14:14 -07:00
Alex Klyubin b1dd176520 am b42fc74f: Merge "Expose /dev/hw_random to group "system"."
* commit 'b42fc74f0db60e1e86deaf527b3b7e7ec53dcc54':
  Expose /dev/hw_random to group "system".
2013-10-03 15:14:13 -07:00
Colin Cross 79b277ab73 Merge "Set security context of /adb_keys and /data/misc/adb/adb_keys." 2013-10-03 22:13:06 +00:00
Alex Klyubin b2478a713a Expose /dev/hw_random to group "system".
This is needed to let EntropyMixer (runs inside system_server) read
from /dev/hw_random.

Change-Id: Ifde851004301ffd41b2189151a64a0c5989c630f
2013-10-03 13:32:36 -07:00
Colin Cross 41c9fd6480 am 0d3ac55d: am 230252d5: am 61afb07b: Merge "Trigger a policy reload from post-fs-data."
* commit '0d3ac55d0654fe4f6d37923782dcd41f0590c741':
  Trigger a policy reload from post-fs-data.
2013-10-01 20:59:43 -07:00
Colin Cross 0d3ac55d06 am 230252d5: am 61afb07b: Merge "Trigger a policy reload from post-fs-data."
* commit '230252d5cd70f5be4c24046c7a409e9498ac97f5':
  Trigger a policy reload from post-fs-data.
2013-10-01 18:53:51 -07:00
Colin Cross 230252d5cd am 61afb07b: Merge "Trigger a policy reload from post-fs-data."
* commit '61afb07b9b14233f76a969840f74ce1ced22bf58':
  Trigger a policy reload from post-fs-data.
2013-10-01 18:50:18 -07:00
Stephen Smalley deb41e5127 Set security context of /adb_keys and /data/misc/adb/adb_keys.
I97b3d86a69681330bba549491a2fb39df6cf20ef introduced a separate type
for the adb_keys file.  Set the security context of the adb_keys file
accordingly by adding restorecon commands to init.rc.

Change-Id: I30e4d2a1ae223a03eadee58a883c79932fff59fe
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-01 09:21:47 -04:00
Colin Cross 61afb07b9b Merge "Trigger a policy reload from post-fs-data." 2013-09-30 20:04:12 +00:00
Ken Sumrall 6314401946 am dfcbf02b: am 6b1a0272: Merge "Create a separate copy of the fsck logs" into klp-dev
* commit 'dfcbf02bb0a6705e3714a59e42e052fbb0ce8799':
  Create a separate copy of the fsck logs
2013-09-24 10:25:31 -07:00
Ken Sumrall dfcbf02bb0 am 6b1a0272: Merge "Create a separate copy of the fsck logs" into klp-dev
* commit '6b1a027239689a817aa5ca44a2bcbfe48ed21408':
  Create a separate copy of the fsck logs
2013-09-23 18:59:39 -07:00
Ken Sumrall 6b1a027239 Merge "Create a separate copy of the fsck logs" into klp-dev 2013-09-23 20:06:57 +00:00
Todd Poynor 4676550b56 init.rc: use oom_score_adj instead of oom_adj
Use kernel oom_score_adj interface to make init and children unkillable.

Stop using older, deprecated oom_adj interface.

Use OOM_SCORE_ADJ_MIN to make the processes unkillable (previously the processes
were set to a very low score, but not unkillable).

Change-Id: I680965009585c2a5a580859fb946f2d0caa95d9c
2013-09-23 18:32:36 +00:00
Ken Sumrall 4eaf905858 Create a separate copy of the fsck logs
The log_target parameter of android_fork_execvp_ext() is now a
bit field, and multiple targets can be set to log to multiple
places at the same time.

The new target LOG_FILE will log to a file specified by the new
parameter file_path.

Set LOG_FILE and log to a file in /dev (the only writable filesystem
avilable when e2fsck runs) when invoking e2fsck in fs_mgr.

Bug: 10021342

Change-Id: I63baf644cc8c3afccc8345df27a74203b44d0400
2013-09-20 17:44:33 -07:00
Jeff Sharkey aa4a3228f0 am 9729b415: am 44d6342c: Remove mkdir() side effect, add .nomedia, utils.
* commit '9729b41574ca5e5e87c86b203a2096cbdc72cfea':
  Remove mkdir() side effect, add .nomedia, utils.
2013-09-20 15:59:37 -07:00
Jeff Sharkey 9729b41574 am 44d6342c: Remove mkdir() side effect, add .nomedia, utils.
* commit '44d6342caa0db1f613809e9ba1ea8d9af0183b74':
  Remove mkdir() side effect, add .nomedia, utils.
2013-09-20 15:57:58 -07:00
Jeff Sharkey 44d6342caa Remove mkdir() side effect, add .nomedia, utils.
Before this change, FUSE lookup() would have the side effect of
creating the directory on behalf of apps.  This resulted in most
directories being created just by Settings trying to measure disk
space.  Instead, we're switching to have vold do directory creation
when an app doesn't have enough permissions.

Create fs_mkdirs() utility to create all parent directories in a
path as needed.  Allow traversal (+x) into /storage directories.

Fix FUSE derived permissions to be case insensitive.  Mark well-known
directories as .nomedia when created.

Bug: 10577808, 10330221
Change-Id: I53114f2e63ffbe6de4ba6a72d94a232523231cad
2013-09-20 14:21:09 -07:00
Nick Kralevich 5660da25b9 am 1998e505: am 2e940286: am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '1998e505a98ad445bead87c2bb047053f1aea648':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:54:12 -07:00
Nick Kralevich 1998e505a9 am 2e940286: am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '2e9402863b40fe8bf2ddd8169c62f2419d968ff9':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:51:49 -07:00
Nick Kralevich 2e9402863b am 0f507339: Merge "Do not change ownership of /sys/fs/selinux/load to system UID."
* commit '0f507339ec474a2f67227466efc9045630f1f1a4':
  Do not change ownership of /sys/fs/selinux/load to system UID.
2013-09-19 08:50:21 -07:00
Stephen Smalley cc13e8ab87 Do not change ownership of /sys/fs/selinux/load to system UID.
Policy reload is handled by setting the selinux.reload_policy property
and letting the init process perform the actual loading of policy into
the kernel.  Thus, there should be no need for the system UID to directly
write to /sys/fs/selinux/load.

Change-Id: I240c5bb2deaee757a2e1e396e14dea9e5d9286f5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-09-19 11:26:26 -04:00
Nick Kralevich 5d4be69093 am 0e7bd81c: am 4f18183b: Merge "Initialize /dev/urandom earlier in boot." into klp-dev
* commit '0e7bd81c938611cfa4ebf44870668300a5bba875':
  Initialize /dev/urandom earlier in boot.
2013-09-18 12:53:11 -07:00
Nick Kralevich 0e7bd81c93 am 4f18183b: Merge "Initialize /dev/urandom earlier in boot." into klp-dev
* commit '4f18183bd6d3d2ed5d698c176ecc239211bdb82e':
  Initialize /dev/urandom earlier in boot.
2013-09-18 12:50:32 -07:00
Nick Kralevich b410eb1913 Initialize /dev/urandom earlier in boot.
It's a security best practice to carry entropy across reboots.
(see "man 4 random"). Currently, entropy saving and mixing occur
in the system_server, via the EntropyMixer code. Unfortunately, the
EntropyMixer code runs fairly late in the boot process, which means
early boot doesn't have high quality entropy. This has caused security
problems in the past.

Load entropy data as soon as we can in the early boot process, so that
we can get /dev/random / /dev/urandom into a "random" state earlier.

Bug: 9983133
Change-Id: Id4a6f39e9060f30fe7497bd8f8085a9bec851e80
2013-09-18 07:53:51 -07:00
Todd Poynor 59e51e792a init.rc: no longer start healthd in charger mode
Being moved to healthd/charger mode in board-specific init.rc.

Change-Id: Ie9fc2e5abc1737fbffec8fb071c73f5fd96e4d17
2013-09-17 14:41:07 -07:00
Rom Lemarchand 8d0a92ddc5 am 342077e7: am 67b00d8b: init.rc: change mem cgroups permissions
* commit '342077e78da9411c252232313bc40fb4ce5f6137':
  init.rc: change mem cgroups permissions
2013-09-10 17:54:57 -07:00
Rom Lemarchand 342077e78d am 67b00d8b: init.rc: change mem cgroups permissions
* commit '67b00d8b2d96e8133c249bcbc0fb63c49e10e022':
  init.rc: change mem cgroups permissions
2013-09-10 17:51:44 -07:00
Rom Lemarchand 67b00d8b2d init.rc: change mem cgroups permissions
Changing mem cgroups permissions to only be accessible by root and system.

Bug: 10210529
Bug: 10210900
Change-Id: Ib4fff6f49b33013b3629d40ae98a5e2464571b2d
2013-09-10 17:41:21 -07:00
Todd Poynor aacded7019 init.rc: start lmkd
Change-Id: Ibebab31e1f41a210821834a1d65f196b39bb6601
2013-08-30 15:32:09 -07:00
Stephen Smalley 6552f6885f Trigger a policy reload from post-fs-data.
Once userdata is available and decrypted, trigger a policy reload to pick
up any policy update files stored under /data/security.

Change-Id: Ic2b3121c3395429b108c40d1d7f5a3124a5896c5
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-08-26 10:45:05 -04:00
Colin Cross a34f1391bd am 30caffc0: resolved conflicts for merge of a1af5cf6 to klp-dev-plus-aosp
* commit '30caffc025aff450ebb354ee693174cc1732732b':
  Handle policy reloads within ueventd rather than restarting it.
2013-08-23 14:42:21 -07:00
Colin Cross 30caffc025 resolved conflicts for merge of a1af5cf6 to klp-dev-plus-aosp
Change-Id: I08e9898940f7cdd466469b76760807cc5d5c67e4
2013-08-23 14:39:39 -07:00
Colin Cross a1af5cf6d1 am d8d99c45: Merge "Handle policy reloads within ueventd rather than restarting it."
* commit 'd8d99c45b704399d50ae0a5e4df938d825c70cfa':
  Handle policy reloads within ueventd rather than restarting it.
2013-08-23 14:33:46 -07:00
Jeff Brown 46a24db563 Remove input flinger stubs. (DO NOT MERGE)
Bug: 10446930
Change-Id: I88b926380dbe1e866c0b87ec95b3489d87c5907b
2013-08-22 18:38:35 -07:00
Todd Poynor 13f4c9fb27 healthd: normal and charger mode startup
Command line flag -n tells healthd not to use (or wait for) servicemanager
in charger mode.

Change-Id: I255f9597dff6fc904f5ed20fd02f52c0531d14f8
2013-07-26 23:56:17 +00:00
Colin Cross 5ba57f9a95 Merge "add property to adjust extra_free_kbytes kernel vm tunable" 2013-07-26 23:07:00 +00:00
Stephen Smalley e2eb69db6d Handle policy reloads within ueventd rather than restarting it.
Restarting ueventd upon policy reloads has reportedly created
stability problems for some users and could cause events to be lost.
Stop restarting ueventd and instead handle policy reloads within ueventd.

Also stops restarting installd upon policy reloads.

Change-Id: Ic7f310d69a7c420e48fbc974000cf4a5b9ab4a3b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-07-26 15:39:41 -04:00
Colin Cross 57fdb5cfd2 add property to adjust extra_free_kbytes kernel vm tunable
ActivityManager can't directly write to extra_free_kbytes because
/proc/sys rejects all chown and chmod syscalls.  Proxy the writes
through init by using the sys.sysctl.extra_free_kbytes property.

Bug: 10024467
Change-Id: I441e00478421254355fcafb252bc878166483d4c
2013-07-25 18:22:30 -07:00
Ying Wang 5748ee972d Generate init.environ.rc by populating BOOTCLASSPATH
- BOOTCLASSPATH now is derived from PRODUCT_BOOT_JARS, which is a product
  configuration variable set up by the core build system.
- Moved files from the legacy ALL_PREBUILT to PRODUCT_COPY_FILES in
  build/target/product/embedded.mk.

Bug: 9990214
Change-Id: I98bac36c1ca8c779dda572a0a5e0a22b7e4c4a7a
2013-07-24 12:11:47 -07:00
Robert Greenwalt f498ec8faf am dafa66af: am 2aa33a3d: Add writable data space for radio.
* commit 'dafa66afdd3729e2c65ccb8dced8ca3e137db437':
  Add writable data space for radio.
2013-07-19 16:02:06 -07:00