summaryrefslogtreecommitdiffstats
path: root/init/builtins.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Clean up reading and writing in init.Elliott Hughes2015-02-061-37/+8
| | | | | | | | | | | | | This isn't particularly useful in and of itself, but it does introduce the first (trivial) unit test, improves the documentation (including details about how to debug init crashes), and made me aware of how unpleasant the existing parser is. I also fixed a bug in passing --- unless you thought the "peboot" and "pm" commands were features... Bug: 19217569 Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
* Use TEMP_FAILURE_RETRY, always build bootchart.cpp.Elliott Hughes2015-02-041-6/+4
| | | | | | | | Also switch the revision parsing over to sscanf as promised. I haven't done the hardware parsing because I don't yet know whether we actually need to keep the space-stripping code. Change-Id: Ic33378345cd515cb08d00c543acf44eb72673396
* Build init as C++.Elliott Hughes2015-02-041-0/+951
This is just the minimal change to keep it building. Change-Id: I245c5b8413a1db114576c81462eb5737f5ffcef2