From 5093e6187da9c237c88383540f544c8dbaf37754 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Wed, 12 Feb 2014 09:43:08 -0500 Subject: [PATCH] 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 --- VolumeManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 40f58fa..757fae7 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -616,7 +616,7 @@ int VolumeManager::fixupAsecPermissions(const char *id, gid_t gid, const char* f result |= fchmod(fd, privateFile ? 0640 : 0644); } - if (selinux_android_restorecon(ftsent->fts_path) < 0) { + if (selinux_android_restorecon(ftsent->fts_path, 0) < 0) { SLOGE("restorecon failed for %s: %s\n", ftsent->fts_path, strerror(errno)); result |= -1; }