Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 25 of 113) sorted by relevance

12345

/system/core/gatekeeperd/
Dgatekeeperd.cpp77 void store_sid(uint32_t uid, uint64_t sid) { in store_sid() argument
79 sprintf(filename, "%u", uid); in store_sid()
103 void maybe_store_sid(uint32_t uid, uint64_t sid) { in maybe_store_sid() argument
105 sprintf(filename, "%u", uid); in maybe_store_sid()
107 store_sid(uid, sid); in maybe_store_sid()
111 uint64_t read_sid(uint32_t uid) { in read_sid() argument
114 sprintf(filename, "%u", uid); in read_sid()
122 void clear_sid(uint32_t uid) { in clear_sid() argument
124 sprintf(filename, "%u", uid); in clear_sid()
127 store_sid(uid, 0); in clear_sid()
[all …]
DIGateKeeperService.cpp34 uint32_t uid = data.readInt32(); in onTransact() local
53 int ret = enroll(uid, currentPasswordHandle, currentPasswordHandleSize, in onTransact()
77 uint32_t uid = data.readInt32(); in onTransact() local
89 int ret = verify(uid, (uint8_t *) currentPasswordHandle, in onTransact()
109 uint32_t uid = data.readInt32(); in onTransact() local
125 int ret = verifyChallenge(uid, challenge, (uint8_t *) currentPasswordHandle, in onTransact()
148 uint32_t uid = data.readInt32(); in onTransact() local
149 uint64_t sid = getSecureUserId(uid); in onTransact()
156 uint32_t uid = data.readInt32(); in onTransact() local
157 clearSecureUserId(uid); in onTransact()
DIGateKeeperService.h58 virtual int enroll(uint32_t uid,
72 virtual int verify(uint32_t uid, const uint8_t *enrolled_password_handle,
85 virtual int verifyChallenge(uint32_t uid, uint64_t challenge,
92 virtual uint64_t getSecureUserId(uint32_t uid) = 0;
97 virtual void clearSecureUserId(uint32_t uid) = 0;
/system/core/libprocessgroup/
Dprocessgroup.cpp48 static int convertUidToPath(char *path, size_t size, uid_t uid) in convertUidToPath() argument
53 uid); in convertUidToPath()
56 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) in convertUidPidToPath() argument
61 uid, in convertUidPidToPath()
66 static int initCtx(uid_t uid, int pid, struct ctx *ctx) in initCtx() argument
70 convertUidPidToPath(path, sizeof(path), uid, pid); in initCtx()
112 static pid_t getOneAppProcess(uid_t uid, int appProcessPid, struct ctx *ctx) in getOneAppProcess() argument
115 int ret = initCtx(uid, appProcessPid, ctx); in getOneAppProcess()
149 static int removeProcessGroup(uid_t uid, int pid) in removeProcessGroup() argument
154 convertUidPidToPath(path, sizeof(path), uid, pid); in removeProcessGroup()
[all …]
/system/netd/server/
DNetworkController.h56 uint32_t getNetworkForDns(unsigned* netId, uid_t uid) const;
57 unsigned getNetworkForUser(uid_t uid) const;
58 unsigned getNetworkForConnect(uid_t uid) const;
59 void getNetworkContext(unsigned netId, uid_t uid, struct android_net_context* netcontext) const;
70 Permission getPermissionForUser(uid_t uid) const;
72 int checkUserNetworkAccess(uid_t uid, unsigned netId) const;
85 const char* nexthop, bool legacy, uid_t uid) WARN_UNUSED_RESULT;
87 const char* nexthop, bool legacy, uid_t uid) WARN_UNUSED_RESULT;
89 bool canProtect(uid_t uid) const;
96 VirtualNetwork* getVirtualNetworkForUserLocked(uid_t uid) const;
[all …]
DNetworkController.cpp182 uint32_t NetworkController::getNetworkForDns(unsigned* netId, uid_t uid) const { in getNetworkForDns()
187 if (checkUserNetworkAccessLocked(uid, *netId) == 0) { in getNetworkForDns()
196 VirtualNetwork* virtualNetwork = getVirtualNetworkForUserLocked(uid); in getNetworkForDns()
209 unsigned NetworkController::getNetworkForUser(uid_t uid) const { in getNetworkForUser()
211 if (VirtualNetwork* virtualNetwork = getVirtualNetworkForUserLocked(uid)) { in getNetworkForUser()
231 unsigned NetworkController::getNetworkForConnect(uid_t uid) const { in getNetworkForConnect()
233 VirtualNetwork* virtualNetwork = getVirtualNetworkForUserLocked(uid); in getNetworkForConnect()
241 unsigned netId, uid_t uid, struct android_net_context* netcontext) const { in getNetworkContext() argument
247 .uid = uid, in getNetworkContext()
251 nc.app_netid = getNetworkForConnect(uid); in getNetworkContext()
[all …]
DUidRanges.cpp23 bool UidRanges::hasUid(uid_t uid) const { in hasUid()
24 auto iter = std::lower_bound(mRanges.begin(), mRanges.end(), Range(uid, uid)); in hasUid()
25 return (iter != mRanges.end() && iter->first == uid) || in hasUid()
26 (iter != mRanges.begin() && (--iter)->second >= uid); in hasUid()
DNetlinkHandler.cpp113 const char *uid = evt->findParam("UID"); in onEvent() local
115 notifyStrictCleartext(uid, hex); in onEvent()
121 const char *uid = evt->findParam("UID"); in onEvent() local
124 timestamp, uid); in onEvent()
172 const char *uid) { in notifyInterfaceClassActivity() argument
176 else if (uid != NULL && isActive) in notifyInterfaceClassActivity()
178 "IfaceClass active %s %s %s", name, timestamp, uid); in notifyInterfaceClassActivity()
212 void NetlinkHandler::notifyStrictCleartext(const char* uid, const char* hex) { in notifyStrictCleartext() argument
213 notify(ResponseCode::StrictCleartext, "%s %s", uid, hex); in notifyStrictCleartext()
/system/extras/su/
Dsu.c30 void pwtoid(const char* tok, uid_t* uid, gid_t* gid) { in pwtoid() argument
33 if (uid) *uid = pw->pw_uid; in pwtoid()
40 if (uid) *uid = tmpid; in pwtoid()
45 void extract_uidgids(const char* uidgids, uid_t* uid, gid_t* gid, gid_t* gids, int* gids_count) { in extract_uidgids() argument
52 *gid = *uid = 0; in extract_uidgids()
61 pwtoid(tok, uid, gid); in extract_uidgids()
102 uid_t uid = 0; in main() local
109 extract_uidgids(*argv, &uid, &gid, gids, &gids_count); in main()
119 if (setuid(uid)) error(1, errno, "setuid failed"); in main()
124 struct passwd* pw = getpwuid(uid); in main()
/system/core/libcutils/
Duevent.c34 uid_t uid = -1; in uevent_kernel_multicast_recv() local
35 return uevent_kernel_multicast_uid_recv(socket, buffer, length, &uid); in uevent_kernel_multicast_recv()
47 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid) in uevent_kernel_multicast_uid_recv() argument
49 return uevent_kernel_recv(socket, buffer, length, true, uid); in uevent_kernel_multicast_uid_recv()
52 ssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid) in uevent_kernel_recv() argument
67 *uid = -1; in uevent_kernel_recv()
80 *uid = cred->uid; in uevent_kernel_recv()
81 if (cred->uid != 0) { in uevent_kernel_recv()
Dqtaguid.c100 int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { in qtaguid_tagSocket() argument
107 snprintf(lineBuf, sizeof(lineBuf), "t %d %" PRIu64 " %d", sockfd, kTag, uid); in qtaguid_tagSocket()
109 ALOGV("Tagging socket %d with tag %" PRIx64 "{%u,0} for uid %d", sockfd, kTag, tag, uid); in qtaguid_tagSocket()
114 sockfd, kTag, tag, uid, res); in qtaguid_tagSocket()
135 int qtaguid_setCounterSet(int counterSetNum, uid_t uid) { in qtaguid_setCounterSet() argument
139 ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid); in qtaguid_setCounterSet()
141 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid); in qtaguid_setCounterSet()
146 int qtaguid_deleteTagData(int tag, uid_t uid) { in qtaguid_deleteTagData() argument
151 ALOGV("Deleting tag data with tag %" PRIx64 "{%d,0} for uid %d", kTag, tag, uid); in qtaguid_deleteTagData()
155 snprintf(lineBuf, sizeof(lineBuf), "d %" PRIu64 " %d", kTag, uid); in qtaguid_deleteTagData()
[all …]
Dmultiuser.c19 userid_t multiuser_get_user_id(uid_t uid) { in multiuser_get_user_id() argument
20 return uid / MULTIUSER_APP_PER_USER_RANGE; in multiuser_get_user_id()
23 appid_t multiuser_get_app_id(uid_t uid) { in multiuser_get_app_id() argument
24 return uid % MULTIUSER_APP_PER_USER_RANGE; in multiuser_get_app_id()
Dsockets.c40 if ((cr.uid != AID_ROOT) && (cr.uid != AID_SHELL)) { in socket_peer_is_trusted()
41 ALOGE("untrusted userid on other end of socket: userid %d\n", cr.uid); in socket_peer_is_trusted()
/system/core/logd/
DLogStatistics.h153 const uid_t uid; member
155 UidEntry(LogBufferElement *e):EntryBaseDropped(e),uid(e->getUid()) { } in UidEntry()
157 inline const uid_t&getKey() const { return uid; } in getKey()
166 uid_t uid; member
172 uid(android::pidToUid(p)), in PidEntry()
177 uid(e->getUid()), in PidEntry()
182 uid(c.uid), in PidEntry()
187 const uid_t&getUid() const { return uid; } in getUid()
206 uid = u; in add()
218 uid_t uid; member
[all …]
DLogWhiteBlackList.cpp25 Prune::Prune(uid_t uid, pid_t pid) : mUid(uid), mPid(pid) { in Prune() argument
28 int Prune::cmp(uid_t uid, pid_t pid) const { in cmp() argument
29 if ((mUid == uid_all) || (mUid == uid)) { in cmp()
35 return uid - mUid; in cmp()
115 uid_t uid = Prune::uid_all; in init() local
117 uid = 0; in init()
119 uid = uid * 10 + *str++ - '0'; in init()
134 if ((uid == Prune::uid_all) && (pid == Prune::pid_all)) { in init()
146 int m = uid - p->mUid; in init()
159 list->insert(it, new Prune(uid,pid)); in init()
[all …]
DLogBuffer.h52 uid_t uid, pid_t pid, pid_t tid,
59 void clear(log_id_t id, uid_t uid = AID_ROOT);
64 void formatStatistics(char **strp, uid_t uid, unsigned int logMask);
77 char *uidToName(uid_t uid) { return stats.uidToName(uid); } in uidToName() argument
83 void prune(log_id_t id, unsigned long pruneRows, uid_t uid = AID_ROOT);
DLogCommand.cpp61 uid_t uid = cli->getUid(); in clientHasLogCredentials() local
62 if (uid == AID_ROOT) { in clientHasLogCredentials()
103 if ((uid != u[0]) || (uid != u[1]) || (uid != u[2]) || (uid != u[3])) { in clientHasLogCredentials()
DLogStatistics.cpp137 char *LogStatistics::uidToName(uid_t uid) { in uidToName() argument
139 if (uid == AID_LOGD) { in uidToName()
147 if (info->aid == uid) { in uidToName()
154 uid_t userId = uid % AID_USER; in uidToName()
167 if (entry.getUid() == uid) { in uidToName()
205 void LogStatistics::format(char **buf, uid_t uid, unsigned int logMask) { in format() argument
282 if ((uid != AID_ROOT) && (u != uid)) { in format()
289 if (uid == AID_ROOT) { in format()
345 if ((uid != AID_ROOT) && (u != uid)) { in format()
352 if (uid == AID_ROOT) { in format()
[all …]
/system/core/run-as/
Drun-as.c111 uid_t myuid, uid, gid, userAppId = 0; in main() local
156 if ((UID_MAX - info.uid) / AID_USER < (uid_t)userId) { in main()
161 userAppId = (AID_USER * userId) + info.uid; in main()
181 uid = gid = userAppId; in main()
182 if(setresgid(gid,gid,gid) || setresuid(uid,uid,uid)) { in main()
192 if (selinux_android_setcontext(uid, 0, info.seinfo, pkgname) < 0) { in main()
Dpackage.c173 check_directory_ownership(const char* path, uid_t uid) in check_directory_ownership() argument
190 if (st.st_uid != uid || st.st_gid != uid) in check_directory_ownership()
213 check_data_path(const char* dataPath, uid_t uid) in check_data_path() argument
266 if (check_directory_ownership(dataPath, uid) < 0) in check_data_path()
433 info->uid = 0; in get_package_info()
464 int uid, debugFlag; in get_package_info() local
476 uid = parse_positive_decimal(&p, end); in get_package_info()
477 if (uid < 0) in get_package_info()
480 info->uid = (uid_t) uid; in get_package_info()
/system/extras/ext4_utils/
Dcanned_fs_config.c29 unsigned uid; member
58 p->uid = atoi(strtok(NULL, " ")); in load_canned_fs_config()
84 unsigned* uid, unsigned* gid, unsigned* mode, uint64_t* capabilities) { in canned_fs_config() argument
92 *uid = p->uid; in canned_fs_config()
104 if (c_uid != *uid) printf("%s uid %d %d\n", path, *uid, c_uid); in canned_fs_config()
/system/gatekeeper/
Dgatekeeper.cpp32 uint32_t uid = request.user_id; in Enroll() local
55 if (!GetFailureRecord(uid, user_id, &record, throttle_secure)) { in Enroll()
60 if (ThrottleRequest(uid, timestamp, &record, throttle_secure, response)) return; in Enroll()
62 if (!IncrementFailureRecord(uid, user_id, timestamp, &record, throttle_secure)) { in Enroll()
82 if (ClearFailureRecord(uid, user_id, true)) { in Enroll()
85 ClearFailureRecord(uid, user_id, false); in Enroll()
120 uint32_t uid = request.user_id; in Verify() local
129 if (!GetFailureRecord(uid, user_id, &record, throttle_secure)) { in Verify()
134 if (ThrottleRequest(uid, timestamp, &record, throttle_secure, response)) return; in Verify()
136 if (!IncrementFailureRecord(uid, user_id, timestamp, &record, throttle_secure)) { in Verify()
[all …]
/system/core/libsysutils/src/
DNetlinkListener.cpp48 uid_t uid = -1; in onDataAvailable() local
56 mBuffer, sizeof(mBuffer), require_group, &uid)); in onDataAvailable()
58 if (uid > 0) in onDataAvailable()
59 LOG_EVENT_INT(65537, uid); in onDataAvailable()
/system/core/include/cutils/
Dqtaguid.h31 extern int qtaguid_tagSocket(int sockfd, int tag, uid_t uid);
43 extern int qtaguid_setCounterSet(int counterSetNum, uid_t uid);
54 extern int qtaguid_deleteTagData(int tag, uid_t uid);
/system/core/logcat/
Devent.logtags120 80100 bionic_event_memcpy_buffer_overflow (uid|1)
121 80105 bionic_event_strcat_buffer_overflow (uid|1)
122 80110 bionic_event_memmov_buffer_overflow (uid|1)
123 80115 bionic_event_strncat_buffer_overflow (uid|1)
124 80120 bionic_event_strncpy_buffer_overflow (uid|1)
125 80125 bionic_event_memset_buffer_overflow (uid|1)
126 80130 bionic_event_strcpy_buffer_overflow (uid|1)
128 80200 bionic_event_strcat_integer_overflow (uid|1)
129 80205 bionic_event_strncat_integer_overflow (uid|1)
131 80300 bionic_event_resolver_old_response (uid|1)
[all …]

12345