From 558d8f4364c87e7ba34ef4c127654cdd9e049072 Mon Sep 17 00:00:00 2001 From: Paul Crowley Date: Wed, 20 Jan 2016 11:20:23 +0000 Subject: [PATCH] Remove no-longer-needed crypto init builtins Changes to the way FBE works to support lifecycles mean that these commands aren't needed any more. Bug: 22358539 Change-Id: Id73339e0aa8070dd688f35b5d59de75236961395 --- init/builtins.cpp | 18 ------------------ rootdir/init.rc | 3 --- 2 files changed, 21 deletions(-) diff --git a/init/builtins.cpp b/init/builtins.cpp index 719178929..a81d06d49 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -871,22 +871,6 @@ static int do_installkey(const std::vector& args) { do_installkeys_ensure_dir_exists); } -static int do_setusercryptopolicies(const std::vector& args) { - if (!is_file_crypto()) { - return 0; - } - return e4crypt_set_user_crypto_policies(args[1].c_str()); -} - -static int do_createuserkey(const std::vector& args) { - if (!is_file_crypto()) { - return 0; - } - return e4crypt_create_user_key(atoi(args[1].c_str()), - atoi(args[2].c_str()), - atoi(args[3].c_str())); -} - BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { constexpr std::size_t kMax = std::numeric_limits::max(); static const Map builtin_functions = { @@ -897,7 +881,6 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"class_start", {1, 1, do_class_start}}, {"class_stop", {1, 1, do_class_stop}}, {"copy", {2, 2, do_copy}}, - {"createuserkey", {3, 3, do_createuserkey}}, {"domainname", {1, 1, do_domainname}}, {"enable", {1, 1, do_enable}}, {"exec", {1, kMax, do_exec}}, @@ -920,7 +903,6 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"rmdir", {1, 1, do_rmdir}}, {"setprop", {2, 2, do_setprop}}, {"setrlimit", {3, 3, do_setrlimit}}, - {"setusercryptopolicies", {1, 1, do_setusercryptopolicies}}, {"start", {1, 1, do_start}}, {"stop", {1, 1, do_stop}}, {"swapon_all", {1, 1, do_swapon_all}}, diff --git a/rootdir/init.rc b/rootdir/init.rc index b5a905b76..a83972937 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -408,9 +408,6 @@ on post-fs-data symlink /data/data /data/user/0 - setusercryptopolicies /data/user - createuserkey 0 0 0 - # Reload policy from /data/security if present. setprop selinux.reload_policy 1