Searched defs:uid (Results 1 - 25 of 33) sorted by last modified time

12

/system/security/keystore/
H A Dkeystore.cpp180 static int encode_key_for_uid(char* out, uid_t uid, const Value* key) { argument
181 int n = snprintf(out, NAME_MAX, "%u_", uid);
441 uint32_t uid; member in struct:__anon570
616 uid_t uid; local
617 if (!convertToUid(uidValue, &uid)) {
621 grant_t *grant = getGrant(filename, uid);
624 grant->uid = uid;
631 uid_t uid; local
632 if (!convertToUid(uidValue, &uid)) {
895 get_key_for_name(KeyStore* keyStore, Blob* keyBlob, const Value* keyName, const uid_t uid, const BlobType type) argument
939 get(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
952 insert(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* val, Value*) argument
960 del(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
971 exist(KeyStore*, int, uid_t uid, Value* keyName, Value*, Value*) argument
980 saw(KeyStore*, int sock, uid_t uid, Value* keyPrefix, Value*, Value*) argument
1052 unlock(KeyStore* keyStore, int sock, uid_t uid, Value* pw, Value* unused, Value* unused2) argument
1061 generate(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
1094 import(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* key, Value*) argument
1114 get_pubkey(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
1149 del_key(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value*, Value*) argument
1180 sign(KeyStore* keyStore, int sock, uid_t uid, Value* keyName, Value* data, Value*) argument
1221 verify(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* data, Value* signature) argument
1253 grant(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* granteeData, Value*) argument
1265 ungrant(KeyStore* keyStore, int, uid_t uid, Value* keyName, Value* granteeData, Value*) argument
1276 getmtime(KeyStore*, int sock, uid_t uid, Value* keyName, Value*, Value*) argument
1363 uid_t uid; member in struct:user
1375 process(KeyStore* keyStore, int sock, uid_t uid, int8_t code) argument
[all...]
/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,
59 // Use the list of file uid/gid/modes loaded from the file
69 s->st_uid = p->uid;
75 s->st_uid = empty_path_config->uid;
302 cc->uid = atoi(strtok(line, " \n"));
305 cc->uid = atoi(strtok(NULL, " \n"));
/system/core/debuggerd/
H A Ddebuggerd.c54 uid_t uid, gid; member in struct:__anon288
223 out_request->uid = cr.uid;
236 } else if (cr.uid == 0
237 || (cr.uid == AID_SYSTEM && msg.action == DEBUGGER_ACTION_DUMP_BACKTRACE)) {
241 &out_request->uid, &out_request->gid);
257 property_get("debug.db.uid", value, "-1");
259 return debug_uid >= 0 && request->uid <= (uid_t)debug_uid;
270 XLOG("BOOM: pid=%d uid=%d gid=%d tid=%d\n",
271 request.pid, request.uid, reques
[all...]
/system/core/include/private/
H A Dandroid_filesystem_config.h89 #define AID_USER 100000 /* offset for uid ranges for each user */
149 unsigned uid; member in struct:fs_path_config
203 /* the following two files are INTENTIONALLY set-gid and not set-uid.
207 /* the following five files are INTENTIONALLY set-uid, but they
215 /* the following file is INTENTIONALLY set-uid, and IS included
232 unsigned *uid, unsigned *gid, unsigned *mode)
253 *uid = pc->uid;
259 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode);
231 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode) argument
/system/core/init/
H A Dbuiltins.c91 static int _chown(const char *path, unsigned int uid, unsigned int gid) argument
101 ret = fchown(fd, uid, gid);
315 uid_t uid = decode_uid(args[3]); local
322 if (_chown(args[1], uid, gid) < 0) {
H A Ddevices.c78 unsigned int uid; member in struct:perms_
99 mode_t perm, unsigned int uid, unsigned int gid,
116 node->dp.uid = uid;
151 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm);
152 chown(buf, dp->uid, dp->gid);
157 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) argument
178 *uid = dp->uid;
183 *uid
98 add_dev_perms(const char *name, const char *attr, mode_t perm, unsigned int uid, unsigned int gid, unsigned short prefix) argument
192 unsigned uid; local
[all...]
H A Dinit.h55 uid_t uid; member in struct:socketinfo
93 uid_t uid; member in struct:service
H A Dproperty_service.c63 unsigned int uid; member in struct:__anon372
106 unsigned int uid; member in struct:__anon373
259 * Returns 1 if uid allowed, 0 otherwise.
261 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) { argument
264 if (uid == AID_SYSTEM || uid == AID_ROOT)
270 if ((uid && control_perms[i].uid == uid) ||
281 * Returns 1 if uid allowe
283 check_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) argument
[all...]
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 Dutil.c45 * android_name_to_id - returns the integer uid/gid associated with the given
63 * numeric or name representation, into the integer uid or gid. Returns -1U on
88 int create_socket(const char *name, int type, mode_t perm, uid_t uid, gid_t gid) argument
133 chown(addr.sun_path, uid, gid);
137 addr.sun_path, perm, uid, gid);
/system/core/libcutils/
H A Dfs.c33 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
50 if (((sb.st_mode & ALL_PERMS) == mode) && (sb.st_uid == uid) && (sb.st_gid == gid)) {
69 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) {
70 ALOGE("Failed to chown(%s, %d, %d): %s", path, uid, gid, strerror(errno));
H A Dmq.c51 uid_t uid; member in struct:__anon392
628 // Fake gid and uid until we have the real thing. The real creds are
631 credentials.uid = 0;
1050 credentials.uid = ucredentials.uid;
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 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.c29 * the run-as command has dropped the uid/gid. Hence be very
139 * - is owned by a given uid/gid
147 check_directory_ownership(const char* path, uid_t uid) argument
163 /* must be owned by specific uid/gid */
164 if (st.st_uid != uid || st.st_gid != uid)
187 check_data_path(const char* dataPath, uid_t uid) argument
238 * directory is owned by the application uid
240 if (check_directory_ownership(dataPath, uid) < 0)
411 info->uid
440 int uid, debugFlag; local
[all...]
H A Dpackage.h30 uid_t uid; member in struct:__anon472
39 extern int check_data_path(const char* dataDir, uid_t uid);
H A Drun-as.c38 * This program runs as set-uid root on Android production devices.
45 * until the uid/gid has been dropped to that of a normal user
105 int myuid, uid, gid; local
126 if (info.uid < AID_APP) {
138 if (check_data_path(info.dataDir, info.uid) < 0) {
159 uid = gid = info.uid;
160 if(setresgid(gid,gid,gid) || setresuid(uid,uid,uid)) {
[all...]
/system/core/sdcard/
H A Dfuse.h98 __u32 uid; member in struct:fuse_attr
344 __u32 uid; member in struct:fuse_setattr_in
541 __u32 uid; member in struct:fuse_in_header
H A Dsdcard.c299 attr->uid = 0;
1242 ERROR("usage: sdcard [-t<threads>] <source_path> <dest_path> <uid> <gid>\n"
1248 static int run(const char* source_path, const char* dest_path, uid_t uid, gid_t gid, argument
1266 fd, uid, gid);
1280 res = setuid(uid);
1304 uid_t uid = 0; local
1317 else if (!uid) {
1320 uid = strtoul(arg, &endptr, 10);
1322 ERROR("Invalid uid");
1347 if (!uid || !gi
[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.c12 static void print_uid(uid_t uid) argument
14 struct passwd *pw = getpwuid(uid);
17 printf("%d(%s)", uid, pw->pw_name);
19 printf("%d",uid);
44 printf("uid=");
H A Dls.c79 static void user2str(unsigned uid, char *out) argument
81 struct passwd *pw = getpwuid(uid);
85 sprintf(out, "%d", uid);
H A Dtop.c57 uid_t uid; member in struct:proc_info
303 proc->uid = cur_proc.uid;
395 unsigned int uid, gid; local
400 sscanf(line, "Uid: %u", &uid);
404 proc->uid = uid; proc->gid = gid;
465 user = getpwuid(proc->uid);
470 snprintf(user_buf, 20, "%d", proc->uid);
/system/extras/ext4_utils/
H A Dcontents.c236 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument
244 inode->i_uid = uid;

Completed in 2936 milliseconds

12