summaryrefslogtreecommitdiffstats
path: root/init/util.h
Commit message (Collapse)AuthorAgeFilesLines
* am 0cbaed42: am a8ba1f2f: Merge "Add support for socket security context ↵Colin Cross2013-08-231-1/+1
|\ | | | | | | | | | | | | specification." * commit '0cbaed4211b514dd2aaa4d28f8936ba58e83c6a5': Add support for socket security context specification.
| * Add support for socket security context specification.Stephen Smalley2013-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an optional argument to the socket option for specifying a SELinux security context for the socket. Normally the socket security context is automatically computed from the service security context or set using the seclabel option, but this facility allows dealing with two scenarios that cannot be addressed using the existing mechanisms: 1) Use of logwrapper to wrap a service. In this case, init cannot determine the service security context as it does not directly execute it and we do not want logwrapper to run in the same domain as the service. 2) Situations where a service has multiple sockets and we want to label them distinctly. Change-Id: I7ae9088c326a2140e56a8044bfb21a91505aea11 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | init: call restorecon on /sysNick Kralevich2013-07-151-0/+1
|/ | | | | | Not all files on /sys are not getting labeled properly. Fix them. Change-Id: I9dcff76354e7f50d41f1b6e702836cfbbc149278
* Set the SELinux security label on new directories.Stephen Smalley2012-07-261-0/+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>
* Pick up on androidboot.hardware kernel cmd optionVladimir Chtchetkine2011-09-281-0/+1
| | | | | | | x86 emulator passes hardware name through the androidboot.hardware kernel cmd option, and ueventd must pick up on it to locate proper ueventd.rc file for that hardware. Change-Id: Id61c5b67fe6275a15c7aa62556e0b89eda7968f8
* init: Add ueventd.rc parsing to ueventdColin Cross2010-04-211-0/+2
| | | | Change-Id: Iea53050d6c10e8cabf563e5d80e84eaf78873695
* init: Move uevent handling to an external ueventd processColin Cross2010-04-211-0/+7
| | | | Change-Id: Iea6c56013062ade633a1754f7bcf8cf09b3dedc1
* init: Add wait command and mount wait flagColin Cross2010-04-211-0/+1
| | | | Change-Id: I6b4c10f8f246095a7fb7342388ec4f6ff97d5733
* init: create symlinks to block device nodesColin Cross2010-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | eMMC block device names may change based on the detection order of the eMMC device and any other SD bus devices, such as a removable SD card. This patch adds support to init for: * Symlinks to block devices. When a block device uevent is processed, if it starts with "/devices/platform", the platform driver name is parsed out, and symlinks to the block device are created in /dev/block/platform/<platform driver>/ * Symlinks based on partition name and number. If the uevent for a block device contains information on the partition name or number, symlinks are created under /dev/block/platform/<platform driver>/by-num/p<partition> and /dev/block/platform/<platform driver>/by-name/<partition name> init.rc can then use a device path like the following to mount an eMMC device: /dev/block/platform/<platform>/by-name/system /system ro Change-Id: Id11bb7cdf1e2ada7752a5bd671cbf87237b34ae2
* init: Move prototypes for util.c into util.hColin Cross2010-04-131-0/+27
Change-Id: I46a91849ce5297eb2597dd6134412f817564ec24