OSDN Git Service
Ken Sumrall [Tue, 1 Feb 2011 21:27:36 +0000 (13:27 -0800)]
am
d33d417e: Detect when encryption failed to complete
* commit '
d33d417e3a057fffad22c23f5f002177531db2a5':
Detect when encryption failed to complete
Ken Sumrall [Tue, 1 Feb 2011 08:49:13 +0000 (00:49 -0800)]
Detect when encryption failed to complete
For the case there encryption failes to complete because of a kernel
crash or the user power cycling the device, define a flag in the
crypto footer that says encryption is in progress. Set it when starting
the actual encryption, and clear it when it successfully completes.
When the user is asked for the disk password, if the flag is set,
return a special error to the caller so the UI can know to tell the
user there is no valid data on the disk, and present a button to
wipe and reset the device.
Change-Id: I3723ec77f33437d94b3ac9ad5db0a5c950d11648
Ken Sumrall [Mon, 31 Jan 2011 03:44:27 +0000 (19:44 -0800)]
am
5d4c68e4: Have vold grab a partial wakelock when encrypting
* commit '
5d4c68e40700424b65a4331be75620706a0dd49c':
Have vold grab a partial wakelock when encrypting
Ken Sumrall [Mon, 31 Jan 2011 03:06:03 +0000 (19:06 -0800)]
Have vold grab a partial wakelock when encrypting
The Progress bar UI grabs a full wakelock when encrypting, but we've seen
a case where it looks like the progress bar UI crashes, and the wakelock is
lost, and then all hell breaks loose. The enablecrypto command has a lot of
work to do, and it will take some time, so it should grab a wakelock to
ensure it can finish without being interrupted and put to sleep.
It grabs a partial wake lock, as it doesn't need the screen to be on to do
its work. If the UI wants to keep it on, it should also grab a full wakelock,
which it does. If the UI crashes, the screen may turn off, but the encryption
will keep going, and vold will reboot the device when it's done.
Change-Id: I51d3a72b8c77383044a3facb1604c1ee510733ae
Ken Sumrall [Sun, 30 Jan 2011 04:50:03 +0000 (20:50 -0800)]
am
3f476690: Merge "Don\'t try to encrypt in place a filesystem that is too large and return proper errors" into honeycomb
* commit '
3f476690eaef3b824255813ed335284ef9a90e91':
Don't try to encrypt in place a filesystem that is too large and return proper errors
Ken Sumrall [Sun, 30 Jan 2011 04:45:31 +0000 (20:45 -0800)]
Merge "Don't try to encrypt in place a filesystem that is too large and return proper errors" into honeycomb
Jason parks [Sat, 29 Jan 2011 20:06:28 +0000 (12:06 -0800)]
am
70a4b3fd: Change cryptfs changepw to only require a new password.
* commit '
70a4b3fd7a84a84bbe6e9d6d4ca3ee2098259fd9':
Change cryptfs changepw to only require a new password.
Ken Sumrall [Sat, 29 Jan 2011 07:31:16 +0000 (23:31 -0800)]
Don't try to encrypt in place a filesystem that is too large and return proper errors
If the already existing filesystem encompasses the entire /data partition
and does not leave the last 16 Kbytes for the crypto footer, refuse to
do encrypt in place and return an error. This is only an issue for folks
with early development systems trying to encrypt an old /data. This should
not be seen in released devices.
Also, if there is an error, try to report back to the UI what the error was
so it can deal with it.
Change-Id: If66781a4fe03034c96c3dd12075240deb8663db0
Jason parks [Fri, 28 Jan 2011 16:10:47 +0000 (10:10 -0600)]
Change cryptfs changepw to only require a new password.
The master key is now stored unhashed in memory. This
is needed because certain operation like remote reseting
of passwords the old password is not avaliable.
The changepw interface has been changed to only take
the new password as the only argument. When this is
called we reencrypt the master key with the new password
and old salt.
Bug:
3382129
Change-Id: I9a596b89013194605d6d7790067691aa0dc75e72
Jason parks [Fri, 21 Jan 2011 20:39:35 +0000 (12:39 -0800)]
am
0167cb15: Always return success if the command was run.
* commit '
0167cb15935592deea9abbd6a8bbe904e27bd101':
Always return success if the command was run.
Jason parks [Fri, 21 Jan 2011 00:30:39 +0000 (18:30 -0600)]
Always return success if the command was run.
The caller will check the result code for success. This prevents a exception from being thrown when the result code needs to be propagated to the caller.
Change-Id: I471e8d6eb6f339c6f4e40f47adf60d20f6a70974
Ken Sumrall [Wed, 19 Jan 2011 11:48:12 +0000 (03:48 -0800)]
am
e8744070: Create and use a salt when calling pbkdf2 to encrypt/decrypt the master key.
* commit '
e87440703663f5ee326326f6438f3b00ea315623':
Create and use a salt when calling pbkdf2 to encrypt/decrypt the master key.
Ken Sumrall [Wed, 19 Jan 2011 06:03:31 +0000 (22:03 -0800)]
am
0cc16638: Verify that it\'s OK to run the various cryptfs commands
* commit '
0cc166385a7e1d3026bbcb62f094e419f779e872':
Verify that it's OK to run the various cryptfs commands
Ken Sumrall [Wed, 19 Jan 2011 06:01:55 +0000 (22:01 -0800)]
Create and use a salt when calling pbkdf2 to encrypt/decrypt the master key.
In order to prevent rainbow table attacks on decrypting the master key,
create a 16 byte "salt" by reading /dev/urandom. This is done right after
reading urandom to get the master key for the filesystem. The salt is
stored 32 bytes after the end of the key (a padding added to help prevent
accidental overwriting of the salt) and the salt is fixed at 16 bytes long.
This change will make existing encrypted filesystems unusable.
Change-Id: I420549d064c61d38aea78eef4d86c88acb265ca3
Ken Sumrall [Wed, 19 Jan 2011 05:53:23 +0000 (21:53 -0800)]
am
7df84120: Don\'t wait for the framework to come up before starting to encrypt in place.
* commit '
7df84120b25dca713f623528801385b00208c2aa':
Don't wait for the framework to come up before starting to encrypt in place.
Ken Sumrall [Wed, 19 Jan 2011 04:32:26 +0000 (20:32 -0800)]
Verify that it's OK to run the various cryptfs commands
Maintain and query some internal state to know if it's OK to run
the various cryptfs commands. Do not allow enablecrypto to run if
the device is already encrypted. Do no allow restart to run if
we have already run it before or if the password has not been
validated. Do not allow checkpw to run if not encrypted, or it
has already validated the password.
This is an extra layer of safety on top of the checks up in the
UI code agains possible DoS attacks on the device.
Change-Id: I9afc8d42773020e82a512e6b637feede101d1362
Ken Sumrall [Tue, 18 Jan 2011 22:04:08 +0000 (14:04 -0800)]
Don't wait for the framework to come up before starting to encrypt in place.
Also, change the value that triggers the progress bar framework from
"startup" to "0" in the property vold.encrypt_progress.
Change-Id: I3890e66a95283ce2ceeca82f516859b083919b9e
Ken Sumrall [Tue, 18 Jan 2011 16:47:29 +0000 (08:47 -0800)]
am
57b63e61: Minor tweaks to logging for the cryptfs changepw command.
* commit '
57b63e61cb41e377708a4fdf18ecc80eb1b2b521':
Minor tweaks to logging for the cryptfs changepw command.
Ken Sumrall [Tue, 18 Jan 2011 02:29:19 +0000 (18:29 -0800)]
Minor tweaks to logging for the cryptfs changepw command.
Change-Id: I87ff9788a56de6d461002407bf6c3cd4c6f900ee
Ken Sumrall [Mon, 17 Jan 2011 23:32:50 +0000 (15:32 -0800)]
am
8ddbe40a: Updates to cryptfs framework.
* commit '
8ddbe40a8a8708dac7c472fa8c098c8f7b24534c':
Updates to cryptfs framework.
Ken Sumrall [Mon, 17 Jan 2011 23:26:29 +0000 (15:26 -0800)]
Updates to cryptfs framework.
Update the enable inplace API to allow the UI to show a progress bar.
Add new command changepw (whichis currently not working)
Internal restructuring of code to support these two features.
Some minor cleanup of the code as well.
Change-Id: I11461fc9ce66965bea6cd0b6bb2ff48bcf607b97
Ken Sumrall [Mon, 17 Jan 2011 22:45:11 +0000 (14:45 -0800)]
am
6864b7ec: Change the cryptfs command to separate out checking the password and restarting
* commit '
6864b7ec94a57b73c300457955d86dc604aeddf5':
Change the cryptfs command to separate out checking the password and restarting
Ken Sumrall [Fri, 14 Jan 2011 23:20:02 +0000 (15:20 -0800)]
Change the cryptfs command to separate out checking the password and restarting
In order to make the animations and the UI look right, we need to change
the cryptfs checkpw command to return a status if the password was
correct or not, and not have it automatically restart if it's correct.
There is a new command restart that will restart the framework with the
encrypted filesystem.
Change-Id: Ia8ae00d7ed8667699aa58d05ad8ba953cca9316e
Ken Sumrall [Fri, 14 Jan 2011 22:30:52 +0000 (14:30 -0800)]
am
2eaf7138: Cleanup a few issues with the cryptfs code.
* commit '
2eaf7138528d30c331d83ab8346a97e66b5499e2':
Cleanup a few issues with the cryptfs code.
Ken Sumrall [Fri, 14 Jan 2011 20:45:48 +0000 (12:45 -0800)]
Cleanup a few issues with the cryptfs code.
Now that the framework shuts down quickly, remove the 30
second sleep when enabling crypto. Also, stop spewing
the secret master key to the disk in the system log!
Change-Id: Icb3f9456ababe3dff8de52cbbae92da0e9e5dd2f
Wink Saville [Sun, 9 Jan 2011 20:18:21 +0000 (12:18 -0800)]
Revert "Change constructor to match new definition of the superclass"
This reverts commit
499806cd60cd45b8cc9ae669b3d49507e04ffc0f.
Stan Chesnutt [Mon, 27 Dec 2010 06:17:48 +0000 (22:17 -0800)]
Change constructor to match new definition of the superclass
Change-Id: I3526b1920817c2a28ac3e84c1ea278932a9ec895
Ken Sumrall [Fri, 3 Dec 2010 11:47:09 +0000 (03:47 -0800)]
Support for encrypting /data on Stingray.
There are still a few hacks and performance issues related
to shutting down the framework in this code, but it is
functional and tested. Without the UI changes, it requires
cryptic adb shell commands to enable, which I shall not
utter here.
Change-Id: I0b8f90afd707e17fbdb0373d156236946633cf8b
Mike Lockwood [Fri, 10 Dec 2010 23:07:14 +0000 (15:07 -0800)]
Stifle "Ignoring unknown switch" logging
Change-Id: I9770ab880f379e2f7f6a93d3c84990edec60a116
Signed-off-by: Mike Lockwood <lockwood@android.com>
Jean-Baptiste Queru [Sat, 20 Nov 2010 01:26:47 +0000 (17:26 -0800)]
am
c1d80272: am
08da5c1f: Merge "vold: replace strsep by strtok_r"
* commit '
c1d80272b117cf837de93fadd8d456d89a203e2f':
vold: replace strsep by strtok_r
Jean-Baptiste Queru [Sat, 20 Nov 2010 01:24:49 +0000 (17:24 -0800)]
am
08da5c1f: Merge "vold: replace strsep by strtok_r"
* commit '
08da5c1f17afefe3c9f4f4d4456c5757dede62e1':
vold: replace strsep by strtok_r
Jean-Baptiste Queru [Sat, 20 Nov 2010 01:20:39 +0000 (17:20 -0800)]
Merge "vold: replace strsep by strtok_r"
Jinho You [Mon, 15 Nov 2010 06:02:32 +0000 (14:02 +0800)]
vold: replace strsep by strtok_r
It permits more white spaces between words in vold.fstab.
Change-Id: I38250c3dcc860643e4f102e980fe844693a1451a
Jean-Baptiste Queru [Fri, 19 Nov 2010 18:25:51 +0000 (10:25 -0800)]
am
1206e872: resolved conflicts for merge of
09f774b7 to gingerbread-plus-aosp
* commit '
1206e872ce74aab253c39c3547bfaadc5e1f6011':
vold: fix an offset one bug that makes partition 4 unusable
vold: set state back to idle on formatting error
Jean-Baptiste Queru [Fri, 19 Nov 2010 18:20:37 +0000 (10:20 -0800)]
resolved conflicts for merge of
09f774b7 to gingerbread-plus-aosp
Change-Id: I103db47198ad09783aa6539cde271df0fdb9c594
Jean-Baptiste Queru [Thu, 18 Nov 2010 02:24:33 +0000 (18:24 -0800)]
Merge changes Ic8e18e61,I62c78eb8
* changes:
vold: fix an offset one bug that makes partition 4 unusable
vold: set state back to idle on formatting error
Chih-Wei Huang [Wed, 17 Nov 2010 10:53:09 +0000 (18:53 +0800)]
vold: fix an offset one bug that makes partition 4 unusable
Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
Olivier Bailly [Tue, 16 Nov 2010 18:41:53 +0000 (10:41 -0800)]
Add missing include headers for compilation on Intel target for Google TV.
Change-Id: I9f71b5e871671d1d64ad37f78a8944653409b8e1
Chih-Wei Huang [Tue, 16 Nov 2010 05:18:19 +0000 (13:18 +0800)]
vold: set state back to idle on formatting error
On formatting error due to some reasons, the state is left at
Formatting, therefore the user is unable to mount the sdcard
again. The patch sets the state to Idle no matter formatting
error or not.
Change-Id: I62c78eb8299cc397ee5cc442890f8b3dbf09425c
Mike Lockwood [Fri, 29 Oct 2010 15:16:15 +0000 (08:16 -0700)]
am
a28056b3: Set VM dirty ratio to zero when UMS is active
* commit '
a28056b38275003895ff5d9576681aca01544822':
Set VM dirty ratio to zero when UMS is active
Mike Lockwood [Thu, 28 Oct 2010 19:21:24 +0000 (15:21 -0400)]
Set VM dirty ratio to zero when UMS is active
Improves UI responsiveness when copying large amount of data to the device.
BUG:
3131847
Change-Id: I4aa5ade7e2cd7e5110c8f0f7ee43bdc57577e11d
Signed-off-by: Mike Lockwood <lockwood@google.com>
Kenny Root [Fri, 1 Oct 2010 01:05:58 +0000 (18:05 -0700)]
am
918e5f9f: Better error code for unmounting not-mounted volumes
Merge commit '
918e5f9f10b9c1ff929683743ffbf229027ce240' into gingerbread-plus-aosp
* commit '
918e5f9f10b9c1ff929683743ffbf229027ce240':
Better error code for unmounting not-mounted volumes
Kenny Root [Fri, 1 Oct 2010 01:00:52 +0000 (18:00 -0700)]
Better error code for unmounting not-mounted volumes
ENOENT is more descriptive than the generic error that EINVAL gets
turned into. Then we can actually treat it how we want on the other
side.
Change-Id: I9b4f3be6308e13f680eae368d2167ab9ee6aae5f
Kenny Root [Sun, 26 Sep 2010 18:17:39 +0000 (11:17 -0700)]
am
cbacf78e: Track type of container mounted
Merge commit '
cbacf78eff70bd43bb899e164ec2ab409bc0904c' into gingerbread-plus-aosp
* commit '
cbacf78eff70bd43bb899e164ec2ab409bc0904c':
Track type of container mounted
Kenny Root [Fri, 24 Sep 2010 22:11:48 +0000 (15:11 -0700)]
Track type of container mounted
OBB and ASEC are tracked in the same active container list, but when it
comes time to unmount everything, it was trying to unmount the OBBs
according to ASEC rules. This led to the OBB not being unmounted and the
volume unmount failing.
Change-Id: I12c1d4d387b8022185d552b63edd61a50b9c0fc3
Mike Lockwood [Tue, 21 Sep 2010 18:09:58 +0000 (11:09 -0700)]
am
a4886f1f: More fixes for internal FAT partitions:
Merge commit '
a4886f1f8ed72e24a302a91a0ab18bc54b6f585e' into gingerbread-plus-aosp
* commit '
a4886f1f8ed72e24a302a91a0ab18bc54b6f585e':
More fixes for internal FAT partitions:
Mike Lockwood [Tue, 21 Sep 2010 17:56:35 +0000 (13:56 -0400)]
More fixes for internal FAT partitions:
Fix formatting partitions beyond the first partition.
Do not try to initialize the MBR when formatting only a single partition.
Change-Id: Ifbbd279b1c288b7b1b884a1a89248e3086ed735f
Signed-off-by: Mike Lockwood <lockwood@android.com>
Brad Fitzpatrick [Mon, 20 Sep 2010 18:45:40 +0000 (11:45 -0700)]
am
1b15d463: Add some missing closes on error conditions.
Merge commit '
1b15d463d4816fc084767cbeda3ee69ff5527545' into gingerbread-plus-aosp
* commit '
1b15d463d4816fc084767cbeda3ee69ff5527545':
Add some missing closes on error conditions.
Brad Fitzpatrick [Mon, 20 Sep 2010 18:11:46 +0000 (11:11 -0700)]
Add some missing closes on error conditions.
Also, some formatting fixes to get back into line with netd's copy of
logwrapper.c.
Change-Id: Id471b99e9c3c8c9bb0890ca0d5e1567125e35bd7
Mike Lockwood [Fri, 17 Sep 2010 22:58:04 +0000 (15:58 -0700)]
am
2dfe297e: Fixes for devices with internal FAT file system:
Merge commit '
2dfe297ec47559dbe2297a72bea71cf515c03797' into gingerbread-plus-aosp
* commit '
2dfe297ec47559dbe2297a72bea71cf515c03797':
Fixes for devices with internal FAT file system:
Mike Lockwood [Fri, 17 Sep 2010 22:50:51 +0000 (18:50 -0400)]
Fixes for devices with internal FAT file system:
Only share a single partition via UMS if a specific partition
is specified in vold.fstab (rather than "auto")
Do not fail to reformat if MBR cannot be found.
Change-Id: I544ca2ee325c308af656ab9f4732c788a964c156
Signed-off-by: Mike Lockwood <lockwood@android.com>
Kenny Root [Thu, 2 Sep 2010 20:25:27 +0000 (13:25 -0700)]
am
a3e06084: Allow execute on mounted ASEC and OBB containers
Merge commit '
a3e06084564c86ff618c40f185f3676b8b629b94' into gingerbread-plus-aosp
* commit '
a3e06084564c86ff618c40f185f3676b8b629b94':
Allow execute on mounted ASEC and OBB containers
Kenny Root [Fri, 27 Aug 2010 15:31:35 +0000 (08:31 -0700)]
Allow execute on mounted ASEC and OBB containers
This allows us to place shared libraries in these containers which may
only be loaded if they are executable.
Change-Id: I78fa9ab6d5c58ec8b98c40004da72aebc0aade2a
Ethan [Mon, 30 Aug 2010 20:20:44 +0000 (13:20 -0700)]
am
75a3e1a9: VOLD - make volume daemon to handle state change from shared to no_media
Merge commit '
75a3e1a95af0a2790de1b12aeca0008bfdc61649' into gingerbread-plus-aosp
* commit '
75a3e1a95af0a2790de1b12aeca0008bfdc61649':
VOLD - make volume daemon to handle state change from shared to no_media
Ethan [Wed, 21 Jul 2010 15:07:51 +0000 (23:07 +0800)]
VOLD - make volume daemon to handle state change from shared to no_media
When volume state changed from shared to no_media,
volume is not properly unshared.
Change-Id: I0117d67da95440d982275746a166ef6f4ac1c0e2
Signed-off-by: Ethan <ethan.too@gmail.com>
Jean-Baptiste Queru [Thu, 29 Jul 2010 18:31:13 +0000 (11:31 -0700)]
am
826bec79: Merge "vold: remove unnecessary code from VolumeManager::unshareVolume()"
Merge commit '
826bec79ea253505813d125700a12816e2c3bc0f' into gingerbread-plus-aosp
* commit '
826bec79ea253505813d125700a12816e2c3bc0f':
vold: remove unnecessary code from VolumeManager::unshareVolume()
Jean-Baptiste Queru [Thu, 29 Jul 2010 18:21:44 +0000 (11:21 -0700)]
Merge "vold: remove unnecessary code from VolumeManager::unshareVolume()"
Bruce Beare [Thu, 29 Jul 2010 18:19:15 +0000 (11:19 -0700)]
am
d766090b: Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Merge commit '
d766090b7a72562be9e64700e13882663004650e' into gingerbread-plus-aosp
* commit '
d766090b7a72562be9e64700e13882663004650e':
Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Seth Forshee [Sat, 10 Jul 2010 04:37:26 +0000 (23:37 -0500)]
vold: remove unnecessary code from VolumeManager::unshareVolume()
Signed-off-by: Seth Forshee <seth.forshee@garmin.com>
Bruce Beare [Thu, 22 Jul 2010 20:23:33 +0000 (13:23 -0700)]
Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
Kenny Root [Fri, 16 Jul 2010 22:04:55 +0000 (15:04 -0700)]
Fix loop_info/loop_info64 impedance mismatch
LOOP_GET_STATUS64 isn't useful here since the data contained within
isn't actually checked, so stick with the regular LOOP_GET_STATUS here
to match the struct loop_info we're using.
Change-Id: I4f9ff06fa44d4ae3aed046d423054554f9cf450b
Kenny Root [Mon, 12 Jul 2010 16:59:49 +0000 (09:59 -0700)]
Additional Obb functionality
* Rename all functions dealing with OBB files to mention Obb
* Add 'path' and 'list' functionality to OBB commands
* Store hashed filename in loop's lo_crypt_name and keep lo_file_name
for the real source filename. That way we can recover it later with an
ioctl call.
Change-Id: I29e468265988bfb931d981532d86d7be7b3adfc8
Kenny Root [Thu, 1 Jul 2010 01:48:41 +0000 (18:48 -0700)]
Add image mounting commands for OBB files
Allow the mounting of OBB filesystem images if they're encrypted with
twofish and in FAT filesystem format.
Change-Id: I54804e598f46b1f3a784ffe517ebd9d7626de7aa
Mike Lockwood [Sat, 26 Jun 2010 03:04:04 +0000 (23:04 -0400)]
Use new kernel notifications to determine if USB mass storage is available.
The usb_mass_storage switch no longer exists in our 2.6.35 kernel.
Instead we will consider mass storage to be available if both USB is connected
and the USB mass storage function is enable.
Change-Id: I730d1b3cb3cac664fc2abcdc36cd39856a08404a
Signed-off-by: Mike Lockwood <lockwood@android.com>
Kenny Root [Sat, 19 Jun 2010 02:06:50 +0000 (19:06 -0700)]
Change ASCII conversion for hash and add tests
Hash was printed using snprintf(), but we can just write yet another hex
conversion utility!
Change-Id: I04f1992deaf5bf1b3e2751c8f07072f8ed6660e9
Nick Kralevich [Fri, 14 May 2010 17:37:37 +0000 (10:37 -0700)]
Get rid of warnings when compiled with -Wformat-security
Change-Id: I27e0819aba347e26051ad771c594b69700da1721
San Mehat [Thu, 15 Apr 2010 19:58:50 +0000 (12:58 -0700)]
vold: Ensure we cleanup secure containers on card removal.
Fixes bug: http://b/issue?id=
2567572
Note: The framework will still likely restart since the system_server
is holding references to assets on the card which are mmaped, but
at least now storage will be available when a new card is re-inserted.
Change-Id: I4e195c0c666426b93da47198fa826a6f58d855a9
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Mar 2010 17:24:19 +0000 (10:24 -0700)]
vold: Switch from LOG -> SLOG
Change-Id: I48ee8bd90b47f5845f069cdf4d1b8ba6ecdb1b39
Signed-off-by: San Mehat <san@google.com>
Kenny Root [Thu, 25 Mar 2010 03:18:00 +0000 (20:18 -0700)]
Revert "Prevent null pointer deref in DirectVolume"
This reverts commit
a9f423dd7e313854ce7c103e1bb4661b05efc9a4.
Kenny Root [Wed, 24 Mar 2010 22:37:48 +0000 (15:37 -0700)]
Prevent null pointer deref in DirectVolume
There's a possibility that if something were messed up a call to
NetlinkEvent::findParam could return a NULL. Passing NULL as the
argument into atoi() would cause a null pointer dereference.
Change-Id: Ib071afbbe2adc341108c245ffa596cc8730bd8fd
San Mehat [Tue, 23 Mar 2010 18:15:58 +0000 (11:15 -0700)]
vold: asec path cmd now returns OpFailedStorageNotFound if id doesn't exist
Change-Id: Icbe3de7c28505f7496c8f8edea126c7b616de475
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 17 Mar 2010 16:50:54 +0000 (09:50 -0700)]
vold: Add mounted filesystems to dump cmd
Change-Id: If025e7ee10a79ff089920a6d0c1a52358b2d2c22
Signed-off-by: San Mehat <san@google.com>
Kenny Root [Mon, 15 Mar 2010 20:13:41 +0000 (13:13 -0700)]
vold: Convert to use OpenSSL MD5 API
Change-Id: I9b84370fa9a98464c211ebe8983be8dbe9dd7ccd
San Mehat [Mon, 15 Mar 2010 17:28:21 +0000 (10:28 -0700)]
vold: remove some dead code
Change-Id: Iaeb5d3334ec22ed31da9734bb8d7cd17e6a40eaf
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sun, 14 Mar 2010 20:41:54 +0000 (13:41 -0700)]
vold: Remove autorun.inf at mount/unmount time if it exists
Change-Id: Ia57da8ee177453a601a23d965c2b4f16b6de46e5
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sun, 14 Mar 2010 20:41:27 +0000 (13:41 -0700)]
vold: Fix argument validation for volume commands
Change-Id: I74aa63ff9f9bc32bd871e6c53ab50b6baf79e650
Signed-off-by: San Mehat <san@google.com>
San Mehat [Fri, 12 Mar 2010 21:32:47 +0000 (13:32 -0800)]
vold: Bugfixes & cleanups
- Fix issue where container-names > 64 bytes were getting truncated in the
kernel. lo_name is only 64 bytes in length, so we now hash the container
id via md5
- Add 'dump' command to dump loop and devicemapper status
- Add 'debug' command to enable more detailed logging at runtime
- Log vold IPC arguments (minus encryption keys)
- Fix premature return from Loop::lookupActive() and friends
Change-Id: I0e833261a445ce9dc1a8187e5501d27daba1ca76
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 10 Mar 2010 20:48:57 +0000 (12:48 -0800)]
vold: Switch to using libdiskconfig for partition setup.
Also handles an issue where NPARTS=0 on a disk change uevent
Change-Id: I77c56f177dc65df91468bbd7d5fe1889db414d7a
Signed-off-by: San Mehat <san@google.com>
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:05:25 +0000 (18:05 -0800)]
Add an empty CleanSpec.mk
Change-Id: Ied5f7eddd18adb38699c8a034a78ff9de4aab8de
San Mehat [Wed, 3 Mar 2010 20:37:32 +0000 (12:37 -0800)]
vold: Add a versioned superblock to secure containers.
Add an un-encrypted superblock to the end of a secure container to
help identify the crypto cipher used. This is required in order to
provide some semblence of versioning, in case we have cause to
change the crypto type on an update - say for example switching
from software to hardware encryption, or from 128 -> a zillion
bit keys.
NOTE: This format is incompatible with previous secure containers.
After this change they will no longer be mountable.
Signed-off-by: San Mehat <san@google.com>
San Mehat [Tue, 2 Mar 2010 21:16:50 +0000 (13:16 -0800)]
vold: Add support for xwarp
Signed-off-by: San Mehat <san@google.com>
San Mehat [Tue, 2 Mar 2010 21:16:33 +0000 (13:16 -0800)]
vold: Don't bail out on init failure & bump version number
Signed-off-by: San Mehat <san@google.com>
San Mehat [Mon, 1 Mar 2010 04:17:20 +0000 (20:17 -0800)]
vold: Allow creation of a container with no filesystem
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Feb 2010 20:12:34 +0000 (12:12 -0800)]
vold: Fix uninitialized mountpoint bug
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Feb 2010 19:43:22 +0000 (11:43 -0800)]
vold: Retry rmdir of asec mount point
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Feb 2010 16:42:51 +0000 (08:42 -0800)]
vold: Prohibit container rename when dst container is mounted
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Feb 2010 16:25:55 +0000 (08:25 -0800)]
vold: fix infinite loop when failing to unmount a busy container in unmountVolume()
Signed-off-by: San Mehat <san@google.com>
San Mehat [Wed, 24 Feb 2010 02:26:13 +0000 (18:26 -0800)]
vold: Make asec sdcard dir a hidden dir
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sat, 20 Feb 2010 02:14:36 +0000 (18:14 -0800)]
vold: Stage the mounting of media to hide the ASEC imagefile directory
In order to protect the '/android_secure' directory on VFAT removable media
from being mucked with by 3rd party applications on the device, we hide the
directory with a read-only, zero-sized tmpfs mounted on-top. A reference to the
hidden directory is kept by a bind-mount which is mounted at a location which
only root can access.
Staging consists of:
1. Mount checked media at a secure location (/mnt/secure/staging)
2. Ensure /android_secure exists on the media, (creating if it doesnt)
3. Bind-mount /mnt/secure/staging/android_secure -> /mnt/secure/asec
(where only root can access it)
4. Mount an RDONLY zero-sized tmpfs over /mnt/secure/staging/android_secure
5. Atomically move /mnt/secure/staging to the publicly accessable storage
directory (/mnt/sdcard)
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 18 Feb 2010 19:40:49 +0000 (11:40 -0800)]
vold: Clean up asec command response and add support for 'StorageBusy'
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 18 Feb 2010 17:00:18 +0000 (09:00 -0800)]
vold: Add 'force' option to anything that can cause an unmount
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 18 Feb 2010 16:37:45 +0000 (08:37 -0800)]
vold2: Don't allow containers < 1mb, and clean up some logging
Signed-off-by: San Mehat <san@google.com>
Kenny Root [Thu, 18 Feb 2010 17:34:07 +0000 (09:34 -0800)]
Check length of filenames before strcat
Just in case someone tries to set up a series of links to trick us, do a
quick sanity check on the total length of the strings we're about to
concatenate.
Change-Id: Iba9617008dbc1e93e1907393052caf1e52fbe312
San Mehat [Wed, 17 Feb 2010 01:12:00 +0000 (17:12 -0800)]
vold: Refactor Processkiller and add command to return users of a mount point
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sat, 13 Feb 2010 22:19:53 +0000 (14:19 -0800)]
vold: Fix devmapper/ptmx fd leak, and give asec unmount more time
Signed-off-by: San Mehat <san@google.com>
Jean-Baptiste Queru [Thu, 11 Feb 2010 20:20:09 +0000 (12:20 -0800)]
am
4468682c: Merge from open-source master
Merge commit '
4468682c7035d431c6154ab298c5ce0f9e2350f8'
* commit '
4468682c7035d431c6154ab298c5ce0f9e2350f8':
new project, first commit
Jean-Baptiste Queru [Thu, 11 Feb 2010 19:03:01 +0000 (11:03 -0800)]
Merge from open-source master
San Mehat [Mon, 8 Feb 2010 23:51:50 +0000 (15:51 -0800)]
vold: Fix format argument bug
Signed-off-by: San Mehat <san@google.com>
San Mehat [Sat, 6 Feb 2010 17:53:22 +0000 (09:53 -0800)]
vold: Reduce logspam and add 250ms delay before first unmount attempt
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 4 Feb 2010 23:07:01 +0000 (15:07 -0800)]
vold: Fix a few bugs
- share command was taking wrong arguments
- shared command was returning two termination codes
- Force FAT32 cluster size to 4k when formatting
Signed-off-by: San Mehat <san@google.com>