Fix create_user_key to take 3 params
Change-Id: Ied03e2ee404a1b4f386740213e6ab01f18ec09b9
diff --git a/CryptCommandListener.cpp b/CryptCommandListener.cpp
index 09bc6c0..b6397f0 100644
--- a/CryptCommandListener.cpp
+++ b/CryptCommandListener.cpp
@@ -366,7 +366,9 @@
} 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]
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index 34f0a46..3f6fbdc 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -663,7 +663,7 @@
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(
diff --git a/Ext4Crypt.h b/Ext4Crypt.h
index ed8bf28..a363d39 100644
--- a/Ext4Crypt.h
+++ b/Ext4Crypt.h
@@ -38,7 +38,7 @@
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);