summaryrefslogtreecommitdiffstats
path: root/toolbox/restorecon.c
Commit message (Collapse)AuthorAgeFilesLines
* Add -D option to restorecon for relabeling /data/data.Stephen Smalley2014-02-181-2/+5
| | | | | | | This depends on change I137588013ed1750315702c0dbe088ce3e4a29e83. Change-Id: I5a4fef9affd6cddf98d72dc9d54899be25741779 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Convert all selinux_android_restorecon and _setfilecon calls to new API.Stephen Smalley2014-02-071-1/+1
| | | | | | | | | | | libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Unify toolbox restorecon and libselinux restorecon implementations.Stephen Smalley2014-02-061-92/+15
| | | | | | | | | | | | | | | | Extend the libselinux restorecon implementation to allow reuse by the toolbox restorecon command. This simply requires adding support for the nochange (-n) and verbose (-v) options to the libselinux functions and rewriting the toolbox restorecon command to use the libselinux functions. Also add a force (-F) option to support forcing a restorecon_recursive even if the restorecon_last attribute matches the current file_contexts hash so that we can continue to force a restorecon via the toolbox command for testing or when we know something else has changed (e.g. for when we support relabeling /data/data and package information has changed). Change-Id: I92bb3259790a7195ba56a5e9555c3b6c76ceb862 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Add support for reloading policy from /data/system.Stephen Smalley2012-08-091-12/+7
| | | | | | | | | | | | | To support runtime policy management, add support for reloading policy from /data/system. This can be triggered by setting the selinux.loadpolicy property to 1, whether from init.rc after mounting /data or from the system_server (e.g. upon invocation of a new device admin API for provisioning policy). ueventd and installd are restarted upon policy reloads to pick up the new policy configurations relevant to their operation. Change-Id: I97479aecef8cec23b32f60e09cc778cc5520b691 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Extend toolbox with SE Android support.Stephen Smalley2012-02-031-0/+141
Add -Z option to ls and ps for displaying security contexts. Modify id to display security context. Add new SELinux commands: chcon, getenforce, getsebool, load_policy, restorecon, runcon, setenforce, setsebool. Change-Id: Ia20941be4a6cd706fe392fed6e38a37d880ec5f1