Rename functions with a system/extras name collision.

Following around the call graph in code search is hard enough as it is!

Change-Id: I09d3513664423aafe0d99f9158acfbbb6c79b590
gugelfrei
Paul Crowley 9 years ago
parent ff9097f560
commit 27cbce9214

@ -350,7 +350,7 @@ int CryptCommandListener::CryptfsCmd::runCommand(SocketClient *cli,
}
SLOGD("cryptfs setusercryptopolicies");
dumpArgs(argc, argv, -1);
rc = e4crypt_set_user_crypto_policies(argv[2]);
rc = e4crypt_vold_set_user_crypto_policies(argv[2]);
} else if (!strcmp(argv[1], "isConvertibleToFBE")) {
if (argc != 2) {
@ -366,9 +366,9 @@ int CryptCommandListener::CryptfsCmd::runCommand(SocketClient *cli,
} else if (cmd == "create_user_key" && argc > 4) {
// create_user_key [user] [serial] [ephemeral]
return sendGenericOkFail(cli,
e4crypt_create_user_key(atoi(argv[2]),
atoi(argv[3]),
atoi(argv[4]) != 0));
e4crypt_vold_create_user_key(atoi(argv[2]),
atoi(argv[3]),
atoi(argv[4]) != 0));
} else if (cmd == "destroy_user_key" && argc > 2) {
// destroy_user_key [user]

@ -630,12 +630,12 @@ static bool is_numeric(const char *name) {
return true;
}
int e4crypt_set_user_crypto_policies(const char *dir)
int e4crypt_vold_set_user_crypto_policies(const char *dir)
{
if (e4crypt_crypto_complete(DATA_MNT_POINT) != 0) {
return 0;
}
SLOGD("e4crypt_set_user_crypto_policies");
SLOGD("e4crypt_vold_set_user_crypto_policies");
std::unique_ptr<DIR, int(*)(DIR*)> dirp(opendir(dir), closedir);
if (!dirp) {
SLOGE("Unable to read directory %s, error %s\n",
@ -663,8 +663,8 @@ int e4crypt_set_user_crypto_policies(const char *dir)
return 0;
}
int e4crypt_create_user_key(userid_t user_id, int serial, bool ephemeral) {
SLOGD("e4crypt_create_user_key(%d)", user_id);
int e4crypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral) {
SLOGD("e4crypt_vold_create_user_key(%d)", user_id);
// TODO: create second key for user_de data
if (e4crypt_get_key(
get_key_path(DATA_MNT_POINT, user_id), true, ephemeral).empty()) {

@ -36,9 +36,9 @@ int e4crypt_get_field(const char* path, const char* fieldname,
char* value, size_t len);
int e4crypt_set_field(const char* path, const char* fieldname,
const char* value);
int e4crypt_set_user_crypto_policies(const char *path);
int e4crypt_vold_set_user_crypto_policies(const char *path);
int e4crypt_create_user_key(userid_t user_id, int serial, bool ephemeral);
int e4crypt_vold_create_user_key(userid_t user_id, int serial, bool ephemeral);
int e4crypt_destroy_user_key(userid_t user_id);
int e4crypt_unlock_user_key(userid_t user_id, const char* token);

Loading…
Cancel
Save