Commit graph

3367 commits

Author SHA1 Message Date
Mike Lockwood
2c9d8de79a Merge "Prevent buffer overflows." 2011-06-29 06:30:38 -07:00
Dianne Hackborn
736910ca99 Add new vold call to get the path to an asec fs.
Change-Id: Ife15628ed6e2493c9e85a2ade6d59a194fdddde5
2011-06-27 13:37:28 -07:00
Peter Bohm
092aa1c585 Prevent buffer overflows.
To eliminate possible buffer overflows some strcpy,
sprintf and strcat have been changed to strlcpy,
snprintf and strlcat.

Change-Id: Ieb9d4b600c894946a6492f8629ff39f2fcc106d3
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
2011-06-27 10:04:05 +02:00
Mike Lockwood
97f2fc110b Update path for seting USB mass storage backing store
Change-Id: I0e5fab1624e5ef5d2f55e2584d8adc1b6bab91b0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 23:57:12 -04:00
Mike Lockwood
6b715592ec Merge "Remove obsolete code for monitoring USB status" 2011-06-17 20:55:07 -07:00
Ken Sumrall
86bccb14d6 Merge "Don't abort the encryption process if an internal volume is present but unmounted." 2011-06-14 15:30:36 -07:00
Ken Sumrall
319b1043bb Don't abort the encryption process if an internal volume is present but unmounted.
It is not a failure if the SD card is not mounted.

Change-Id: If954f77c55ac124b9b7b39c89ffbafb4e5ea9e98
2011-06-14 14:01:55 -07:00
Nick Kralevich
5864fabc8b am 598e833d: am b20d54b2: Merge "fix double closing file descriptors"
* commit '598e833d42a687259bc3c9a5a39ad9ba8b105cbb':
  fix double closing file descriptors
2011-06-09 11:27:38 -07:00
Bruce Beare
d11b833201 Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Orig-Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-06-09 17:39:19 +02:00
Nick Kralevich
598e833d42 am b20d54b2: Merge "fix double closing file descriptors"
* commit 'b20d54b2309adee8d192942015740735ded975d3':
  fix double closing file descriptors
2011-06-07 16:28:11 -07:00
Nick Kralevich
b20d54b230 Merge "fix double closing file descriptors" 2011-06-07 15:44:51 -07:00
Mike Lockwood
a976656ff9 Remove obsolete code for monitoring USB status
Change-Id: I8ac8900b3135f03b7717540b825ff6df76f31c0b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-07 08:34:08 -07:00
Robert CH Chou
06aaa41096 fix double closing file descriptors
Change-Id: I243628b77a0b7b138785167ccb5520e1a9374a78
2011-06-06 21:32:45 +08:00
Ken Sumrall
29d8da8cef vold: allow to store key in a file on another partition
Add support for keeping the keys in a separate file on another partition,
for devices with no space reserved for a footer after the userdata filesystem.

Add support for encrypting the volumes managed by vold, if they meet certain
criteria, namely being marked as nonremovable and encryptable in vold.fstab.
A bit of trickiness is required to keep vold happy.

Change-Id: Idf0611f74b56c1026c45742ca82e0c26e58828fe
2011-06-02 16:30:14 -07:00
The Android Open Source Project
10a9e42835 Reconcile with gingerbread-release honeycomb-release
Change-Id: I70f4170b78ed5412a4addd3c603c8ff52c8cfa0d
2011-05-20 14:19:46 -07:00
The Android Automerger
93f032122f merge in gingerbread-release history after reset to gingerbread 2011-05-13 14:27:41 -07:00
The Android Automerger
311e06bc72 am 9496945d: (-s ours) am 4e00f1fa: Merge remote branch \'goog/honeycomb-mr2\' into honeycomb-LTE
* commit '9496945d0ded76031cb129de65be425cfa971673':
  DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
  DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
2011-05-09 10:53:17 -07:00
The Android Automerger
9496945d0d am 4e00f1fa: Merge remote branch \'goog/honeycomb-mr2\' into honeycomb-LTE
* commit '4e00f1fa4d4e82bba4afe1c2a21bf0a56b3a4c8f':
  DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
  DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
2011-05-09 10:40:33 -07:00
The Android Automerger
4e00f1fa4d Merge remote branch 'goog/honeycomb-mr2' into honeycomb-LTE 2011-05-08 22:45:47 -07:00
Mike Lockwood
31ab84f6a9 am c13e0967: (-s ours) am 745ddcb2: DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
* commit 'c13e0967debb6b5a817004e9184e6d3466c42813':
  DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
2011-05-04 12:45:42 -07:00
Mike Lockwood
71bde5e706 am 7877388b: (-s ours) am f4cd1c6b: DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
* commit '7877388b6c65c4819e436141ccc519161b719bec':
  DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
2011-05-04 12:45:40 -07:00
Mike Lockwood
c13e0967de am 745ddcb2: DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
* commit '745ddcb2a6247817dde0790be4c74a81e7b324d4':
  DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
2011-05-04 08:53:26 -07:00
Mike Lockwood
7877388b6c am f4cd1c6b: DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
* commit 'f4cd1c6b1912d2481334152f7dec50067960a90c':
  DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
2011-05-04 08:53:25 -07:00
Mike Lockwood
745ddcb2a6 DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
Change-Id: If2532ce8ca7d584f2442d830450313198234bd23
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 09:42:26 -04:00
Mike Lockwood
f4cd1c6b19 DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
Change-Id: Id9a6fa6705cf97b94d419e85b5d74413e79fc748
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-04 09:42:23 -04:00
Mike Lockwood
3bcc2410f5 DO NOT MERGE Only create android_secure mountpoint on the primary external storage volume.
Change-Id: If21d134e7d8333b8214603a2d43a3153ab8760cc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 20:49:16 -04:00
Mike Lockwood
11a3922ec6 DO NOT MERGE Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
Change-Id: Id65f76eacaec1787aa557f96447c5bc19b7b127f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 20:49:13 -04:00
Nick Kralevich
cc8e96c8dc DirectVolume: don't continue on invalid PARTN value
Change-Id: I1e434c5b47b40fabaf1e702d7f2e43a88c0497dc
2011-04-29 16:07:45 -07:00
Conley Owens
8bd9b3fcc6 am 3368f167: am 9cb6e501: Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change in internal tree.
* commit '3368f167578fcd2ef024e6d8da723f349089fa7c':
  Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)
2011-04-26 16:08:13 -07:00
Conley Owens
3368f16757 am 9cb6e501: Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change in internal tree.
* commit '9cb6e501f17ec2a511d942c833ea51a53bcd7249':
  Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)
2011-04-26 16:05:29 -07:00
Conley Owens
9cb6e501f1 Ignore change "Set SO_PASSCRED on the uevent socket." in favor of change
in internal tree.

Change-Id: Ibdf7cf1e1d0ba177d9de813baa6481ddd31d5d9c
2011-04-26 15:59:01 -07:00
Conley Owens
c840b382c5 Merge "Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)" 2011-04-26 15:36:04 -07:00
Vernon Tang
5f6ae96bab Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)
Change-Id: I09a8a6d7c654869a40339adce181e6b981f10369
2011-04-25 13:41:20 +10:00
Nick Kralevich
cf5af17119 am b510cd4e: am 77992e71: vold: Enable the SO_PASSCRED socket option
* commit 'b510cd4e8a480cbb01ff3175f2e99b11328ff88a':
  vold: Enable the SO_PASSCRED socket option
2011-04-19 15:44:57 -07:00
Nick Kralevich
b510cd4e8a am 77992e71: vold: Enable the SO_PASSCRED socket option
* commit '77992e713ceac377ed226b555685f99fcfeb2c14':
  vold: Enable the SO_PASSCRED socket option
2011-04-19 15:36:16 -07:00
Nick Kralevich
77992e713c vold: Enable the SO_PASSCRED socket option
Ensure that sender credentials are available when we
receive a netlink message.

This is a manual cherry-pick of
c51920c824

Change-Id: I98aff8733449617d35d20bff2fe77e9d3f22f57e
2011-04-19 12:20:00 -07:00
Nick Kralevich
a645600588 am 46770e6e: am b9aa1459: am c51920c8: vold: Enable the SO_PASSCRED socket option
* commit '46770e6ea0876797b9f6d93e838f3d73dc91917d':
  vold: Enable the SO_PASSCRED socket option
2011-04-19 10:38:26 -07:00
Nick Kralevich
46770e6ea0 am b9aa1459: am c51920c8: vold: Enable the SO_PASSCRED socket option
* commit 'b9aa145910e22ed97cb51545bf399e6289bca643':
  vold: Enable the SO_PASSCRED socket option
2011-04-19 10:26:07 -07:00
Nick Kralevich
82baf904c6 vold: Enable the SO_PASSCRED socket option
Ensure that sender credentials are available when we
receive a netlink message.

Change-Id: I48411205a8fbc1ebd29834f64028662d80f15995
2011-04-18 20:14:21 -07:00
Nick Kralevich
b9aa145910 am c51920c8: vold: Enable the SO_PASSCRED socket option
* commit 'c51920c82463b240e2be0430849837d6fdc5352e':
  vold: Enable the SO_PASSCRED socket option
2011-04-18 16:31:25 -07:00
Nick Kralevich
c51920c824 vold: Enable the SO_PASSCRED socket option
Ensure that sender credentials are available when we
receive a netlink message.

Change-Id: I48411205a8fbc1ebd29834f64028662d80f15995
2011-04-18 15:51:19 -07:00
Nick Kralevich
f07eeb92fd am 19df18af: am aecf0e2a: am f3d3ce5e: add bounds checking for mPartMinors[]
* commit '19df18af24490f17e82758c38157750c67da245b':
  add bounds checking for mPartMinors[]
2011-04-18 12:07:41 -07:00
Nick Kralevich
19df18af24 am aecf0e2a: am f3d3ce5e: add bounds checking for mPartMinors[]
* commit 'aecf0e2a3dd1a72e448d9df7ed69533578dda12c':
  add bounds checking for mPartMinors[]
2011-04-18 11:59:07 -07:00
Nick Kralevich
aecf0e2a3d am f3d3ce5e: add bounds checking for mPartMinors[]
* commit 'f3d3ce5e53ab7928f4c292c183c417a1bd051151':
  add bounds checking for mPartMinors[]
2011-04-18 11:44:57 -07:00
Nick Kralevich
f3d3ce5e53 add bounds checking for mPartMinors[]
Change-Id: I6d5b26756c8434d6396f3535252608ce61eabfd8
2011-04-18 11:16:13 -07:00
Mike Lockwood
850949485b Only create android_secure mountpoint on the primary external storage volume.
Change-Id: I4069297a799260b8ecf355e91a1594b4f03126af
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-04 15:49:31 -04:00
Mike Lockwood
9092b1dbd3 Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
Change-Id: I8bb658bb2ab66026f0a54f9c1f80fc5c6e8d918a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-25 13:42:56 -07:00
Ken Sumrall
ad2ac33460 Load persistent properties after mounting an encrypted /data partition.
Fix for bug 3415286.  Trigger an action in init.rc to load the persistent
properties after /data has been decrypted and mounted.

Change-Id: I5fe3b481bcc6963113e830728c204b22ffc3b722
2011-03-09 17:34:55 -08:00
Ken Sumrall
c290eaf685 Teach vold to use the new android_reboot() function.
The new android_reboot() function is a nicer way to reboot.
It can optionally sync(2) and remount as read-only writable
filesystems.  This fixes bug 3350709.

Change-Id: I4618bd5e8cccdce08494a7ca3f40ef72b2875e68
2011-03-09 17:34:44 -08:00
Ken Sumrall
cd235da6fb Enable detection of failed encryption process, for bug 3384231.
Need to detect if the encryption process didn't finish successfully, and if
so, provide a way for the UI to detect that and give the user an option to
wipe the system clean.  Otherwise, the user is stuck in a reboot loop, and
they will need to do magic button presses to enter recovery and wipe the
device to get out of it.

Change-Id: I58253e1e523ee42bdd1a59aa7d8a9d20071bd18b
2011-02-15 14:53:36 -08:00