diff options
author | Chia-chi Yeh <chiachi@android.com> | 2009-09-18 17:23:53 +0800 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2009-09-18 17:23:53 +0800 |
commit | 2f3b2a5aa698c82313551d59f9237a6a7849c300 (patch) | |
tree | 22d114da68d5066b766ea736e09acbf53edc5442 /cmds/keystore/keystore.c | |
parent | b3f93c06cff31f9b1b83ba2c4fc5ae7916754e59 (diff) | |
download | frameworks_native-2f3b2a5aa698c82313551d59f9237a6a7849c300.zip frameworks_native-2f3b2a5aa698c82313551d59f9237a6a7849c300.tar.gz frameworks_native-2f3b2a5aa698c82313551d59f9237a6a7849c300.tar.bz2 |
keystore: switch to multi-user version.
Diffstat (limited to 'cmds/keystore/keystore.c')
-rw-r--r-- | cmds/keystore/keystore.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmds/keystore/keystore.c b/cmds/keystore/keystore.c index 2bcba97..5007891 100644 --- a/cmds/keystore/keystore.c +++ b/cmds/keystore/keystore.c @@ -217,8 +217,10 @@ static int8_t decrypt_blob(char *name, AES_KEY *aes_key) /* Here are the actions. Each of them is a function without arguments. All * information is defined in global variables, which are set properly before * performing an action. The number of parameters required by each action is - * fixed and defined in a table. Note that the lengths of parameters are checked - * when they are received, so boundary checks on parameters are omitted. */ + * fixed and defined in a table. If the return value of an action is positive, + * it will be treated as a response code and transmitted to the client. Note + * that the lengths of parameters are checked when they are received, so + * boundary checks on parameters are omitted. */ #define MAX_PARAM 2 #define MAX_RETRY 4 @@ -321,12 +323,10 @@ static int8_t reset() return SYSTEM_ERROR; } while ((file = readdir(dir)) != NULL) { - if (strcmp(".", file->d_name) || strcmp("..", file->d_name)) { - unlink(file->d_name); - } + unlink(file->d_name); } closedir(dir); - return UNINITIALIZED; + return NO_ERROR; } #define MASTER_KEY_FILE ".masterkey" @@ -387,7 +387,7 @@ static int8_t lock() memset(&encryption_key, 0, sizeof(encryption_key)); memset(&decryption_key, 0, sizeof(decryption_key)); state = LOCKED; - return LOCKED; + return NO_ERROR; } static int8_t unlock() |