OSDN Git Service

android-x86/system-vold.git
10 years agoam 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
JP Abgrall [Wed, 12 Mar 2014 18:02:31 +0000 (18:02 +0000)]
am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""

* commit '470f0b3ff46493b4a46b3599db33a29e94615d30':
  Avoid segv by checking argc in "storage user <mountpoint>"

10 years agoMerge "Avoid segv by checking argc in "storage user <mountpoint>""
JP Abgrall [Wed, 12 Mar 2014 17:56:32 +0000 (17:56 +0000)]
Merge "Avoid segv by checking argc in "storage user <mountpoint>""

10 years agoAvoid segv by checking argc in "storage user <mountpoint>"
JP Abgrall [Wed, 12 Mar 2014 17:41:05 +0000 (10:41 -0700)]
Avoid segv by checking argc in "storage user <mountpoint>"

Change-Id: Iffd67746e2e273c4c3f87741e5f13aa511ccb557
Signed-off-by: JP Abgrall <jpa@google.com>
10 years agoresolved conflicts for merge of 83755972 to klp-modular-dev-plus-aosp
Nick Kralevich [Mon, 3 Mar 2014 21:12:46 +0000 (13:12 -0800)]
resolved conflicts for merge of 83755972 to klp-modular-dev-plus-aosp

Change-Id: I4bf4dd29a65f82f91738526b80d5b579c26f8bfe

10 years agoAdd SELinux restorecon calls on ASEC containers.
Robert Craig [Tue, 4 Feb 2014 15:53:00 +0000 (10:53 -0500)]
Add SELinux restorecon calls on ASEC containers.

This will allow fine-grained labeling of the
contents of ASEC containers. Some of the contents
need to be world readable and thus should be
distinguishable in policy.

Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
(cherry picked from commit b9e3ba56cb4075f894a73b02ee70571456494ac1)

Change-Id: I4614af139991aa086ac14a06c70fe425888a16a1

10 years agoam 3c0d02aa: Merge "Convert all selinux_android_restorecon and _setfilecon calls...
Nick Kralevich [Wed, 12 Feb 2014 23:19:02 +0000 (23:19 +0000)]
am 3c0d02aa: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '3c0d02aa03118713e6e770b54d1c530ff866f156':
  Convert all selinux_android_restorecon and _setfilecon calls to new API.

10 years agoam 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
Mark Salyzyn [Wed, 12 Feb 2014 23:10:33 +0000 (23:10 +0000)]
am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"

* commit '1dc1fb4adc71ea9cf26a5033513bd3a1474f79a1':
  vold: suppress unused argument warning messages

10 years agoMerge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
Nick Kralevich [Wed, 12 Feb 2014 23:09:58 +0000 (23:09 +0000)]
Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

10 years agoMerge "vold: suppress unused argument warning messages"
Mark Salyzyn [Wed, 12 Feb 2014 23:03:22 +0000 (23:03 +0000)]
Merge "vold: suppress unused argument warning messages"

10 years agovold: suppress unused argument warning messages
Mark Salyzyn [Wed, 12 Feb 2014 22:16:14 +0000 (14:16 -0800)]
vold: suppress unused argument warning messages

(cherry picked from commit 3e971277db0d87652af5622c989233e7159ab909)

Change-Id: Ic1ab533f756fbd44b1f2e5ae12e2f5736ace7740

10 years agoConvert all selinux_android_restorecon and _setfilecon calls to new API.
Stephen Smalley [Wed, 12 Feb 2014 14:43:08 +0000 (09:43 -0500)]
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoam 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
Nick Kralevich [Tue, 11 Feb 2014 17:20:39 +0000 (17:20 +0000)]
am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."

* commit '311edc8cb2dd5c86bad49f9696333874b400f9c4':
  Add SELinux restorecon calls on ASEC containers.

10 years agoMerge "Add SELinux restorecon calls on ASEC containers."
Nick Kralevich [Tue, 11 Feb 2014 17:13:46 +0000 (17:13 +0000)]
Merge "Add SELinux restorecon calls on ASEC containers."

10 years agoam 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
Colin Cross [Fri, 7 Feb 2014 21:31:53 +0000 (21:31 +0000)]
am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"

* commit '1d8e3ce8da962e5ff98d36e75f6b02873fdddb70':
  vold: fix errors inside ALOGV

10 years agoMerge "vold: fix errors inside ALOGV"
Colin Cross [Fri, 7 Feb 2014 21:27:34 +0000 (21:27 +0000)]
Merge "vold: fix errors inside ALOGV"

10 years agovold: fix errors inside ALOGV
Colin Cross [Fri, 7 Feb 2014 04:34:29 +0000 (20:34 -0800)]
vold: fix errors inside ALOGV

Fix errors exposed by adding compile-time checking to disabled ALOGVs.

Change-Id: I29bd6e9a7648ccca02e0e9a96b79ee0ea7b5cfc6

10 years agoAdd SELinux restorecon calls on ASEC containers.
Robert Craig [Tue, 4 Feb 2014 15:53:00 +0000 (10:53 -0500)]
Add SELinux restorecon calls on ASEC containers.

This will allow fine-grained labeling of the
contents of ASEC containers. Some of the contents
need to be world readable and thus should be
distinguishable in policy.

Change-Id: Iefee74214d664acd262edecbb4f981d633ff96ce
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoam 4d5d99ce: am 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am...
Nick Kralevich [Tue, 28 Jan 2014 14:11:06 +0000 (14:11 +0000)]
am 4d5d99ce: am 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '4d5d99ce39b5edd0b78c47a93563aed6b3d56356':
  Validate asec names.

10 years agoam 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am...
Nick Kralevich [Tue, 28 Jan 2014 14:06:00 +0000 (14:06 +0000)]
am 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '7cf05b15b76b91aa07182e86a730d7552b23130c':
  Validate asec names.

10 years agoam 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am...
Nick Kralevich [Tue, 28 Jan 2014 03:32:29 +0000 (19:32 -0800)]
am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '2f0a1d66585fb44f59d913d3417422486ef10225':
  Validate asec names.

10 years agoam 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validat...
Nick Kralevich [Tue, 28 Jan 2014 03:27:11 +0000 (19:27 -0800)]
am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '7f6932df89756f796c3a1f04f748db39a0564561':
  Validate asec names.

10 years agoam 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
Nick Kralevich [Tue, 28 Jan 2014 03:25:27 +0000 (19:25 -0800)]
am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '35ab611925aea29fc4088b5c3de7c8c77d956b8b':
  Validate asec names.

10 years agoam 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
Nick Kralevich [Tue, 28 Jan 2014 03:21:00 +0000 (19:21 -0800)]
am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit '3e03bf8a7ab9dcee8897f275c75adfcdb20e0fdc':
  Validate asec names.

10 years agoam fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
Nick Kralevich [Tue, 28 Jan 2014 03:19:25 +0000 (19:19 -0800)]
am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.

* commit 'fd2dcf905abd3dc76738fd864e3979bd6e5ce183':
  Validate asec names.

10 years agoam f4770dcf: am 0de7c611: Validate asec names.
Nick Kralevich [Tue, 28 Jan 2014 03:17:13 +0000 (19:17 -0800)]
am f4770dcf: am 0de7c611: Validate asec names.

* commit 'f4770dcf6ffe2baba16cbb290aba16f735c51962':
  Validate asec names.

10 years agoam 0de7c611: Validate asec names.
Nick Kralevich [Tue, 28 Jan 2014 03:14:34 +0000 (19:14 -0800)]
am 0de7c611: Validate asec names.

* commit '0de7c61102611ccd5df1ca48cb733bf037512c6b':
  Validate asec names.

10 years agoValidate asec names.
Nick Kralevich [Mon, 27 Jan 2014 22:58:06 +0000 (14:58 -0800)]
Validate asec names.

Make sure asec names only contain alphanumeric, underscores,
dots, or dashes. Don't allow double dots.

Bug: 12504045

(cherry picked from commit 669626096513cf741646cf18a9e8ba246d359596)

Change-Id: Ia9d04f373aa95878b2e81584c4167dc2d4aa0c78

10 years agoMerge "vold: fix warnings for 64-bit"
Colin Cross [Fri, 24 Jan 2014 20:28:19 +0000 (20:28 +0000)]
Merge "vold: fix warnings for 64-bit"

10 years agovold: fix warnings for 64-bit
Colin Cross [Thu, 23 Jan 2014 07:59:41 +0000 (23:59 -0800)]
vold: fix warnings for 64-bit

Replace MINOR(dev_t) and MAJOR(dev_t) with minor and major,
which cast to int.
Cast int to uintptr_t before casting to pointer

Change-Id: I59375518f15d27f400fcd4f8a8dfe5ebdd8350e6

10 years agoMerge "vold: remove $(KERNEL_HEADERS) from include path"
Colin Cross [Thu, 23 Jan 2014 23:02:07 +0000 (23:02 +0000)]
Merge "vold: remove $(KERNEL_HEADERS) from include path"

10 years agovold: remove $(KERNEL_HEADERS) from include path
Colin Cross [Thu, 23 Jan 2014 07:59:16 +0000 (23:59 -0800)]
vold: remove $(KERNEL_HEADERS) from include path

The kernel headers are already in the include path, and manually
adding them again will break on a multiarch build, where the
kernel headers may be different for each arch.

Change-Id: Ifb11fa7bdff6b317c44258968244313b7039a9e1

10 years agoam 7bdfa52d: vold: cryptfs: Don\'t update KDF without validating pwd/key.
JP Abgrall [Fri, 15 Nov 2013 22:21:32 +0000 (14:21 -0800)]
am 7bdfa52d: vold: cryptfs: Don\'t update KDF without validating pwd/key.

* commit '7bdfa52d934465e2182e2f1c200c4d8581ad5da6':
  vold: cryptfs: Don't update KDF without validating pwd/key.

10 years agovold: cryptfs: Don't update KDF without validating pwd/key.
JP Abgrall [Fri, 15 Nov 2013 21:42:56 +0000 (13:42 -0800)]
vold: cryptfs: Don't update KDF without validating pwd/key.

Prior to this, the Key derivation function would get
 blindly updated even if the user entered the wrong password.
Now, we only attempt to upgrade the KDF if the pwd/key have
been verified (i.e. after a successful mount).

Bug: 11460197
Change-Id: I0469228cc9b87c47754e8ca3c7146651da177da5

10 years agoam 6bcd362e: Handle missing UUID/LABEL from blkid.
Jeff Sharkey [Mon, 11 Nov 2013 23:29:25 +0000 (15:29 -0800)]
am 6bcd362e: Handle missing UUID/LABEL from blkid.

* commit '6bcd362edd1f0ad97807276ff7f9f16991df99a4':
  Handle missing UUID/LABEL from blkid.

10 years agoHandle missing UUID/LABEL from blkid.
Jeff Sharkey [Mon, 11 Nov 2013 22:46:39 +0000 (14:46 -0800)]
Handle missing UUID/LABEL from blkid.

Bug: 11627785
Change-Id: Iee757abbc3795234f41d513a6aed8ad33855cb7a

10 years agoam cc21d6ea: Use correct minor device number to format SD card
Blair Prescott [Fri, 25 Oct 2013 22:06:12 +0000 (15:06 -0700)]
am cc21d6ea: Use correct minor device number to format SD card

* commit 'cc21d6ea5881a9f576296317bde8d818b3e4fc01':
  Use correct minor device number to format SD card

10 years agoUse correct minor device number to format SD card
Blair Prescott [Mon, 21 Oct 2013 22:25:37 +0000 (15:25 -0700)]
Use correct minor device number to format SD card

When formatting SD card partitions, instead of assuming partition
minor device numbers start from 1, use (minor device number of
the disk device + 1) as the starting point.

Bug: 11352632
Change-Id: I69d37f57aec6b62fe2a055470f7525ec09dc3859
Signed-off-by: Blair Prescott <blairp@broadcom.com>
Signed-off-by: Pierre <pierre@broadcom.com>
10 years agoam bcdbd9ac: Merge "Clean up ASEC unmounting on physical storage." into klp-dev
Jeff Sharkey [Fri, 18 Oct 2013 01:53:27 +0000 (18:53 -0700)]
am bcdbd9ac: Merge "Clean up ASEC unmounting on physical storage." into klp-dev

* commit 'bcdbd9ac0657a27ff9f7772e74c45ec1e2d460c7':
  Clean up ASEC unmounting on physical storage.

10 years agoam 10939ac7: Merge "Extract UUID and label from inserted volumes." into klp-dev
Jeff Sharkey [Fri, 18 Oct 2013 01:53:26 +0000 (18:53 -0700)]
am 10939ac7: Merge "Extract UUID and label from inserted volumes." into klp-dev

* commit '10939ac7e8c9fd141f45f1d6d82c78d5f5f5319c':
  Extract UUID and label from inserted volumes.

10 years agoMerge "Clean up ASEC unmounting on physical storage." into klp-dev
Jeff Sharkey [Fri, 18 Oct 2013 01:46:43 +0000 (01:46 +0000)]
Merge "Clean up ASEC unmounting on physical storage." into klp-dev

10 years agoMerge "Extract UUID and label from inserted volumes." into klp-dev
Jeff Sharkey [Fri, 18 Oct 2013 01:45:47 +0000 (01:45 +0000)]
Merge "Extract UUID and label from inserted volumes." into klp-dev

10 years agoClean up ASEC unmounting on physical storage.
Jeff Sharkey [Thu, 17 Oct 2013 22:17:19 +0000 (15:17 -0700)]
Clean up ASEC unmounting on physical storage.

When physical devices are unsafely removed, unmountAllAsecsInDir()
fails to find any ASECs, and leaves them all mounted, preventing the
rest of volume from going down.

Now we examine all ASEC containers, and remove when on external
storage, or when the storage media is no longer found.

Bug: 11175082
Change-Id: Iffa38ea43f7e5ad78b598374ebeb60a8727d99fd

10 years agoExtract UUID and label from inserted volumes.
Jeff Sharkey [Wed, 16 Oct 2013 23:24:19 +0000 (16:24 -0700)]
Extract UUID and label from inserted volumes.

Uses "blkid" tool to extract metadata from an inserted volume, and
reports it up to the framework.  This needs to happen in vold, since
only the FUSE-wrapped volume is visible to userspace.

Remove autorun sanitization, since FUSE takes care of this now.

Bug: 11175082
Change-Id: Ie69b38011ad6011bfb50e40d4f35a29e02150c19

10 years agoam 18afaca1: Merge "DO NOT MERGE. Fix crash in vold" into klp-dev
Jeff Sharkey [Thu, 17 Oct 2013 16:18:31 +0000 (09:18 -0700)]
am 18afaca1: Merge "DO NOT MERGE. Fix crash in vold" into klp-dev

* commit '18afaca1ad6f480ab6ac259278c8c8013aaab45a':
  DO NOT MERGE. Fix crash in vold

10 years agoMerge "DO NOT MERGE. Fix crash in vold" into klp-dev
Jeff Sharkey [Thu, 17 Oct 2013 16:12:38 +0000 (16:12 +0000)]
Merge "DO NOT MERGE. Fix crash in vold" into klp-dev

10 years agoam 4d9c9bd5: merge in klp-release (no-op)
Ed Heyl [Thu, 17 Oct 2013 01:07:28 +0000 (18:07 -0700)]
am 4d9c9bd5: merge in klp-release (no-op)

* commit '4d9c9bd5cc5f81954b1e9724d125b8947b412b04':

10 years agomerge in klp-release (no-op)
Ed Heyl [Thu, 17 Oct 2013 00:48:33 +0000 (17:48 -0700)]
merge in klp-release (no-op)

10 years agoDO NOT MERGE. Fix crash in vold
Marco Nelissen [Tue, 15 Oct 2013 22:22:28 +0000 (15:22 -0700)]
DO NOT MERGE. Fix crash in vold

b/11239345

Change-Id: I46a8d6b38e3c093e20e1e5c4f01efc13d1960ad4

10 years agoam 98d05700: Merge "Remove unused MAX_PARTS define"
Kenny Root [Thu, 10 Oct 2013 17:36:33 +0000 (10:36 -0700)]
am 98d05700: Merge "Remove unused MAX_PARTS define"

* commit '98d05700d6055532e6e37675e21b83b3c97b7c6e':
  Remove unused MAX_PARTS define

10 years agoMerge "Remove unused MAX_PARTS define"
Kenny Root [Thu, 10 Oct 2013 15:51:11 +0000 (15:51 +0000)]
Merge "Remove unused MAX_PARTS define"

10 years agomerge in klp-release history after reset to klp-dev
The Android Automerger [Wed, 9 Oct 2013 13:02:14 +0000 (06:02 -0700)]
merge in klp-release history after reset to klp-dev

10 years agomerge in KQS81M
Ed Heyl [Tue, 8 Oct 2013 22:45:14 +0000 (15:45 -0700)]
merge in KQS81M

10 years agoAdd support for more expressive SD card permissions
Jeff Sharkey [Tue, 16 Jul 2013 01:14:25 +0000 (18:14 -0700)]
Add support for more expressive SD card permissions

We now run an sdcard fuse daemon on top of a physical SD card.
Add support for that.

Bug: 10330128

Change-Id: I6a291f861ccb0f2911c07cc8f659e2cec4e6d76c

10 years agoRemove unused MAX_PARTS define
Bjorn Andersson [Thu, 27 Jun 2013 15:39:39 +0000 (17:39 +0200)]
Remove unused MAX_PARTS define

The MAX_PARTS define is not used anywhere in the source code and as
the MAX_PARTITIONS constant was introduced at the same time and used
to hold the same value it's most likely just a remainder from the
development of the partition support code.

Change-Id: I2ae8a062c5643839429f4e3e30a9af05597ce499

10 years agomerge in klp-release history after reset to klp-dev
The Android Automerger [Sun, 22 Sep 2013 17:52:01 +0000 (10:52 -0700)]
merge in klp-release history after reset to klp-dev

10 years agoAdd mkdirs() command.
Jeff Sharkey [Wed, 18 Sep 2013 00:24:38 +0000 (17:24 -0700)]
Add mkdirs() command.

Apps without sdcard_r or sdcard_rw need to have someone create
package-specific directories on their behalf.  If apps have trouble
creating on their own, they now delegate through system to have
vold create the paths.

Requires that the requested path is actually managed by vold.

Bug: 10577808
Change-Id: I6835fc8f52240f9de07f89742a426a153e3ca32a

10 years agoUse android_fork_execvp() instead of system(3) to format filesystems
Ken Sumrall [Tue, 20 Aug 2013 20:48:23 +0000 (13:48 -0700)]
Use android_fork_execvp() instead of system(3) to format filesystems

With the recent selinux changes imposed on vold, it no longer has
permission to run a shell, so invoking the filesystem formatting
commands with system(3) gives an error.  So change to using
android_fork_execvp().

Bug: 10279958

Change-Id: Ifa18b28867618858ec7c5cfcc67935e377de38fb

10 years agoUse android_fork_execvp() instead of system(3) to format filesystems
Ken Sumrall [Tue, 20 Aug 2013 20:48:23 +0000 (13:48 -0700)]
Use android_fork_execvp() instead of system(3) to format filesystems

With the recent selinux changes imposed on vold, it no longer has
permission to run a shell, so invoking the filesystem formatting
commands with system(3) gives an error.  So change to using
android_fork_execvp().

Bug: 10279958

Change-Id: Ifa18b28867618858ec7c5cfcc67935e377de38fb

10 years agoMerge "Use a shared library when building vold" into klp-dev
Ken Sumrall [Thu, 15 Aug 2013 21:47:18 +0000 (21:47 +0000)]
Merge "Use a shared library when building vold" into klp-dev

10 years agoUse a shared library when building vold
Ken Sumrall [Thu, 15 Aug 2013 03:15:17 +0000 (20:15 -0700)]
Use a shared library when building vold

A quick fix to a broken build resulted in using a static library
to build vold when a shared library was available.  This fixes
that.

Bug: 10332978
Change-Id: I31c2b4a87c7b37647e71f7f3c93b0d64dd52da44

10 years agoInitialize iterator
Kenny Root [Wed, 14 Aug 2013 22:54:49 +0000 (15:54 -0700)]
Initialize iterator

Iterator wasn't initialized in scrypt parameter scanning.

Bug: 10330227
Change-Id: If41fc25d9f827106fa8329bdb5966b7d786fddcb

10 years agoAdd libext4 and libmincrypt to vold.
Geremy Condra [Wed, 7 Aug 2013 20:12:41 +0000 (13:12 -0700)]
Add libext4 and libmincrypt to vold.

This accomodates verity changes, which now utilize these libraries.

Change-Id: I1ff8c012e972e245cf3e4bc3a02bef0989165d75

11 years agoam 5d09126a: am f99dfdb5: Merge "vold: fix potential socket leak"
Jean-Baptiste Queru [Tue, 2 Jul 2013 19:41:36 +0000 (12:41 -0700)]
am 5d09126a: am f99dfdb5: Merge "vold: fix potential socket leak"

* commit '5d09126ad1cd10c74e676fb158f1d057a37180b2':
  vold: fix potential socket leak

11 years agoam 0002a85f: am 5d27f0a7: Merge "Fix spelling."
Nick Kralevich [Tue, 2 Jul 2013 19:41:36 +0000 (12:41 -0700)]
am 0002a85f: am 5d27f0a7: Merge "Fix spelling."

* commit '0002a85f8b94d96b9b86819bd33fdfd7cfe74080':
  Fix spelling.

11 years agoam f99dfdb5: Merge "vold: fix potential socket leak"
Jean-Baptiste Queru [Tue, 2 Jul 2013 19:34:35 +0000 (12:34 -0700)]
am f99dfdb5: Merge "vold: fix potential socket leak"

* commit 'f99dfdb5044ed6b120a8f2a86ddf2dd92a5bb9a2':
  vold: fix potential socket leak

11 years agoam 5d27f0a7: Merge "Fix spelling."
Nick Kralevich [Tue, 2 Jul 2013 19:34:34 +0000 (12:34 -0700)]
am 5d27f0a7: Merge "Fix spelling."

* commit '5d27f0a71412fb1e6bba400da6066ad7c5ba8b72':
  Fix spelling.

11 years agoMerge "vold: fix potential socket leak"
Jean-Baptiste Queru [Tue, 2 Jul 2013 19:13:03 +0000 (19:13 +0000)]
Merge "vold: fix potential socket leak"

11 years agovold: fix potential socket leak
Kaspter Ju [Sat, 14 Apr 2012 02:48:45 +0000 (10:48 +0800)]
vold: fix potential socket leak

Change-Id: Icdb4500fc1e055b058974087e1e518c878dc6b22
Signed-off-by: Kaspter Ju <kaspter@gmail.com>
11 years agoMerge "Fix spelling."
Nick Kralevich [Tue, 2 Jul 2013 16:05:21 +0000 (16:05 +0000)]
Merge "Fix spelling."

11 years agoFix spelling.
Nick Kralevich [Sat, 29 Jun 2013 02:08:35 +0000 (19:08 -0700)]
Fix spelling.

Change-Id: I81debc5063716d7cbea060a0abb34c646d7cda93

11 years agoMerge "vold: Use the new method of rebooting by asking init to do it"
Ken Sumrall [Fri, 28 Jun 2013 02:47:45 +0000 (02:47 +0000)]
Merge "vold: Use the new method of rebooting by asking init to do it"

11 years agovold: Use the new method of rebooting by asking init to do it
Ken Sumrall [Tue, 4 Jun 2013 23:37:52 +0000 (16:37 -0700)]
vold: Use the new method of rebooting by asking init to do it

Change-Id: I7fd5f1048c3cf43fa14597f079c929690cac367c

11 years agoChange key derivation to scrypt
Kenny Root [Fri, 14 Jun 2013 19:11:38 +0000 (12:11 -0700)]
Change key derivation to scrypt

scrypt is a sequential memory-hard key derivation algorithm that makes
it more difficult for adversaries to brute force passwords using
specialized equipment. See http://www.tarsnap.com/scrypt/scrypt.pdf for
more details of the algorithm.

This adds support for initializing disk encryption using scrypt and
upgrading from the previous PBKDF2 algorithm.

Change-Id: I1d26db4eb9d27fea7310be3e49c8e6219e6d2c3b

11 years agoExtract some version constants to header
Kenny Root [Fri, 14 Jun 2013 19:08:28 +0000 (12:08 -0700)]
Extract some version constants to header

In order to make it easier to upgrade the crypto footer, extract some
constants to a header file instead. Then the header can control what the
current version is and the upgrade_crypto_ftr code should be the only
thing that needs to be updated.

Change-Id: I3ed5a7d3b640419cd8af91388d94a00de8cc09db

11 years agoChange upgrade code to allow multiple versions
Kenny Root [Fri, 14 Jun 2013 18:29:53 +0000 (11:29 -0700)]
Change upgrade code to allow multiple versions

In the future, we'd like to have the ability to upgrade from any
supported version to any future version. Change the upgrade function
slightly to support this.

Change-Id: I3b20ccfff51c4c86f1e5e08690c263dc95ff5ce4

11 years agovold: Add an optional wipe paramter to the volume format command
Ken Sumrall [Wed, 12 Jun 2013 02:10:20 +0000 (19:10 -0700)]
vold: Add an optional wipe paramter to the volume format command

The new wipe option to the vold format command will invoke BLKDISCARD
on the partition before invoking newfs_msdos.  This will be used whenever
a full wipe of the device is wanted, as this is more secure than just
doing newfs_msdos.

Bug: 9392982
Change-Id: Ie106f1b9cc70abc61206006d1821641c27c7ccae

11 years agoam 9420c0b3: (-s ours) Reconcile with jb-mr2-release - do not merge
The Android Open Source Project [Thu, 16 May 2013 12:48:24 +0000 (05:48 -0700)]
am 9420c0b3: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit '9420c0b338106eed246b362238b063ecdab3a710':
  Grab a partial wakelock when doing fstrim

11 years agoReconcile with jb-mr2-release - do not merge
The Android Open Source Project [Thu, 16 May 2013 12:44:19 +0000 (05:44 -0700)]
Reconcile with jb-mr2-release - do not merge

Change-Id: I58dee084939bd1b49432bfb4e460dddeb4f6e15a

11 years agomerge in jb-mr2-release history after reset to jb-mr2-dev
The Android Automerger [Wed, 15 May 2013 12:55:51 +0000 (05:55 -0700)]
merge in jb-mr2-release history after reset to jb-mr2-dev

11 years agoam c587269c: vold: Increase timeout due to selinux changes
Ken Sumrall [Wed, 15 May 2013 02:19:22 +0000 (19:19 -0700)]
am c587269c: vold: Increase timeout due to selinux changes

* commit 'c587269c5a34d4e7412ff42e53ed6312359a8505':
  vold: Increase timeout due to selinux changes

11 years agovold: Increase timeout due to selinux changes
Ken Sumrall [Tue, 14 May 2013 22:26:31 +0000 (15:26 -0700)]
vold: Increase timeout due to selinux changes

The new selinux_reload_policy command can take a while to complete on
some systems.  The reason is being investigated, and hopefully a fix can
be found to improve performance, but for now, increase the timeout that
vold waits for the post_fs_data section to complete when decrypting a
device on boot.

Also, emit a decent error message if the device times out.

Bug: 8967715
Change-Id: Ifb01c983dffe095a9de752c17c467a1751e9ce99

11 years agoFix a typo in a comment
Alex Klyubin [Fri, 10 May 2013 22:17:07 +0000 (15:17 -0700)]
Fix a typo in a comment

Change-Id: Ibb9667d762189849ebcbefef4ba70ffd34cf885e

11 years agoam bc7d5088: vold: Have the fstrim log start and finish times in the event log
Ken Sumrall [Wed, 8 May 2013 22:03:52 +0000 (15:03 -0700)]
am bc7d5088: vold: Have the fstrim log start and finish times in the event log

* commit 'bc7d5088f7f7cbd097f99d2f6d015e2c0a73cacb':
  vold: Have the fstrim log start and finish times in the event log

11 years agomerge in jb-mr2-release history after reset to jb-mr2-dev
The Android Automerger [Wed, 8 May 2013 12:55:57 +0000 (05:55 -0700)]
merge in jb-mr2-release history after reset to jb-mr2-dev

11 years agovold: Have the fstrim log start and finish times in the event log
Ken Sumrall [Wed, 8 May 2013 00:28:21 +0000 (17:28 -0700)]
vold: Have the fstrim log start and finish times in the event log

bug: 8688454

Change-Id: I5540ab27d3ade2c42ee8fd0de6fbfc1d1e19e36f

11 years agoGrab a partial wakelock when doing fstrim
Ken Sumrall [Thu, 2 May 2013 06:34:57 +0000 (23:34 -0700)]
Grab a partial wakelock when doing fstrim

Fstrim can take a while, so grab a wakelock so it finishes now,
not when the user picks up the device and wakes it back up.

This change does not protect against multiple calls to fstrim
before the first one completes.  When the first one completes, it
will release the wakelock, and the device will go to sleep.
However, normal usage is this will not be invoked by the framework
more than once a day, so this should not be an issue.

Bug: 8781133

Change-Id: I8065d1380eaf52ca8a7ca308af66fb6e86d60a66

11 years agoam e78cd4f3: Grab a partial wakelock when doing fstrim
Ken Sumrall [Thu, 2 May 2013 18:36:02 +0000 (11:36 -0700)]
am e78cd4f3: Grab a partial wakelock when doing fstrim

* commit 'e78cd4f33d2b7969f1baca2b274740e1b53b3121':
  Grab a partial wakelock when doing fstrim

11 years agoGrab a partial wakelock when doing fstrim
Ken Sumrall [Thu, 2 May 2013 06:34:57 +0000 (23:34 -0700)]
Grab a partial wakelock when doing fstrim

Fstrim can take a while, so grab a wakelock so it finishes now,
not when the user picks up the device and wakes it back up.

This change does not protect against multiple calls to fstrim
before the first one completes.  When the first one completes, it
will release the wakelock, and the device will go to sleep.
However, normal usage is this will not be invoked by the framework
more than once a day, so this should not be an issue.

Bug: 8781133

Change-Id: I8065d1380eaf52ca8a7ca308af66fb6e86d60a66

11 years agovold: Do not print fstrim amount if ioctl returns an error
Ken Sumrall [Tue, 30 Apr 2013 02:17:56 +0000 (19:17 -0700)]
vold: Do not print fstrim amount if ioctl returns an error

Change-Id: I8620ea67a774ead51bd6bd9b6e737bf3d634470b

11 years agovold: Add support for unencrypted persistent info
Ken Sumrall [Mon, 22 Apr 2013 19:15:39 +0000 (12:15 -0700)]
vold: Add support for unencrypted persistent info

In order to display the correct language, timezone, airplane
mode and other settings on the decrypt screen, a copy of those
settings needs to be stored unencrypted so the framework can
query them.  This adds support to vold to store up to 32
property like key/value pairs that are not encrypted.

Change-Id: Id5c936d2c57d46ed5cff9325d92ba1e8d2ec8972

11 years agoam 743a5ec9: vold: Perform fstrim work in a separate thread.
Ken Sumrall [Tue, 23 Apr 2013 22:02:09 +0000 (15:02 -0700)]
am 743a5ec9: vold: Perform fstrim work in a separate thread.

* commit '743a5ec96cd54bdc06234be15cdde65296357a6a':
  vold: Perform fstrim work in a separate thread.

11 years agovold: Perform fstrim work in a separate thread.
Ken Sumrall [Tue, 23 Apr 2013 01:43:28 +0000 (18:43 -0700)]
vold: Perform fstrim work in a separate thread.

Some devices can take up to a few minutes to do fstrim.  If done
in the same thread as the rest of the vold command listener, then
vold is blocked from responding to any other commands until the
trim is done.  So create a thread to do the work, and return
immediately.

bug: 8688454

Change-Id: I780baae03ba7de2d3e805c3e9f103ec03be84c47

11 years agoam b55025bf: Merge "vold: set klog level so e2fsck output is logged" into jb-mr2-dev
Ken Sumrall [Mon, 15 Apr 2013 17:42:11 +0000 (10:42 -0700)]
am b55025bf: Merge "vold: set klog level so e2fsck output is logged" into jb-mr2-dev

* commit 'b55025bfa1039c8fa205727b49fe4a8dd1df7725':
  vold: set klog level so e2fsck output is logged

11 years agoMerge "vold: set klog level so e2fsck output is logged" into jb-mr2-dev
Ken Sumrall [Mon, 15 Apr 2013 17:34:25 +0000 (17:34 +0000)]
Merge "vold: set klog level so e2fsck output is logged" into jb-mr2-dev

11 years agovold: set klog level so e2fsck output is logged
Ken Sumrall [Wed, 20 Mar 2013 02:42:30 +0000 (19:42 -0700)]
vold: set klog level so e2fsck output is logged

When mounting an encrypted filesystem vold calls fs_mgr, which
will call e2fsck on the fielsystem if it's configured to, and
fs_mgr will attempt to log the output the kernel log. However,
if won't log anything unless the klog level is set to 6, aka INFO.

Change-Id: I8ac34941330262ea3414681b872fbbeb75391461

11 years agoam 741a1699: Add liblog
Ying Wang [Wed, 10 Apr 2013 05:17:32 +0000 (22:17 -0700)]
am 741a1699: Add liblog

* commit '741a1699b15c628e36e5c26457bd703b11f1e515':
  Add liblog

11 years agoAdd liblog
Ying Wang [Wed, 10 Apr 2013 05:05:28 +0000 (22:05 -0700)]
Add liblog

Bug: 8580410
Change-Id: I1a59b45c87cd901b3de52540ad7b670c42ffcbd5

11 years agoam c5771b5a: Merge "Vold: Add the fstrim subsystem to vold" into jb-mr2-dev
Ken Sumrall [Wed, 27 Mar 2013 21:18:38 +0000 (14:18 -0700)]
am c5771b5a: Merge "Vold: Add the fstrim subsystem to vold" into jb-mr2-dev

* commit 'c5771b5a4d66a0c7ca0e2cb1056e670f38b3834f':
  Vold: Add the fstrim subsystem to vold

11 years agoMerge "Vold: Add the fstrim subsystem to vold" into jb-mr2-dev
Ken Sumrall [Wed, 27 Mar 2013 21:15:55 +0000 (21:15 +0000)]
Merge "Vold: Add the fstrim subsystem to vold" into jb-mr2-dev

11 years agoVold: Add the fstrim subsystem to vold
Ken Sumrall [Wed, 20 Mar 2013 04:46:39 +0000 (21:46 -0700)]
Vold: Add the fstrim subsystem to vold

The fstrim subsystem implements the dotrim command, which goes
through all the writable filesystems on the device, and invokes
the FITRIM ioctl() on them.  This marks all the unused blocks on
the underlying flash device as unused, so the device performs better.

Change-Id: I5fc8c2f60e0bc823f162d0f89580fb288ecb2160