/system/core/run-as/ |
H A D | package.h | 30 uid_t uid; member in struct:__anon438 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 * is more complex than simple system calls until the uid/gid has 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...] |
H A D | package.c | 28 * the run-as command has dropped the uid/gid. Hence be very 108 * - is owned by a given uid/gid 116 check_directory_ownership(const char* path, uid_t uid) argument 132 /* must be owned by specific uid/gid */ 133 if (st.st_uid != uid || st.st_gid != uid) 156 check_data_path(const char* dataPath, uid_t uid) argument 207 * directory is owned by the application uid 209 if (check_directory_ownership(dataPath, uid) < 0) 380 info->uid 409 int uid, debugFlag; local [all...] |
/system/extras/su/ |
H A D | su.c | 45 int uid, gid, myuid; local 48 uid = gid = 0; 53 uid = gid = atoi(argv[1]); 55 uid = pw->pw_uid; 63 fprintf(stderr,"su: uid %d not allowed to su\n", myuid); 67 if(setgid(gid) || setuid(uid)) {
|
/system/core/toolbox/ |
H A D | chown.c | 31 // Lookup uid (and gid if specified) 34 uid_t uid; local 39 uid = pw->pw_uid; 42 uid = (int) strtoul(user, &endptr, 0); 64 if (chown(argv[i], uid, gid) < 0) {
|
H A D | id.c | 8 static void print_uid(uid_t uid) argument 10 struct passwd *pw = getpwuid(uid); 13 printf("%d(%s)", uid, pw->pw_name); 15 printf("%d",uid); 37 printf("uid=");
|
H A D | ls.c | 74 static void user2str(unsigned uid, char *out) argument 76 struct passwd *pw = getpwuid(uid); 80 sprintf(out, "%d", uid);
|
H A D | top.c | 56 uid_t uid; member in struct:proc_info 302 proc->uid = cur_proc.uid; 398 unsigned int uid, gid; local 403 sscanf(line, "Uid: %u", &uid); 407 proc->uid = uid; proc->gid = gid; 468 user = getpwuid(proc->uid); 473 snprintf(user_buf, 20, "%d", proc->uid);
|
/system/extras/ext4_utils/ |
H A D | contents.h | 28 u16 uid; member in struct:dentry 38 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
|
H A D | contents.c | 231 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument 239 inode->i_uid = uid;
|
H A D | make_ext4fs.c | 57 .uid = 0, 65 dentries.uid, dentries.gid, dentries.mtime); 119 unsigned int uid = 0; local 122 fs_config(dentries[i].path, dir, &uid, &gid, &mode); 124 dentries[i].uid = uid; 173 dentries[i].uid, dentries[i].gid,
|
/system/core/init/ |
H A D | ueventd.c | 109 uid_t uid; local 159 ERROR("invalid uid '%s'\n", args[2]); 163 uid = ret; 173 add_dev_perms(name, attr, perm, uid, gid, prefix);
|
H A D | init.h | 55 uid_t uid; member in struct:socketinfo 93 uid_t uid; member in struct:service
|
H A D | util.c | 40 * android_name_to_id - returns the integer uid/gid associated with the given 58 * numeric or name representation, into the integer uid or gid. Returns -1U on 83 int create_socket(const char *name, int type, mode_t perm, uid_t uid, gid_t gid) argument 111 chown(addr.sun_path, uid, gid); 115 addr.sun_path, perm, uid, gid);
|
H A D | property_service.c | 58 unsigned int uid; member in struct:__anon360 97 unsigned int uid; member in struct:__anon361 197 * Returns 1 if uid allowed, 0 otherwise. 199 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid) { argument 201 if (uid == AID_SYSTEM || uid == AID_ROOT) 207 if ((uid && control_perms[i].uid == uid) || 218 * Returns 1 if uid allowe 220 check_perms(const char *name, unsigned int uid, unsigned int gid) argument [all...] |
H A D | builtins.c | 250 uid_t uid = decode_uid(args[3]); local 257 if (chown(args[1], uid, gid)) {
|
H A D | devices.c | 65 unsigned int uid; member in struct:perms_ 86 mode_t perm, unsigned int uid, unsigned int gid, 103 node->dp.uid = uid; 138 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm); 139 chown(buf, dp->uid, dp->gid); 144 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) argument 165 *uid = dp->uid; 170 *uid 85 add_dev_perms(const char *name, const char *attr, mode_t perm, unsigned int uid, unsigned int gid, unsigned short prefix) argument 179 unsigned uid; local [all...] |
/system/core/libcutils/ |
H A D | qtaguid.c | 99 int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { argument 108 snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid); 110 LOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid); 114 LOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", 115 sockfd, kTag, tag, uid, res); 136 int qtaguid_setCounterSet(int counterSetNum, uid_t uid) { argument 140 LOGV("Setting counters to set %d for uid %d", counterSetNum, uid); 142 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid); 147 qtaguid_deleteTagData(int tag, uid_t uid) argument [all...] |
H A D | mq.c | 51 uid_t uid; member in struct:__anon369 628 // Fake gid and uid until we have the real thing. The real creds are 631 credentials.uid = 0; 1050 credentials.uid = ucredentials.uid;
|
/system/core/include/private/ |
H A D | android_filesystem_config.h | 137 unsigned uid; member in struct:fs_path_config 197 /* the following two files are INTENTIONALLY set-gid and not set-uid. 201 /* the following five files are INTENTIONALLY set-uid, but they 209 /* the following file is INTENTIONALLY set-uid, and IS included 224 unsigned *uid, unsigned *gid, unsigned *mode) 245 *uid = pc->uid; 251 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode); 223 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode) argument
|
/system/extras/tests/iptables/qtaguid/ |
H A D | socketTag.cpp | 41 bool checkTag(uint64_t tag, uid_t uid); 121 * tag + uid. But it is not fool proof. 126 bool SockInfo::checkTag(uint64_t acct_tag, uid_t uid) { argument 151 asprintf(&match_template, "sock=%lx %s", addr, "tag=0x%llx (uid=%u)"); 155 asprintf(&match_template, "%s", " tag=0x%llx (uid=%u)"); 158 full_tag = acct_tag | uid; 160 asprintf(&buff, match_template, full_tag | uid, uid); 167 "sock=%lx tag=0x%llx (uid=%lu) pid=%u f_count=%lu", 169 if (!(res == 5 && k_tag == full_tag && k_uid == uid)) { [all...] |
/system/extras/tests/fstest/ |
H A D | perm_checker.c | 78 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/core/sdcard/ |
H A D | sdcard.c | 43 * usage: sdcard <path> <uid> <gid> 45 * It must be run as root, but will change to uid/gid as soon as it 46 * mounts a filesystem on /mnt/sdcard. It will refuse to run if uid or 118 static unsigned uid = -1; variable 220 attr->uid = 0; 957 ERROR("usage: sdcard [-l -f] <path> <uid> <gid>\n\n\t-l force file names to lower case when creating new files\n\t-f fix up file system before starting (repairs bad file name case and group ownership)\n"); 974 else if (uid == -1) 975 uid = strtoul(arg, 0, 10); 988 if (uid <= 0 || gid <= 0) { 989 ERROR("uid an [all...] |
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
|
/system/netd/ |
H A D | BandwidthController.cpp | 98 * iptables -A penalty_box -m owner --uid-owner app_3 \ 261 std::string BandwidthController::makeIptablesNaughtyCmd(IptOp op, int uid) { argument 278 asprintf(&buff, "%s penalty_box -m owner --uid-owner %d", opFlag, uid); 303 failLogTemplate = "Failed to add app uid %d to penalty box."; 307 failLogTemplate = "Failed to delete app uid %d from penalty box."; 329 /* Try to remove the uid that failed in any case*/
|