summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2014-02-07 09:14:13 -0500
committerStephen Smalley <sds@tycho.nsa.gov>2014-02-07 09:38:32 -0500
commit27a93650c0df02e4cd3c48bbec8acee8b817a012 (patch)
tree5e44f37904161863c288b4c4734d7dabd3b3b94c /init
parent71de56a08cac3353334c2253748fdf8c37ec4aa1 (diff)
downloadsystem_core-27a93650c0df02e4cd3c48bbec8acee8b817a012.tar.gz
system_core-27a93650c0df02e4cd3c48bbec8acee8b817a012.tar.bz2
system_core-27a93650c0df02e4cd3c48bbec8acee8b817a012.zip
Convert all selinux_android_restorecon and _setfilecon calls to new API.
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>
Diffstat (limited to 'init')
-rw-r--r--init/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init/util.c b/init/util.c
index e772342b8..0f69e1c5f 100644
--- a/init/util.c
+++ b/init/util.c
@@ -527,10 +527,10 @@ int make_dir(const char *path, mode_t mode)
int restorecon(const char* pathname)
{
- return selinux_android_restorecon(pathname);
+ return selinux_android_restorecon(pathname, 0);
}
int restorecon_recursive(const char* pathname)
{
- return selinux_android_restorecon_recursive(pathname);
+ return selinux_android_restorecon(pathname, SELINUX_ANDROID_RESTORECON_RECURSE);
}