summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bires <jbires@google.com>2019-11-19 17:51:41 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-19 17:51:41 -0800
commitc8c38ccaa407148383139748519617926d0ed854 (patch)
tree728d5b42fb773b2de29f079fa570778fae6b26af
parent3f2b9f1d9ce569fe73725c116fee920e3455f4ab (diff)
parent5a053ab455925e4c44aba43ab83a2d21d398e3b2 (diff)
downloadsecurity-c8c38ccaa407148383139748519617926d0ed854.tar.gz
Merge "Removing unused function reset()"
am: 5a053ab455 Change-Id: Ib421e5832dcce144913c0afe3e0eae58f2bfcc28
-rw-r--r--keystore/binder/android/security/keystore/IKeystoreService.aidl2
-rw-r--r--keystore/key_store_service.cpp12
-rw-r--r--keystore/key_store_service.h1
-rw-r--r--keystore/keystore_cli.cpp17
4 files changed, 0 insertions, 32 deletions
diff --git a/keystore/binder/android/security/keystore/IKeystoreService.aidl b/keystore/binder/android/security/keystore/IKeystoreService.aidl
index 3071fe54..f2300436 100644
--- a/keystore/binder/android/security/keystore/IKeystoreService.aidl
+++ b/keystore/binder/android/security/keystore/IKeystoreService.aidl
@@ -41,8 +41,6 @@ interface IKeystoreService {
int exist(String name, int uid);
@UnsupportedAppUsage
String[] list(String namePrefix, int uid);
- @UnsupportedAppUsage
- int reset();
int onUserPasswordChanged(int userId, String newPassword);
int lock(int userId);
int unlock(int userId, String userPassword);
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp
index 9a93b459..5adc199d 100644
--- a/keystore/key_store_service.cpp
+++ b/keystore/key_store_service.cpp
@@ -339,18 +339,6 @@ Status KeyStoreService::listUidsOfAuthBoundKeys(std::vector<std::string>* uidsOu
return Status::ok();
}
-Status KeyStoreService::reset(int32_t* aidl_return) {
- if (!checkBinderPermission(P_RESET)) {
- *aidl_return = static_cast<int32_t>(ResponseCode::PERMISSION_DENIED);
- return Status::ok();
- }
-
- uid_t callingUid = IPCThreadState::self()->getCallingUid();
- mKeyStore->resetUser(get_user_id(callingUid), false);
- *aidl_return = static_cast<int32_t>(ResponseCode::NO_ERROR);
- return Status::ok();
-}
-
Status KeyStoreService::onUserPasswordChanged(int32_t userId, const String16& password,
int32_t* aidl_return) {
if (!checkBinderPermission(P_PASSWORD)) {
diff --git a/keystore/key_store_service.h b/keystore/key_store_service.h
index 5ebd2386..a395e6c2 100644
--- a/keystore/key_store_service.h
+++ b/keystore/key_store_service.h
@@ -66,7 +66,6 @@ class KeyStoreService : public android::security::keystore::BnKeystoreService {
::android::binder::Status listUidsOfAuthBoundKeys(std::vector<::std::string>* uids,
int32_t* _aidl_return) override;
- ::android::binder::Status reset(int32_t* _aidl_return) override;
::android::binder::Status onUserPasswordChanged(int32_t userId,
const ::android::String16& newPassword,
int32_t* _aidl_return) override;
diff --git a/keystore/keystore_cli.cpp b/keystore/keystore_cli.cpp
index 2705a194..428a9bc1 100644
--- a/keystore/keystore_cli.cpp
+++ b/keystore/keystore_cli.cpp
@@ -47,21 +47,6 @@ static const char* responses[] = {
/* [WRONG_PASSWORD + 3] = */ "Wrong password (4 tries left)",
};
-#define NO_ARG_INT_RETURN(cmd) \
- do { \
- if (strcmp(argv[1], #cmd) == 0) { \
- int32_t ret = -1; \
- service->cmd(&ret); \
- if (ret < 0) { \
- fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
- return 1; \
- } else { \
- printf(#cmd ": %s (%d)\n", responses[ret], ret); \
- return 0; \
- } \
- } \
- } while (0)
-
#define SINGLE_ARG_INT_RETURN(cmd) \
do { \
if (strcmp(argv[1], #cmd) == 0) { \
@@ -242,8 +227,6 @@ int main(int argc, char* argv[])
argc < 4 ? -1 : atoi(argv[3]));
}
- NO_ARG_INT_RETURN(reset);
-
// TODO: notifyUserPasswordChanged
SINGLE_INT_ARG_INT_RETURN(lock);