From 60898896c3f3b2245d10076cac64346c956dbaa5 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Tue, 16 Apr 2013 18:08:03 -0700 Subject: keystore: fix import as other UIDs The targetUid was not being used as the user to store the key as, so it was ending up under the calling UID. This change matches the code for insert and generate now. (cherry picked from commit 360f51f7af191316cd739f229db1c5f7233be063) Bug: 8634328 Change-Id: I6bb9f66687552af990fdf90501f183930910ba8d --- keystore/keystore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp index 5729dbdc..9b08398a 100644 --- a/keystore/keystore.cpp +++ b/keystore/keystore.cpp @@ -1727,7 +1727,7 @@ public: } String8 name8(name); - String8 filename(mKeyStore->getKeyNameForUidWithDir(name8, callingUid)); + String8 filename(mKeyStore->getKeyNameForUidWithDir(name8, targetUid)); return mKeyStore->importKey(data, length, filename.string(), callingUid, flags); } -- cgit v1.2.3