From 16d1cce8ffe632c1283375beb4c82c67c43e13dd Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Fri, 13 Mar 2015 14:09:26 -0400 Subject: Drop unusable SELinux APIs. setSELinuxEnforce is not allowed by policy. get/setBooleanValue and getBooleanNames are moot since SELinux policy booleans are forbidden by CTS. Change-Id: I512953edd1c38828efce698ae8475603775c32e8 Signed-off-by: Stephen Smalley --- core/java/android/os/SELinux.java | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'core/java') diff --git a/core/java/android/os/SELinux.java b/core/java/android/os/SELinux.java index 84aa427..2773da5 100644 --- a/core/java/android/os/SELinux.java +++ b/core/java/android/os/SELinux.java @@ -50,13 +50,6 @@ public class SELinux { public static final native boolean isSELinuxEnforced(); /** - * Set whether SELinux is permissive or enforcing. - * @param value representing whether to set SELinux to enforcing - * @return a boolean representing whether the desired mode was set - */ - public static final native boolean setSELinuxEnforce(boolean value); - - /** * Sets the security context for newly created file objects. * @param context a security context given as a String. * @return a boolean indicating whether the operation succeeded. @@ -99,27 +92,6 @@ public class SELinux { public static final native String getPidContext(int pid); /** - * Gets a list of the SELinux boolean names. - * @return an array of strings containing the SELinux boolean names. - */ - public static final native String[] getBooleanNames(); - - /** - * Gets the value for the given SELinux boolean name. - * @param name The name of the SELinux boolean. - * @return a boolean indicating whether the SELinux boolean is set. - */ - public static final native boolean getBooleanValue(String name); - - /** - * Sets the value for the given SELinux boolean name. - * @param name The name of the SELinux boolean. - * @param value The new value of the SELinux boolean. - * @return a boolean indicating whether or not the operation succeeded. - */ - public static final native boolean setBooleanValue(String name, boolean value); - - /** * Check permissions between two security contexts. * @param scon The source or subject security context. * @param tcon The target or object security context. -- cgit v1.1