Fix create_user_key to take 3 params

Change-Id: Ied03e2ee404a1b4f386740213e6ab01f18ec09b9
This commit is contained in:
Paul Lawrence 2015-12-09 15:45:41 -08:00
parent 395039f007
commit ff9097f560
3 changed files with 5 additions and 3 deletions

View file

@ -366,7 +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]) != 0));
e4crypt_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]

View file

@ -663,7 +663,7 @@ int e4crypt_set_user_crypto_policies(const char *dir)
return 0;
}
int e4crypt_create_user_key(userid_t user_id, bool ephemeral) {
int e4crypt_create_user_key(userid_t user_id, int serial, bool ephemeral) {
SLOGD("e4crypt_create_user_key(%d)", user_id);
// TODO: create second key for user_de data
if (e4crypt_get_key(

View file

@ -38,7 +38,7 @@ int e4crypt_set_field(const char* path, const char* fieldname,
const char* value);
int e4crypt_set_user_crypto_policies(const char *path);
int e4crypt_create_user_key(userid_t user_id, bool ephemeral);
int e4crypt_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);