/system/extras/su/ |
H A D | su.c | 45 int uid, gid, myuid; local 48 uid = gid = 0; 53 uid = gid = atoi(argv[1]); 56 gid = pw->pw_gid; 67 if(setgid(gid) || setuid(uid)) {
|
/system/core/run-as/ |
H A D | run-as.c | 45 * is more complex than simple system calls until the uid/gid has 105 int myuid, uid, gid; local 159 uid = gid = info.uid; 160 if(setresgid(gid,gid,gid) || setresuid(uid,uid,uid)) {
|
/system/core/toolbox/ |
H A D | chown.c | 31 // Lookup uid (and gid if specified) 35 gid_t gid = -1; // passing -1 to chown preserves current group local 52 gid = grp->gr_gid; 55 gid = (int) strtoul(group, &endptr, 0); 64 if (chown(argv[i], uid, gid) < 0) {
|
H A D | id.c | 19 static void print_gid(gid_t gid) argument 21 struct group *gr = getgrgid(gid); 23 printf("%d(%s)", gid, gr->gr_name); 25 printf("%d",gid); 39 printf(" gid=");
|
H A D | ls.c | 79 static void group2str(unsigned gid, char *out) argument 81 struct group *gr = getgrgid(gid); 85 sprintf(out, "%d", gid);
|
H A D | top.c | 57 gid_t gid; member in struct:proc_info 302 proc->gid = cur_proc.gid; 396 unsigned int uid, gid; local 402 sscanf(line, "Gid: %u", &gid); 405 proc->uid = uid; proc->gid = gid; 467 group = getgrgid(proc->gid); 477 snprintf(group_buf, 20, "%d", proc->gid);
|
/system/extras/ext4_utils/ |
H A D | contents.h | 29 u16 gid; 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 | 226 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument 235 inode->i_gid = gid;
|
H A D | make_ext4fs.c | 59 .gid = 0, 66 dentries.uid, dentries.gid, dentries.mtime); 121 unsigned int gid = 0; local 123 fs_config(dentries[i].path, dir, &uid, &gid, &mode); 126 dentries[i].gid = gid; 174 dentries[i].uid, dentries[i].gid,
|
/system/core/init/ |
H A D | ueventd.c | 82 gid_t gid; local 139 ERROR("invalid gid '%s'\n", args[3]); 143 gid = ret; 145 add_dev_perms(name, attr, perm, uid, gid, prefix);
|
H A D | init.h | 56 gid_t gid; member in struct:socketinfo 91 gid_t gid; member in struct:service
|
H A D | builtins.c | 243 gid_t gid = -1; local 246 gid = decode_uid(args[4]); 249 if (chown(args[1], uid, gid)) {
|
H A D | property_service.c | 59 unsigned int gid; member in struct:__anon70 95 unsigned int gid; member in struct:__anon71 204 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid) { argument 213 (gid && control_perms[i].gid == gid)) { 225 static int check_perms(const char *name, unsigned int uid, unsigned int gid) argument 239 (gid && property_perms[i].gid == gid)) { [all...] |
H A D | util.c | 77 * android_name_to_id - returns the integer uid/gid associated with the given 95 * numeric or name representation, into the integer uid or gid. Returns -1U on 120 int create_socket(const char *name, int type, mode_t perm, uid_t uid, gid_t gid) argument 148 chown(addr.sun_path, uid, gid); 152 addr.sun_path, perm, uid, gid);
|
H A D | devices.c | 90 unsigned int gid; member in struct:perms_ 103 mode_t perm, unsigned int uid, unsigned int gid, 121 node->dp.gid = gid; 155 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm); 156 chown(buf, dp->uid, dp->gid); 161 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) argument 183 *gid = dp->gid; 188 *gid 102 add_dev_perms(const char *name, const char *attr, mode_t perm, unsigned int uid, unsigned int gid, unsigned short prefix) argument 197 unsigned gid; local [all...] |
/system/core/include/private/ |
H A D | android_filesystem_config.h | 125 unsigned gid; member in struct:fs_path_config 179 /* the following two files are INTENTIONALLY set-gid and not set-uid. 204 unsigned *uid, unsigned *gid, unsigned *mode) 226 *gid = pc->gid; 231 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode); 203 fs_config(const char *path, int dir, unsigned *uid, unsigned *gid, unsigned *mode) argument
|
/system/core/sdcard/ |
H A D | sdcard.c | 42 * usage: sdcard <path> <uid> <gid> 44 * It must be run as root, but will change to uid/gid as soon as it 46 * gid are zero. 170 attr->gid = AID_SDCARD_RW; 745 unsigned gid; local 749 ERROR("usage: sdcard <path> <uid> <gid>\n"); 754 gid = strtoul(argv[3], 0, 10); 755 if (!uid || !gid) { 756 ERROR("uid and gid must be nonzero\n"); 772 "user_id=%d,group_id=%d", fd, uid, gid); [all...] |
H A D | fuse.h | 99 __u32 gid; member in struct:fuse_attr 345 __u32 gid; member in struct:fuse_setattr_in 542 __u32 gid; member in struct:fuse_in_header
|
/system/extras/tests/fstest/ |
H A D | perm_checker.c | 92 printf("# ERROR # Invalid gid '%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 204 gr = getgrgid(gid); 207 gr->gr_name, gid); 211 static int pass_rule(const perm_rule_t *pr, mode_t mode, uid_t uid, gid_t gid) argument 215 (pr->min_gid <= gid) && (pr->max_gid >= gid) && 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, gid); 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/libcutils/ |
H A D | mq.c | 52 gid_t gid; member in struct:__anon83 628 // Fake gid and uid until we have the real thing. The real creds are 632 credentials.gid = 0; 1051 credentials.gid = ucredentials.gid;
|