Commit graph

766 commits

Author SHA1 Message Date
Mohamad Ayyash
7929aa73d0 vold: Add a new mountall command.
This enables running "vdc mountall" in filesystem recovery tests where a partition is first unmounted then corrupted, and then finally verified that it's properly recovered and remounted successfully (i.e. running e2fsck..etc.).

Change-Id: I9385180afaef70f9cc6b2920d2a3c6ff13203b4e
2014-03-12 13:02:52 -07:00
JP Abgrall
a29997ae26 am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
* commit '470f0b3ff46493b4a46b3599db33a29e94615d30':
  Avoid segv by checking argc in "storage user <mountpoint>"
2014-03-12 18:02:31 +00:00
JP Abgrall
470f0b3ff4 Merge "Avoid segv by checking argc in "storage user <mountpoint>"" 2014-03-12 17:56:32 +00:00
JP Abgrall
edf7adf21e Avoid segv by checking argc in "storage user <mountpoint>"
Change-Id: Iffd67746e2e273c4c3f87741e5f13aa511ccb557
Signed-off-by: JP Abgrall <jpa@google.com>
2014-03-12 10:41:05 -07:00
Nick Kralevich
15c3e01e05 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.
2014-03-07 02:29:39 +00:00
Mark Salyzyn
3d9b98cc83 am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
* commit '1dc1fb4adc71ea9cf26a5033513bd3a1474f79a1':
  vold: suppress unused argument warning messages
2014-03-07 02:29:27 +00:00
Nick Kralevich
9aace96cd0 am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
* commit '311edc8cb2dd5c86bad49f9696333874b400f9c4':
  Add SELinux restorecon calls on ASEC containers.
2014-03-07 02:26:58 +00:00
Colin Cross
4c20805a33 am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
* commit '1d8e3ce8da962e5ff98d36e75f6b02873fdddb70':
  vold: fix errors inside ALOGV
2014-03-07 02:25:15 +00:00
Nick Kralevich
1d87676b82 am 706efb22: resolved conflicts for merge of 83755972 to klp-modular-dev-plus-aosp
* commit '706efb2254b68a6cd2441b519dd8445ca3df362d':
  Add SELinux restorecon calls on ASEC containers.
2014-03-03 21:21:35 +00:00
Nick Kralevich
706efb2254 resolved conflicts for merge of 83755972 to klp-modular-dev-plus-aosp
Change-Id: I4bf4dd29a65f82f91738526b80d5b579c26f8bfe
2014-03-03 13:14:41 -08:00
Robert Craig
837559720b 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 b9e3ba56cb)

Change-Id: I4614af139991aa086ac14a06c70fe425888a16a1
2014-03-03 11:22:59 -08:00
Paul Lawrence
684dbdf316 Infrastructure to securely allow only one prompt at boot when encrypted
Add a call to vold that says if we decrypted the data partition. Reset the
flag so that it only returns true the first time.

Bug: 12990752
Change-Id: Ib00be87137c00fb8ad29205c85a3ea187764b702
2014-02-14 17:41:18 +00:00
Paul Lawrence
1348603357 Enable auto-encrypt drive at startup
Modify enablecrypto command to make the password optional. When it is
not there, default encrypt the device.

Remove a warning by making at least some parts of this file const-correct.

Bug: 11985952
Change-Id: Ie27da4c4072386d9d6519d97ff46c6dc4ed188dc
2014-02-14 09:34:44 -08:00
Paul Lawrence
931f15d050 Merge "Support default, pattern, pin and password encryption types" 2014-02-14 15:24:13 +00:00
Nick Kralevich
5773f9e6da am 3214d1f5: am 3c0d02aa: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit '3214d1f5a4dbece12e00f1c122e4c2e291715706':
  Convert all selinux_android_restorecon and _setfilecon calls to new API.
2014-02-13 00:19:55 +00:00
Mark Salyzyn
2c1bbe0c44 am 49dd24c2: am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
* commit '49dd24c238e86c57e97f919af7fbf8ee3d79b737':
  vold: suppress unused argument warning messages
2014-02-13 00:19:54 +00:00
Nick Kralevich
3214d1f5a4 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.
2014-02-12 23:19:02 +00:00
Mark Salyzyn
49dd24c238 am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
* commit '1dc1fb4adc71ea9cf26a5033513bd3a1474f79a1':
  vold: suppress unused argument warning messages
2014-02-12 23:10:33 +00:00
Nick Kralevich
3c0d02aa03 Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API." 2014-02-12 23:09:58 +00:00
Mark Salyzyn
1dc1fb4adc Merge "vold: suppress unused argument warning messages" 2014-02-12 23:03:23 +00:00
Paul Lawrence
f4faa575c9 Support default, pattern, pin and password encryption types
Store encryption type in crypto footer, and provide functions to
manipulate it. Add mount_default_encrypted command to vdc to allow
mounting of default encrypted volumes at boot time.

Bug: 8769627
Change-Id: Ie41848f258e128b48b579e09789abfa24c95e2b2
2014-02-12 14:54:40 -08:00
Mark Salyzyn
5eecc449cc vold: suppress unused argument warning messages
(cherry picked from commit 3e971277db)

Change-Id: Ic1ab533f756fbd44b1f2e5ae12e2f5736ace7740
2014-02-12 14:27:51 -08:00
Mark Salyzyn
3e971277db vold: suppress unused argument warning messages
Change-Id: Ic1ab533f756fbd44b1f2e5ae12e2f5736ace7740
2014-02-12 20:18:28 +00:00
Stephen Smalley
5093e6187d 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>
2014-02-12 09:43:08 -05:00
Nick Kralevich
4ff7225154 am ca3593df: am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
* commit 'ca3593df3d48cb4b51acf89e6df4872b922fd51d':
  Add SELinux restorecon calls on ASEC containers.
2014-02-11 17:28:57 +00:00
Nick Kralevich
ca3593df3d am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
* commit '311edc8cb2dd5c86bad49f9696333874b400f9c4':
  Add SELinux restorecon calls on ASEC containers.
2014-02-11 17:20:39 +00:00
Nick Kralevich
311edc8cb2 Merge "Add SELinux restorecon calls on ASEC containers." 2014-02-11 17:13:46 +00:00
Colin Cross
88948cd60c am e985c9ab: am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
* commit 'e985c9ab10fed452b97138170b4d69288d076b06':
  vold: fix errors inside ALOGV
2014-02-10 12:51:31 +00:00
Colin Cross
e985c9ab10 am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
* commit '1d8e3ce8da962e5ff98d36e75f6b02873fdddb70':
  vold: fix errors inside ALOGV
2014-02-07 21:31:53 +00:00
Colin Cross
1d8e3ce8da Merge "vold: fix errors inside ALOGV" 2014-02-07 21:27:34 +00:00
Colin Cross
59846b654e vold: fix errors inside ALOGV
Fix errors exposed by adding compile-time checking to disabled ALOGVs.

Change-Id: I29bd6e9a7648ccca02e0e9a96b79ee0ea7b5cfc6
2014-02-06 20:34:29 -08:00
Robert Craig
b9e3ba56cb 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>
2014-02-06 07:10:43 -05:00
Paul Lawrence
c938df25c8 Merge "Fast ext4 encryption" 2014-01-30 15:34:04 +00:00
Paul Lawrence
ae59fe6c19 Fast ext4 encryption
For ext4 filesystems, only encrypt blocks in use.

Needs matching ext4 utils changes from
 https://googleplex-android-review.git.corp.google.com/#/c/409575

Bug: 11985952
Change-Id: I89df051c25105daf3f469cc980195202f8be6786
2014-01-29 22:29:10 +00:00
Nick Kralevich
ba3b0e8add am e8e1d80c: am 4d5d99ce: am 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit 'e8e1d80c64db85526a003e88c3dba36ff33dac74':
  Validate asec names.
2014-01-28 14:17:18 +00:00
Nick Kralevich
e8e1d80c64 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.
2014-01-28 14:11:06 +00:00
Nick Kralevich
4d5d99ce39 am 7cf05b15: am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit '7cf05b15b76b91aa07182e86a730d7552b23130c':
  Validate asec names.
2014-01-28 14:06:00 +00:00
Nick Kralevich
7cf05b15b7 am 2f0a1d66: am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit '2f0a1d66585fb44f59d913d3417422486ef10225':
  Validate asec names.
2014-01-27 19:32:29 -08:00
Nick Kralevich
2f0a1d6658 am 7f6932df: am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit '7f6932df89756f796c3a1f04f748db39a0564561':
  Validate asec names.
2014-01-27 19:27:11 -08:00
Nick Kralevich
7f6932df89 am 35ab6119: am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit '35ab611925aea29fc4088b5c3de7c8c77d956b8b':
  Validate asec names.
2014-01-27 19:25:27 -08:00
Nick Kralevich
35ab611925 am 3e03bf8a: am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit '3e03bf8a7ab9dcee8897f275c75adfcdb20e0fdc':
  Validate asec names.
2014-01-27 19:21:00 -08:00
Nick Kralevich
3e03bf8a7a am fd2dcf90: am f4770dcf: am 0de7c611: Validate asec names.
* commit 'fd2dcf905abd3dc76738fd864e3979bd6e5ce183':
  Validate asec names.
2014-01-27 19:19:25 -08:00
Nick Kralevich
fd2dcf905a am f4770dcf: am 0de7c611: Validate asec names.
* commit 'f4770dcf6ffe2baba16cbb290aba16f735c51962':
  Validate asec names.
2014-01-27 19:17:13 -08:00
Nick Kralevich
f4770dcf6f am 0de7c611: Validate asec names.
* commit '0de7c61102611ccd5df1ca48cb733bf037512c6b':
  Validate asec names.
2014-01-27 19:14:34 -08:00
Nick Kralevich
0de7c61102 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 6696260965)

Change-Id: Ia9d04f373aa95878b2e81584c4167dc2d4aa0c78
2014-01-27 15:21:17 -08:00
Nick Kralevich
6696260965 Validate asec names.
Make sure asec names only contain alphanumeric, underscores,
dots, or dashes. Don't allow double dots.

Bug: 12504045
Change-Id: I3dd0350c79327dc91a5a10d5724d85d99814e769
2014-01-27 14:58:06 -08:00
Colin Cross
01012342f4 am 353b45f8: Merge "vold: fix warnings for 64-bit"
* commit '353b45f84fa0bde76c91d338f843ff27c6f646ad':
  vold: fix warnings for 64-bit
2014-01-24 21:24:47 +00:00
Colin Cross
353b45f84f Merge "vold: fix warnings for 64-bit" 2014-01-24 20:28:19 +00:00
Colin Cross
346c5b20cb 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
2014-01-24 10:42:27 -08:00
Colin Cross
699bfa411e am 8328e815: Merge "vold: remove from include path"
* commit '8328e8150f4e7b785785754f2d44794e7bab3577':
  vold: remove $(KERNEL_HEADERS) from include path
2014-01-23 23:43:38 +00:00