summaryrefslogtreecommitdiffstats
path: root/init/builtins.c
Commit message (Collapse)AuthorAgeFilesLines
* Change setsebool syntax to be consistent with other init built-ins.Stephen Smalley2012-12-131-22/+17
| | | | | | | | | | Change setsebool syntax from name=value to name value. This is to make it consistent with setprop and similar commands. Update both the init built-in command and the toolbox command for consistency. Change-Id: I2c8e016ba26731c4a2ad4a49ae3b89362bf8f8a8 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* am 7b88a90d: Merge "Remove HAVE_SELINUX guards"Kenny Root2012-10-171-8/+1
|\ | | | | | | | | * commit '7b88a90da2a27e347fc16c14fa577f4ae1ef07fd': Remove HAVE_SELINUX guards
| * Remove HAVE_SELINUX guardsKenny Root2012-10-161-8/+1
| | | | | | | | Change-Id: I8272c573b3c5dc663203bafab68fad5e94d89364
* | am 3af04b71: am 7c386a61: Merge "Extend and document the "wait" command"Jean-Baptiste Queru2012-08-201-2/+4
|\ \ | |/ | | | | | | * commit '3af04b71e51e89af02a1fe526e4fc32dce0100d3': Extend and document the "wait" command
| * Merge "Extend and document the "wait" command"Jean-Baptiste Queru2012-08-201-2/+4
| |\
| | * Extend and document the "wait" commandPatrick McCormick2012-07-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wait command was currently implemented but undocumented and only used internally. This change adds a second option toi (optionally) override the default timeout of 5 seconds. The wait command can be used to wait for a file to appear during the boot process, for example a disk or other device, and is a better alternative than an unconditional sleep. Change-Id: Ia11d8419c0ea84deec0e1bf5adfca5bc76ff38b7 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* | | init: Fix mkdir command when using ISUID or ISGID bitBenoit Goby2012-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | On first boot, the directory is created with root:root ownership and then chowned. chown clears the ISUID and ISGID bits, so we need to chmod the directory again after chown. Change-Id: I02dfe7a19a637678256b4e7cc09e6b5431e6f11e
* | | Support shared-subtree and bind mount flags.Jeff Sharkey2012-08-141-0/+6
|/ / | | | | | | | | Bug: 6925012 Change-Id: Id8d887d17c6b1b2f90cfd1a1de991ccaba730b7d
* | Merge "Set the SELinux security label on new directories."Jean-Baptiste Queru2012-08-081-16/+2
|\ \ | |/ |/|
| * Set the SELinux security label on new directories.Stephen Smalley2012-07-261-16/+2
| | | | | | | | | | | | | | | | | | | | | | Automatically set the SELinux security label on directories created by init.rc. This avoids the need to separately call restorecon on each such directory from the init.rc file. Also restorecon /dev and /dev/socket after initial policy load so that they are labeled correctly before any other dev nodes or sockets are created. Change-Id: If6af6c4887cdead949737cebdd673957e9273ead Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
| * init: Fix chown and chmod for write-only filesBenoit Goby2012-05-041-2/+13
| | | | | | | | Change-Id: I570b631ced11ab104aafe7ebfe71bae4e380d8af
| * init: make chmod/mkdir/chown not follow symlinksGeremy Condra2012-05-021-5/+51
| | | | | | | | | | | | | | | | This change brings init's do_chmod, mkdir, and do_chown into line with open's O_NOFOLLOW semantics, causing them to fail when the last element of their target path is a symlink. Change-Id: If00e1a25cfe17ef6f738af4bf0541abd0c1b084b
* | am 0e9dd90a: Change init to use libfs_mgr to mount filesystems.Ken Sumrall2012-05-011-53/+54
|\ \ | | | | | | | | | | | | * commit '0e9dd90ac336278659477cad0b9e9f1004e2b338': Change init to use libfs_mgr to mount filesystems.
| * | Change init to use libfs_mgr to mount filesystems.Ken Sumrall2012-05-011-53/+54
| | | | | | | | | | | | | | | | | | | | | | | | The new fs_mgr library moves much of the knowledge of what filesystems to mount into a new fstab.<device> file, and just calls one function to mount all the filesystems. Change-Id: If3db37530a0676000cba3e679db27aca734227e5
* | | am 64753635: am a02ff986: Merge "init: Add noexec mount option"Colin Cross2012-04-271-0/+1
|\ \ \ | |/ / |/| / | |/ | | * commit '647536359f8ea63330805cb77abbf2f101952daa': init: Add noexec mount option
| * init: Add noexec mount optionLars Svensson2012-04-231-0/+1
| | | | | | | | Change-Id: Ic13d66797a86d38432e79af0c3387ce986d0a19f
* | init: Fix chown and chmod for write-only filesBenoit Goby2012-03-281-2/+13
| | | | | | | | Change-Id: I570b631ced11ab104aafe7ebfe71bae4e380d8af
* | init: make chmod/mkdir/chown not follow symlinksGeremy Condra2012-03-211-5/+51
|/ | | | | | | | This change brings init's do_chmod, mkdir, and do_chown into line with open's O_NOFOLLOW semantics, causing them to fail when the last element of their target path is a symlink. Change-Id: If00e1a25cfe17ef6f738af4bf0541abd0c1b084b
* Extend init and ueventd for SE Android.Stephen Smalley2012-02-011-0/+85
| | | | | | | | | | | | | | | Add SE Android support for init and ueventd. init: - Load policy at boot. - Set the security context for service daemons and their sockets. - New built-in commands: setcon, setenforce, restorecon, setsebool. - New option for services: seclabel. ueventd: - Set the security context for device directories and nodes. Change-Id: I98ed752cde503c94d99dfa5b5a47e3c33db16aac
* init: use init's property expansion code for setprop/writeDima Zavin2012-01-111-28/+16
| | | | | Change-Id: I3c284860cc8d5106ac2b086e62baeb6263873935 Signed-off-by: Dima Zavin <dima@android.com>
* init/cutils: move kernel logging interface to libcutils from initDima Zavin2011-09-021-1/+1
| | | | | Change-Id: Ia0f91b1fcd6cae69d76bf3dd841340958db938a8 Signed-off-by: Dima Zavin <dima@android.com>
* init: make "mkdir" work even when the directory already exists.Chia-chi Yeh2011-07-081-1/+7
| | | | | | | This allows us to change permissions and ownerships of directories in init scripts without adding additional commands. Change-Id: I1815d6015953035251b98f28c0f3efd3c7f25f80
* init: Add support for assigning system properties to system properties in ↵Mike Lockwood2011-06-091-3/+20
| | | | | | | | | | init.rc For example: setprop sys.usb.config $persist.sys.usb.config Change-Id: I7b4e1ed1335906b32621bd96a341b0f94bbee7f5 Signed-off-by: Mike Lockwood <lockwood@android.com>
* init: Fix the init.rc import commandMike Lockwood2011-06-091-5/+0
| | | | | Change-Id: I8a91c3f7d1ca31e137d9043bb7f56e4a44fb63df Signed-off-by: Mike Lockwood <lockwood@android.com>
* init: Add support for writing system property value to a file in init.rcMike Lockwood2011-06-091-1/+17
| | | | | | | | | | | | | | | The write command will write a property value if the value starts with a "$' For example: write /sys/class/android_usb/iSerial $ro.serialno Use double leading '$' if you need to write a string that starts with '$': write /data/foo $$hello to write "$hello" to /data/foo Change-Id: I55431ac7715a5347bb95c3a15aee97c575444dde
* Teach the mount command in init to not consider a wiped partition to be ↵Ken Sumrall2011-05-261-2/+5
| | | | | | encrypted. Change-Id: I3e989f0b81ec35084baddc04e014406f4d90ce04
* Load the persistent properties after decrypting the /data partitionKen Sumrall2011-03-101-1/+10
| | | | | | | | | | | | Fix for bug 3415286. The persistent properties are normally read early in the boot process after /data is mounted. However, for an encrypted system, at that point /data is a tmpfs ramdisk. This change adds a new command to init (load_persist_props) to read the persistent properties, and adds an action to init.rc to load the persistent properties. This action is triggered by setting a property in vold, but that's in a different CL. Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
* Fix for bug 3379244, non-eMMC devices don't start all services.Ken Sumrall2011-02-171-9/+21
| | | | | | | Fix for non-eMMC based devices to properly start the "on nonencrypted" action. Change-Id: I5d2966db352b02f1a1724fb105e1cefc46037e42
* Add the commands rm and rmdir to init.Ken Sumrall2011-01-181-0/+10
| | | | | | | rm only removes a single non-directory directory entry (no -r support) rmdir removes a single empty directory Change-Id: I49702b02ba98a177027b126268c2c2846f968195
* Set a read-only property to indicate if the device is running encrypted.Ken Sumrall2011-01-141-0/+2
| | | | | | | The UI needs to know if the device is running with an encrypted filesystem or now. So set a read-only property at boot to let it know. Change-Id: I753de2d606c975bcbe9946d10fd47558cf357dac
* Changes to init to support encrypted filesystems.Ken Sumrall2010-12-181-1/+51
| | | | | | | | | These are the changes to init and init.rc necessary to support booting with and encrypted /data filesystem. A corresponding change to init.<device>.rc goes along with this change. Change-Id: I0c7e2cc39568358014a82e317735c0eae14dd683
* init: Move uevent handling to an external ueventd processColin Cross2010-04-211-27/+0
| | | | Change-Id: Iea6c56013062ade633a1754f7bcf8cf09b3dedc1
* init: Split parser into generic parser and init parserColin Cross2010-04-211-2/+2
| | | | Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
* init: Add wait command and mount wait flagColin Cross2010-04-211-3/+20
| | | | Change-Id: I6b4c10f8f246095a7fb7342388ec4f6ff97d5733
* init: Move list and log handling to list.h and log.hColin Cross2010-04-211-0/+1
| | | | Change-Id: I298f575c590d0f28b7ad78747f3ebdbba56b7a27
* init: Handle commands in event queue loopColin Cross2010-04-161-1/+0
| | | | Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
* init: Move prototypes for util.c into util.hColin Cross2010-04-131-0/+1
| | | | Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24
* init: Move parser prototypes to parser.hColin Cross2010-04-131-0/+1
| | | | Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41
* am 4833d9f4: init: builtins: trancate target file in do_copyTom Zhu2009-09-301-1/+1
|\ | | | | | | | | | | | | Merge commit '4833d9f4986d6dafacff841beb3bf93172c84bdc' into eclair-plus-aosp * commit '4833d9f4986d6dafacff841beb3bf93172c84bdc': init: builtins: trancate target file in do_copy
| * init: builtins: trancate target file in do_copyTom Zhu2009-09-301-1/+1
| | | | | | | | | | | | | | | | add O_TRUNC flag in open(), which will truncate the target file, otherwise, copy will keep the old content of the target file. Signed-off-by: Tom Zhu <ling.zhu@motorola.com> Signed-off-by: San Mehat <san@google.com>
* | merge from open-source masterJean-Baptiste Queru2009-09-011-1/+15
|\ \ | |/ |/|
| * added chdir/chroot commands to init for mount switching/pivotingJay Freeman (saurik)2009-08-271-0/+12
| |
| * Trivial implementation of init's import command.Jay Freeman (saurik)2009-08-271-1/+1
| |
| * completed implementation of "trigger" for initJay Freeman (saurik)2009-08-251-0/+2
| |
| * Merge korg/donut into korg/masterJean-Baptiste Queru2009-07-251-3/+3
| |\
* | | init: builtins: Add 'copy' command to init.rc parserSan Mehat2009-08-261-0/+62
| | | | | | | | | | | | Signed-off-by: San Mehat <san@google.com>
* | | init now returns proper error codes in dmesg for write command (init.rc)Mike Chan2009-06-291-2/+2
| | | | | | | | | | | | Signed-off-by: Mike Chan <mike@android.com>
* | | resolved conflicts w/ f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 merge...San Mehat2009-05-201-3/+3
|\ \ \ | |/ / |/| / | |/
| * init: Add the ability to start services with dynamic arguments.San Mehat2009-05-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To add arguments dynamically to a service, start the service like so: setprop ctl.start service_to_run:arg1 arg2 arg3... To start a service with *no* dynamic arguments, start the service normally: setprop ctl.start service_to_run Dynamic arguments are only supported on 'oneshot' services Signed-off-by: San Mehat <san@google.com>
| * auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+442
| |