summaryrefslogtreecommitdiffstats
path: root/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused code.Jeff Sharkey2015-04-011-27/+22
| | | | | Bug: 19993667 Change-Id: I1f6519655c5a366eca25e2329e1bf95d81b3bf8c
* Some CLOEXEC love.Jeff Sharkey2015-04-011-1/+5
| | | | | Bug: 19993667 Change-Id: If8c0b346820f30c6a7dac495f935be17d677ffcc
* Different blkid and fsck execution domains.Jeff Sharkey2015-04-011-12/+37
| | | | | | | | | | | | vold works with two broad classes of block devices: untrusted devices that come in from the wild, and trusted devices like PrivateVolume which are encrypted. When running blkid and fsck, we pick which SELinux execution domain to use based on which class the device belongs to. Bug: 19993667 Change-Id: I2695f028710a4863f0c3b2ed6da437f466401272
* Progress towards dynamic storage support.Jeff Sharkey2015-03-301-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wire up new Disk and VolumeBase objects and events to start replacing older DirectVolume code. Use filesystem UUID as visible PublicVolume name to be more deterministic. When starting, create DiskSource instances based on fstab, and watch for kernel devices to appear. Turn matching devices into Disk objects, scan for partitions, and create any relevant VolumeBase objects. Broadcast all of these events towards userspace so the framework can decide what to mount. Keep track of the primary VolumeBase, and update the new per-user /storage/self/primary symlink for all started users. Provide a reset command that framework uses to start from a known state when runtime is restarted. When vold is unexpectedly killed, try recovering by unmounting everything under /mnt and /storage before moving forward. Remove UMS sharing support for now, since no current devices support it; MTP is the recommended solution going forward because it offers better multi-user support. Switch killProcessesWithOpenFiles() to directly take signal. Fix one SOCK_CLOEXEC bug, but SELinux says there are more lurking. Bug: 19993667 Change-Id: I2dad1303aa4667ec14c52f774e2a28b3c1c1ff6d
* Set SELinux contexts on device nodes created by vold.Stephen Smalley2014-09-301-0/+7
| | | | | | | | | | | | | | | | Extend vold to look up and set SELinux contexts on the device nodes it creates for extra loop devices and for volumes. Prior to this change, these device nodes simply inherited the type of their parent directory /dev/block, i.e. block_device, and vold therefore required create_file perms to block_device:blk_file. With this change we can scope vold down to accessing specific block device types. This depends on change Id3bea28f5958086716cd3db055bea309b3b5fa5a to allow vold to use setfscreatecon(). Change-Id: Ib9e8294abb1da94d92503947603ec12e802ff08c Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Add support for more expressive SD card permissionsJeff Sharkey2013-10-081-11/+12
| | | | | | | | | We now run an sdcard fuse daemon on top of a physical SD card. Add support for that. Bug: 10330128 Change-Id: I6a291f861ccb0f2911c07cc8f659e2cec4e6d76c
* vold: set klog level so e2fsck output is loggedKen Sumrall2013-04-101-0/+4
| | | | | | | | | 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
* vold: use unified fstab formatKen Sumrall2013-02-151-89/+37
| | | | | | | | Change vold to use the unified fstab. This includes both support for sdcards, and changes to the crypto code to work with some changes to the fs_mgr library api. Change-Id: Id5a8aa5b699afe151db6e31aa0d76105f9c95a80
* vold: allow to store key in a file on another partitionKen Sumrall2011-06-021-2/+34
| | | | | | | | | | | 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
* am 08da5c1f: Merge "vold: replace strsep by strtok_r"Jean-Baptiste Queru2010-11-191-7/+8
|\ | | | | | | | | * commit '08da5c1f17afefe3c9f4f4d4456c5757dede62e1': vold: replace strsep by strtok_r
| * vold: replace strsep by strtok_rJinho You2010-11-191-7/+8
| | | | | | | | | | | | It permits more white spaces between words in vold.fstab. Change-Id: I38250c3dcc860643e4f102e980fe844693a1451a
* | Use new kernel notifications to determine if USB mass storage is available.Mike Lockwood2010-06-281-26/+0
|/ | | | | | | | | 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>
* vold: Switch from LOG -> SLOGSan Mehat2010-03-251-18/+18
| | | | | Change-Id: I48ee8bd90b47f5845f069cdf4d1b8ba6ecdb1b39 Signed-off-by: San Mehat <san@google.com>
* vold: Don't bail out on init failure & bump version numberSan Mehat2010-03-021-13/+10
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Don't bail out if the UMS switch isn't thereSan Mehat2010-01-041-14/+14
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Manually bootstrap the ums switch since switch kernel uevents are brokenSan Mehat2010-01-011-0/+29
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Get mounting/unmounting/formatting/sharing workingSan Mehat2009-12-191-2/+9
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Rename DeviceVolume -> DirectVolumeSan Mehat2009-10-121-3/+3
| | | | Signed-off-by: San Mehat <san@android.com>
* vold2: Add block device udev bootstrappingSan Mehat2009-10-121-0/+53
| | | | Signed-off-by: San Mehat <san@android.com>
* system: vold2: Initial skeleton for vold2.San Mehat2009-10-101-0/+159
Let there be light. Signed-off-by: San Mehat <san@android.com>