summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'gatekeeperd/gatekeeperd.cpp')
-rw-r--r--gatekeeperd/gatekeeperd.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp
index 82aa422dd..a24250464 100644
--- a/gatekeeperd/gatekeeperd.cpp
+++ b/gatekeeperd/gatekeeperd.cpp
@@ -173,6 +173,17 @@ public:
173 return read_sid(uid); 173 return read_sid(uid);
174 } 174 }
175 175
176 virtual void clearSecureUserId(uint32_t uid) {
177 IPCThreadState* ipc = IPCThreadState::self();
178 const int calling_pid = ipc->getCallingPid();
179 const int calling_uid = ipc->getCallingUid();
180 if (!PermissionCache::checkPermission(KEYGUARD_PERMISSION, calling_pid, calling_uid)) {
181 ALOGE("%s: permission denied for [%d:%d]", __func__, calling_pid, calling_uid);
182 return;
183 }
184 store_sid(uid, 0);
185 }
186
176 virtual status_t dump(int fd, const Vector<String16> &) { 187 virtual status_t dump(int fd, const Vector<String16> &) {
177 IPCThreadState* ipc = IPCThreadState::self(); 188 IPCThreadState* ipc = IPCThreadState::self();
178 const int pid = ipc->getCallingPid(); 189 const int pid = ipc->getCallingPid();