Searched defs:uid (Results 1 - 25 of 37) sorted by relevance

12

/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 Dfs.c40 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
57 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
76 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) {
77 ALOGE("Failed to chown(%s, %d, %d): %s", path, uid, gid, strerror(errno));
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/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/run-as/
H A Dpackage.h30 uid_t uid; member in struct:__anon240
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/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=");
H A Dls.c78 static void user2str(unsigned uid, char *out) argument
80 struct passwd *pw = getpwuid(uid);
84 sprintf(out, "%d", 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);
H A Dcontents.c237 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument
245 inode->i_uid = uid;
/system/netd/
H A DUidMarkMap.cpp57 int UidMarkMap::getMark(int uid) { argument
62 if (entry->uid_start <= uid && entry->uid_end >= uid) {
H A DFirewallController.cpp132 int FirewallController::setUidRule(int uid, FirewallRule rule) { argument
134 sprintf(uidStr, "%d", uid);
144 res |= execIptables(V4V6, op, LOCAL_INPUT, "-m", "owner", "--uid-owner", uidStr,
146 res |= execIptables(V4V6, op, LOCAL_OUTPUT, "-m", "owner", "--uid-owner", uidStr,
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...]
/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/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);
/system/core/init/
H A Dueventd.c116 uid_t uid; local
166 ERROR("invalid uid '%s'\n", args[2]);
170 uid = ret;
180 add_dev_perms(name, attr, perm, uid, gid, prefix);
H A Dinit.h55 uid_t uid; member in struct:socketinfo
94 uid_t uid; member in struct:service
H A Dproperty_service.c62 unsigned int uid; member in struct:__anon142
106 unsigned int uid; member in struct:__anon143
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...]
H A Dutil.c44 * android_name_to_id - returns the integer uid/gid associated with the given
62 * numeric or name representation, into the integer uid or gid. Returns -1U on
87 int create_socket(const char *name, int type, mode_t perm, uid_t uid, gid_t gid) argument
126 chown(addr.sun_path, uid, gid);
130 addr.sun_path, perm, uid, gid);
/system/core/cpio/
H A Dmkbootfs.c40 int uid, gid, mode; member in struct:fs_config_entry
45 /* Each line in the canned file should be a path plus three ints (uid,
60 // Use the list of file uid/gid/modes loaded from the file
70 s->st_uid = p->uid;
76 s->st_uid = empty_path_config->uid;
303 cc->uid = atoi(strtok(line, " \n"));
306 cc->uid = atoi(strtok(NULL, " \n"));
/system/extras/tests/iptables/qtaguid/
H A DsocketTag.cpp43 bool checkTag(uint64_t tag, uid_t uid);
124 * tag + uid. But it is not fool proof.
129 bool SockInfo::checkTag(uint64_t acct_tag, uid_t uid) { argument
154 asprintf(&match_template, "sock=%lx %s", addr, "tag=0x%llx (uid=%u)");
158 asprintf(&match_template, "%s", " tag=0x%llx (uid=%u)");
161 full_tag = acct_tag | uid;
163 asprintf(&buff, match_template, full_tag | uid, uid);
170 "sock=%lx tag=0x%llx (uid=%lu) pid=%u f_count=%lu",
172 if (!(res == 5 && k_tag == full_tag && k_uid == uid)) {
[all...]
/system/core/debuggerd/
H A Ddebuggerd.c55 uid_t uid, gid; member in struct:__anon21
207 LOG("timed out reading tid (from pid=%d uid=%d)\n", cr.pid, cr.uid);
215 LOG("read failure? %s (pid=%d uid=%d)\n",
216 strerror(errno), cr.pid, cr.uid);
222 LOG("invalid crash request of size %d (from pid=%d uid=%d)\n",
223 status, cr.pid, cr.uid);
230 out_request->uid = cr.uid;
244 } else if (cr.uid
[all...]
/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 4683 milliseconds

12