summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | init: Let property_get return std::string.Yabin Cui2015-07-241-3/+2
| | | | | | | | | | | | | | | | | | Bug: 22654233 Change-Id: Id6091f58432f75e966b9871256049fbe17766c10
* | | am 7f12fa27: am f5b46079: Merge "init: use init\'s property expansion code ↵Elliott Hughes2015-07-221-1/+7
|\| | | | | | | | | | | | | | | | | | | | for mount_all" * commit '7f12fa275604504ed874c08d6b7f906e8e522c73': init: use init's property expansion code for mount_all
| * | init: use init's property expansion code for mount_allNan Liu2015-07-221-1/+7
| |/ | | | | | | | | Change-Id: I3bd00c74cd126b66927eca7812943f8427009356 Signed-off-by: Nan Liu <nan.liu619@gmail.com>
* | am ab64465d: am 0e3ce82b: Merge "Use fsck.f2fs -a instead of -f for faster boot"Yusuke Sato2015-07-211-1/+70
|\| | | | | | | | | * commit 'ab64465d1f16f414c0bde5e3c4707c32b8220bbc': Use fsck.f2fs -a instead of -f for faster boot
| * Use fsck.f2fs -a instead of -f for faster bootYusuke Sato2015-07-151-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and run fsck with -f on clean shutdown instead. With -f, fsck.f2fs always performs a full scan of the /data partition regardless of whether the partition is clean or not. The full scan takes more than 2 seconds on volantis-userdebug and delays the OS boot. With -a, the command does almost nothing when the partition is clean and finishes within 20-30ms on volantis-userdebug. When the partition has an error or its check point has CP_FSCK_FLAG (aka "need_fsck"), the command does exactly the same full scan as -f to fix it. Bug: 21853106 Change-Id: I126263caf34c0f5bb8f5e6794454d4e72526ce38
* | am ee923139: Merge "Set up user directory crypto in init." into mnc-dr-devPaul Crowley2015-07-141-5/+18
|\ \ | | | | | | | | | | | | | | | | | | * commit 'ee923139c346e6751203fc7d2a341388e01c7b19': Set up user directory crypto in init. logd: switch to unordered_map from BasicHashtable rootdir: make sure the /oem mountpoint is always available
| * \ Merge "Set up user directory crypto in init." into mnc-dr-devPaul Crowley2015-07-131-5/+18
| |\ \
| | * | Set up user directory crypto in init.Paul Crowley2015-06-231-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry-picked from commit b94032b79c3cded501e2d5f7c328cf8c0c3911c4) Bug: 19704432 Change-Id: Ife4928ffbee39c8ae69e6ba66d9ce5ef5a0beb76
* | | | am d5ef9841: Merge "Change init sequence to support file level encryption" ↵Paul Lawrence2015-07-131-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | into mnc-dr-dev * commit 'd5ef984195779aa9e27d7baabdd751d641eea1a0': Change init sequence to support file level encryption
| * | | Change init sequence to support file level encryptionPaul Lawrence2015-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File level encryption must get the key between mounting userdata and calling post_fs_data when the directories are created. This requires access to keymaster, which in turn is found from a system property. Split property loaded into system and data, and load in right order. Bug: 22233063
* | | | am 81046166: Merge "Revert "Change init sequence to support file level ↵Paul Lawrence2015-07-071-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | encryption"" into mnc-dev * commit '8104616696ac5e806b16a393ea02c4f5d8efc328': Revert "Change init sequence to support file level encryption"
| * | | Revert "Change init sequence to support file level encryption"Paul Lawrence2015-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d815178b7512cb44d8b5f234e3f823b5a3e44dea. Change-Id: I7e3f55d3092fcd04ea9f62f1971c9d42570f096c
* | | | am a65e402b: Merge "Change init sequence to support file level encryption" ↵Paul Lawrence2015-07-061-2/+2
|\| | | | |_|/ |/| | | | | | | | | | | | | | into mnc-dev * commit 'a65e402b613e927697d35e7936c6d80908d77e88': Change init sequence to support file level encryption
| * | Change init sequence to support file level encryptionPaul Lawrence2015-07-061-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | File level encryption must get the key between mounting userdata and calling post_fs_data when the directories are created. This requires access to keymaster, which in turn is found from a system property. Split property loaded into system and data, and load in right order. Bug: 22233063 Change-Id: I8a6c40d44e17de386417a443c9dfc3b4e7fe59a5
| * DO NOT MERGE Securely encrypt the master keyPaul Lawrence2015-05-291-32/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (chery-picked from commit 806d10be2336f32cdca16c2540cbf3d548f2fec7) Move all key management into vold Reuse vold's existing key management through the crypto footer to manage the device wide keys. Use ro.crypto.type flag to determine crypto type, which prevents any issues when running in block encrypted mode, as well as speeding up boot in block or no encryption. This is one of four changes to enable this functionality: https://android-review.googlesource.com/#/c/148586/ https://android-review.googlesource.com/#/c/148604/ https://android-review.googlesource.com/#/c/148606/ https://android-review.googlesource.com/#/c/148607/ Bug: 18151196 Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
| * Fix insmod module sizeTom Cherry2015-05-121-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | read_file() used to append a new line character to the end of the buffer it returns, because parse_config() isn't able to cope with input that's not '\n'-terminated. Fix read_file() to be less insane, and push the workarounds into the parse_config() callers. Longer term we should rewrite parse_config(). Bug: http://b/21079470 Change-Id: Ie9d9a7adcd33b66621726aef20c4b8cc51c08be7 (cherry picked from commit eaa3b4ec6f79fe06163b8dd6fe8ba2581d3b9c0b)
| * Enable property expansion for insmodEmmanuel Berthier2015-05-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | Useful for dynamic kernel module location. This permits to use init rule like: insmod ${persist.modules.location}/<module_name> Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9 Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com> (cherry picked from commit ac41230cbc10bae95a049282238adb03605579c2)
* | init: expand_props on triggerMark Salyzyn2015-05-271-1/+7
| | | | | | | | | | Bug: 19608716 Change-Id: Ifce8bfde04f8e6f707245e0b53400072d94447b2
* | Fix insmod module sizeTom Cherry2015-05-121-5/+2
| | | | | | | | | | | | | | | | | | | | | | read_file() used to append a new line character to the end of the buffer it returns, because parse_config() isn't able to cope with input that's not '\n'-terminated. Fix read_file() to be less insane, and push the workarounds into the parse_config() callers. Longer term we should rewrite parse_config(). Change-Id: Ie9d9a7adcd33b66621726aef20c4b8cc51c08be7
* | Merge "Enable property expansion for insmod"Elliott Hughes2015-05-041-1/+10
|\ \
| * | Enable property expansion for insmodEmmanuel Berthier2015-04-271-1/+10
| |/ | | | | | | | | | | | | | | | | | | Useful for dynamic kernel module location. This permits to use init rule like: insmod ${persist.modules.location}/<module_name> Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9 Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
* | Securely encrypt the master keyPaul Lawrence2015-04-281-32/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move all key management into vold Reuse vold's existing key management through the crypto footer to manage the device wide keys. Use ro.crypto.type flag to determine crypto type, which prevents any issues when running in block encrypted mode, as well as speeding up boot in block or no encryption. This is one of four changes to enable this functionality: https://android-review.googlesource.com/#/c/148586/ https://android-review.googlesource.com/#/c/148604/ https://android-review.googlesource.com/#/c/148606/ https://android-review.googlesource.com/#/c/148607/ Bug: 18151196 Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
* | Merge "Revert "Securely encrypt the master key""Paul Lawrence2015-04-281-15/+30
|\ \
| * | Revert "Securely encrypt the master key"Paul Lawrence2015-04-281-15/+30
| | | | | | | | | | | | | | | | | | This reverts commit 4bf1887c787a025aad2fbafe382e556e85ac73b0. Change-Id: Ie6d1f39de530b99b50a27ddc45bcc900a24e04b5
* | | Merge "Revert "Only run vold command when file encryption enabled""Paul Lawrence2015-04-281-13/+4
|\ \ \
| * | | Revert "Only run vold command when file encryption enabled"Paul Lawrence2015-04-281-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efe190e02387de382bb6d187ce62aec0fe9cfb44. Change-Id: Ib15af9a85b0b885a388bda28511a6fc39a777264
* | | | Merge "Only run vold command when file encryption enabled"Paul Lawrence2015-04-281-4/+13
|\| | |
| * | | Only run vold command when file encryption enabledPaul Lawrence2015-04-231-4/+13
| |/ / | | | | | | | | | | | | | | | Avod slowing other boot times Change-Id: I4862312ea90d8a1e67d9a755a75f708f5e82cbc5
* | / Merge "Securely encrypt the master key"Paul Lawrence2015-04-271-30/+15
|\| | | |/ |/|
| * Securely encrypt the master keyPaul Lawrence2015-04-231-30/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unencrypted link since it is easier to manage directly Move creation of key to vold Start vold early so this is possible in a timely fashion This is one of four changes to enable this functionality: https://android-review.googlesource.com/#/c/144586/ https://android-review.googlesource.com/#/c/144663/ https://android-review.googlesource.com/#/c/144672/ https://android-review.googlesource.com/#/c/144673/ Bug: 18151196 Change-Id: Idb17d1f1a724c6ec509d181ae4427113e9d3b5e6
* | Revert "Revert "Remove now-unusable 'setcon' command.""Elliott Hughes2015-04-241-9/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit b862bd00a4192d48c3ae82156d8c35b32283e9e4. This change was fine but an earlier change it depended on was broken. That change has been fixed and resubmitted. Bug: http://b/19702273 Change-Id: I17e565721026e48e2a73526f729f2481d4d6edb5
* | Revert "Remove now-unusable 'setcon' command."Nick Kralevich2015-04-241-0/+9
| | | | | | | | | | | | | | | | Temporarily revert because device isn't booting. This reverts commit 7b15ac99f3bfef33c82ea109487c99a77b41ebfb. Change-Id: Ice986bac62e20c70f7bedf1744a617b97392ae8c
* | Remove now-unusable 'setcon' command.Elliott Hughes2015-04-231-9/+0
|/ | | | | Bug: http://b/19702273 Change-Id: Icd340c80ba074476dcc63f1c1dd5c61a5c768893
* Merge "Set verity mode as the verified property value"Sami Tolvanen2015-04-071-2/+3
|\
| * Set verity mode as the verified property valueSami Tolvanen2015-03-311-2/+3
| | | | | | | | | | | | | | Set the verity mode as the value for partition.%s.verified to make it easier for userspace to determine in which mode dm-verity was started. Change-Id: Icc635515f8a8ede941277aed196867351d8387cb
* | Remove execonce.Elliott Hughes2015-04-031-62/+0
| | | | | | | | | | | | Use 'exec' instead. Change-Id: I1320d1971f7cd8b23753c27aa87089006e112a11
* | Revert "Revert "Adding e4crypt support""Paul Lawrence2015-03-311-1/+53
|/ | | | | | | | Fix build break caused by original change This reverts commit 84b0bab58fcc7f225e9a17a15c531b0c2fc509c5. Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
* Always use strerror to report errno.Elliott Hughes2015-03-201-1/+1
| | | | Change-Id: Icd18e4bd7dc093c18967f45b99cd451359457b03
* Clean up property setting code.Elliott Hughes2015-03-201-45/+22
| | | | | | In particular, ensure that all property_set failures are reported. Change-Id: Iab94a28bcba2346868c0f39bcfe26e55a2c55562
* Add init command to set verified propertiesSami Tolvanen2015-03-191-0/+24
| | | | | | | | | | Add a command that updates dm-verity state and sets partition.%.verified properties used by adb remount. This is needed in init since fs_mgr cannot set properties: I6a28cccb1ccce960841af20a4b20c32d424b5524 Change-Id: I0fdf5bc29c56690dcadff9d0eb216d3c68483538
* Remove chroot from init.Elliott Hughes2015-03-181-6/+0
| | | | | | This is not obviously useful. Let's wait until we have an actual need. Change-Id: I2c75c96314b281e89df25b6ed202b3dd5dfdaf15
* Remove chdir from init.Elliott Hughes2015-03-151-6/+0
| | | | Change-Id: Ib2880c6cb18db613deac04ee3b06b9719f5248b9
* Remove obsolete setkey.Elliott Hughes2015-03-131-23/+0
| | | | | | It's undocumented and unused. Change-Id: I685dc900adbc14f2e8b4eeebb1e4d111782f141d
* Remove getsebool/setsebool from init and toolbox.Stephen Smalley2015-03-131-28/+0
| | | | | | | | | These were leftovers from the SELinux boolean support that was originally merged. Since Android prohibits SELinux policy booleans, we can just drop it. Change-Id: I02f646a7d8db65e153702205b082b87a73f60d73 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* builtins: remove setenforce commandNick Kralevich2015-03-111-9/+0
| | | | | | | | Adding "setenforce 0" to init.rc isn't a supported way to turn off SELinux, and doesn't work with AOSP SELinux policy. Remove the code from init. Change-Id: If8c8149560789c9a7ba518a0a100e6033bb68898
* Merge "Implement exec."Elliott Hughes2015-03-111-3/+8
|\
| * Implement exec.Elliott Hughes2015-02-251-3/+8
| | | | | | | | Change-Id: I20329bc9b378479d745b498d6a00eca0872cd5ab
* | Add init support for dm-verity logging modeSami Tolvanen2015-03-041-0/+14
|/ | | | | | | | | | Add a built-in command for loading verity state. If dm-verity will be started in logging mode, trigger verity-logging. Needs changes from Ibb82953594d234f81ad21c40f524190b88e4ac8f Change-Id: I5af4918f2f14fdd4d07f51c55837e08111fd3748
* Move sprintf to snprintf.Yabin Cui2015-02-171-2/+2
| | | | | Bug: 19340053 Change-Id: Id0d866e6195ed4752b4be6081eeb2aab8b1dbe9a
* Bump do_write buffer sizeJohan Redestig2015-02-071-1/+1
| | | | | | | | | | | | | | | | In the case of do_write (write to generic file) there is really no relation to the PROP_VALUE_MAX limitation of system properties. The current value, 92, is not so much for writing to files so bump it a bit. Ideally there should not be any low hard limit in this case. Either expand_props should allocate the output buffer or take the output fd and to streaming write. Such a change is rather invasive though and at this point in time it seems reasonable that one dont want more than 256 character strings in the init files. Change-Id: I846a282ae4e747e6171eef38b302b46287951451