Commit 60898896 authored by Kenny Root's avatar Kenny Root
Browse files

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 360f51f7)

Bug: 8634328
Change-Id: I6bb9f66687552af990fdf90501f183930910ba8d
parent 1223495e
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment