/system/core/cpio/ |
H A D | mkbootfs.c | 40 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 D | debuggerd.c | 54 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 D | android_filesystem_config.h | 89 #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 D | builtins.c | 91 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 D | devices.c | 78 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 D | init.h | 55 uid_t uid; member in struct:socketinfo 93 uid_t uid; member in struct:service
|
H A D | property_service.c | 63 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 D | ueventd.c | 116 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 D | util.c | 45 * 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 D | fs.c | 33 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 D | mq.c | 51 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 D | multiuser.c | 19 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 D | qtaguid.c | 99 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 D | NetlinkListener.cpp | 48 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 D | package.c | 29 * 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 D | package.h | 30 uid_t uid; member in struct:__anon472 39 extern int check_data_path(const char* dataDir, uid_t uid);
|
H A D | run-as.c | 38 * 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 D | fuse.h | 98 __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 D | sdcard.c | 299 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 D | chown.c | 33 // 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 D | id.c | 12 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 D | ls.c | 79 static void user2str(unsigned uid, char *out) argument 81 struct passwd *pw = getpwuid(uid); 85 sprintf(out, "%d", uid);
|
H A D | top.c | 57 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 D | contents.c | 228 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument 236 inode->i_uid = uid;
|
H A D | contents.h | 28 u16 uid; member in struct:dentry 39 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
|