Searched refs:uid (Results 1 - 25 of 54) sorted by relevance

123

/system/core/libcutils/
H A Dmultiuser.c19 userid_t multiuser_get_user_id(uid_t uid) { argument
20 return uid / MULTIUSER_APP_PER_USER_RANGE;
23 appid_t multiuser_get_app_id(uid_t uid) { argument
24 return uid % MULTIUSER_APP_PER_USER_RANGE;
H A Dsockets.c37 if ((cr.uid != AID_ROOT) && (cr.uid != AID_SHELL)) {
38 ALOGE("untrusted userid on other end of socket: userid %d\n", cr.uid);
H A Dqtaguid.c99 int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { argument
106 snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
108 ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
112 ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
113 sockfd, kTag, tag, uid, res);
134 int qtaguid_setCounterSet(int counterSetNum, uid_t uid) { argument
138 ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
140 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid);
145 qtaguid_deleteTagData(int tag, uid_t uid) argument
[all...]
/system/core/include/cutils/
H A Dqtaguid.h31 extern int qtaguid_tagSocket(int sockfd, int tag, uid_t uid);
39 * For the given uid, switch counter sets.
43 extern int qtaguid_setCounterSet(int counterSetNum, uid_t uid);
46 * Delete all tag info that relates to the given tag an uid.
47 * If the tag is 0, then ALL info about the uid is freeded.
54 extern int qtaguid_deleteTagData(int tag, uid_t uid);
H A Dmultiuser.h33 extern userid_t multiuser_get_user_id(uid_t uid);
34 extern appid_t multiuser_get_app_id(uid_t uid);
H A Duevent.h29 ssize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid);
H A Dfs.h44 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid);
/system/core/run-as/
H A Dpackage.h30 uid_t uid; member in struct:__anon238
40 extern int check_data_path(const char* dataDir, uid_t uid);
H A Drun-as.c46 * until the uid/gid has been dropped to that of a normal user
111 int myuid, uid, gid; local
132 if (info.uid < AID_APP) {
144 if (check_data_path(info.dataDir, info.uid) < 0) {
152 uid = gid = info.uid;
153 if(setresgid(gid,gid,gid) || setresuid(uid,uid,uid)) {
158 if (selinux_android_setcontext(uid,
[all...]
H A Dpackage.c29 * the run-as command has dropped the uid/gid. Hence be very
160 * - is owned by a given uid/gid
168 check_directory_ownership(const char* path, uid_t uid) argument
184 /* must be owned by specific uid/gid */
185 if (st.st_uid != uid || st.st_gid != uid)
208 check_data_path(const char* dataPath, uid_t uid) argument
259 * directory is owned by the application uid
261 if (check_directory_ownership(dataPath, uid) < 0)
432 info->uid
463 int uid, debugFlag; local
[all...]
/system/extras/su/
H A Dsu.c35 void pwtoid(const char *tok, uid_t *uid, gid_t *gid) argument
40 if (uid) *uid = pw->pw_uid;
44 if (uid) *uid = tmpid;
49 void extract_uidgids(const char *uidgids, uid_t *uid, gid_t *gid, gid_t *gids, argument
58 *gid = *uid = 0;
66 pwtoid(tok, uid, gid);
96 * su [uid[,gid[,group1]...] [cmd]]
100 * uid
105 uid_t uid, myuid; local
[all...]
/system/core/init/
H A Ddevices.h25 mode_t perm, unsigned int uid,
H A Dproperty_service.c62 unsigned int uid; member in struct:__anon141
106 unsigned int uid; member in struct:__anon142
198 * Returns 1 if uid allowed, 0 otherwise.
200 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) { argument
203 if (uid == AID_SYSTEM || uid == AID_ROOT)
209 if ((uid && control_perms[i].uid == uid) ||
220 * Returns 1 if uid allowe
222 check_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) argument
[all...]
/system/core/libsysutils/src/
H A DNetlinkListener.cpp48 uid_t uid = -1; local
51 socket, mBuffer, sizeof(mBuffer), &uid));
53 if (uid > 0)
54 LOG_EVENT_INT(65537, uid);
/system/core/toolbox/
H A Dchown.c33 // Lookup uid (and gid if specified)
36 uid_t uid; local
41 uid = pw->pw_uid;
44 uid = (int) strtoul(user, &endptr, 0);
66 if (chown(argv[i], uid, gid) < 0) {
H A Did.c9 static void print_uid(uid_t uid) argument
11 struct passwd *pw = getpwuid(uid);
14 printf("%d(%s)", uid, pw->pw_name);
16 printf("%d",uid);
39 printf("uid=");
/system/extras/ext4_utils/
H A Dcontents.h28 u16 uid; member in struct:dentry
40 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
/system/security/keystore/include/keystore/
H A DIKeystoreService.h76 virtual int32_t insert(const String16& name, const uint8_t* item, size_t itemLength, int uid,
79 virtual int32_t del(const String16& name, int uid) = 0;
81 virtual int32_t exist(const String16& name, int uid) = 0;
83 virtual int32_t saw(const String16& name, int uid, Vector<String16>* matches) = 0;
95 virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize,
98 virtual int32_t import(const String16& name, const uint8_t* data, size_t length, int uid,
109 virtual int32_t del_key(const String16& name, int uid) = 0;
122 virtual int32_t clear_uid(int64_t uid) = 0;
/system/extras/tests/fstest/
H A Dperm_checker.c78 printf("# ERROR # Invalid uid '%s' reading line %d\n", str, line_num);
200 static void print_new_rule(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
205 pw = getpwuid(uid);
206 printf("%s %4o %4o %s %d %s %d\n", name, mode, mode, pw->pw_name, uid,
211 static int pass_rule(const perm_rule_t *pr, mode_t mode, uid_t uid, gid_t gid) argument
216 (pr->min_uid <= uid) && (pr->max_uid >= uid))
223 static int validate_file(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
232 if (!pass_rule(pr, mode, uid, gid))
245 print_new_rule(name, mode, uid, gi
284 validate_link(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
312 validate_dir(const char *name, mode_t mode, uid_t uid, gid_t gid) argument
[all...]
/system/security/keystore/
H A Dkeystore_cli.cpp83 fprintf(stderr, "Usage: %s " #cmd " <name> <uid>\n", argv[0]); \
86 int uid = -1; \
88 uid = atoi(argv[3]); \
89 fprintf(stderr, "Running as uid %d\n", uid); \
91 int32_t ret = service->cmd(String16(argv[2]), uid); \
148 static int saw(sp<IKeystoreService> service, const String16& name, int uid) { argument
150 int32_t ret = service->saw(name, uid, &matches);
H A DIKeystoreService.cpp107 virtual int32_t insert(const String16& name, const uint8_t* item, size_t itemLength, int uid, argument
116 data.writeInt32(uid);
132 virtual int32_t del(const String16& name, int uid) argument
137 data.writeInt32(uid);
152 virtual int32_t exist(const String16& name, int uid) argument
157 data.writeInt32(uid);
172 virtual int32_t saw(const String16& name, int uid, Vector<String16>* matches) argument
177 data.writeInt32(uid);
288 virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize, argument
294 data.writeInt32(uid);
320 import(const String16& name, const uint8_t* key, size_t keyLength, int uid, int flags) argument
443 del_key(const String16& name, int uid) argument
564 clear_uid(int64_t uid) argument
627 int uid = data.readInt32(); local
637 int uid = data.readInt32(); local
646 int uid = data.readInt32(); local
655 int uid = data.readInt32(); local
707 int32_t uid = data.readInt32(); local
740 int uid = data.readInt32(); local
819 int uid = data.readInt32(); local
872 int64_t uid = data.readInt64(); local
[all...]
/system/netd/
H A DUidMarkMap.cpp57 int UidMarkMap::getMark(int uid) { argument
62 if (entry->uid_start <= uid && entry->uid_end >= uid) {
H A DDnsProxyListener.cpp56 uid_t uid,
64 mUid(uid),
134 //fall back to the per uid interface if no per pid interface exists
216 uid_t uid = cli->getUid(); local
232 pid, uid);
237 new DnsProxyListener::GetAddrInfoHandler(cli, name, service, hints, iface, pid, uid,
238 mUidMarkMap->getMark(uid));
269 uid_t uid = cli->getUid(); local
288 new DnsProxyListener::GetHostByNameHandler(cli, pid, uid, iface, name, af,
289 mUidMarkMap->getMark(uid));
50 GetAddrInfoHandler(SocketClient *c, char* host, char* service, struct addrinfo* hints, char* iface, pid_t pid, uid_t uid, int mark) argument
295 GetHostByNameHandler(SocketClient* c, pid_t pid, uid_t uid, char* iface, char* name, int af, int mark) argument
397 uid_t uid = cli->getUid(); local
428 GetHostByAddrHandler(SocketClient* c, void* address, int addressLen, int addressFamily, char* iface, pid_t pid, uid_t uid, int mark) argument
[all...]
H A DUidMarkMap.h29 int getMark(int uid);
/system/core/include/private/
H A Dandroid_filesystem_config.h103 #define AID_USER 100000 /* offset for uid ranges for each user */
177 unsigned uid; member in struct:fs_path_config
234 /* the following file is INTENTIONALLY set-gid and not set-uid.
238 /* the following five files are INTENTIONALLY set-uid, but they
265 unsigned *uid, unsigned *gid, unsigned *mode, uint64_t *capabilities)
290 *uid = pc->uid;
297 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
264 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode, uint64_t *capabilities) argument

Completed in 243 milliseconds

123