Searched defs:gid (Results 1 - 25 of 26) sorted by relevance

12

/system/extras/su/
H A Dsu.c45 int uid, gid, myuid; local
55 uid = gid = 0;
60 uid = gid = atoi(argv[1]);
63 gid = pw->pw_gid;
67 if(setgid(gid) || setuid(uid)) {
/system/core/run-as/
H A Drun-as.c45 * until the uid/gid has been dropped to that of a normal user
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 Dchown.c33 // Lookup uid (and gid if specified)
37 gid_t gid = -1; // passing -1 to chown preserves current group local
54 gid = grp->gr_gid;
57 gid = (int) strtoul(group, &endptr, 0);
66 if (chown(argv[i], uid, gid) < 0) {
H A Did.c23 static void print_gid(gid_t gid) argument
25 struct group *gr = getgrgid(gid);
27 printf("%d(%s)", gid, gr->gr_name);
29 printf("%d",gid);
46 printf(" gid=");
H A Dls.c89 static void group2str(unsigned gid, char *out) argument
91 struct group *gr = getgrgid(gid);
95 sprintf(out, "%d", gid);
H A Dtop.c58 gid_t gid; member in struct:proc_info
304 proc->gid = cur_proc.gid;
395 unsigned int uid, gid; local
401 sscanf(line, "Gid: %u", &gid);
404 proc->uid = uid; proc->gid = gid;
466 group = getgrgid(proc->gid);
476 snprintf(group_buf, 20, "%d", proc->gid);
/system/extras/ext4_utils/
H A Dcontents.h29 u16 gid; member in struct:dentry
39 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
H A Dcontents.c236 int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime) argument
245 inode->i_gid = gid;
H A Dmake_ext4fs.c86 .gid = 0,
93 dentries.uid, dentries.gid, dentries.mtime);
150 unsigned int gid = 0; local
152 fs_config_func(dentries[i].path, dir, &uid, &gid, &mode);
155 dentries[i].gid = gid;
215 dentries[i].uid, dentries[i].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.c52 gid_t gid; member in struct:__anon392
628 // Fake gid and uid until we have the real thing. The real creds are
632 credentials.gid = 0;
1051 credentials.gid = ucredentials.gid;
/system/core/init/
H A Dueventd.c117 gid_t gid; local
174 ERROR("invalid gid '%s'\n", args[3]);
178 gid = ret;
180 add_dev_perms(name, attr, perm, uid, gid, prefix);
H A Dinit.h56 gid_t gid; member in struct:socketinfo
94 gid_t gid; member in struct:service
H A Dproperty_service.c64 unsigned int gid; member in struct:__anon372
107 unsigned int gid; member in struct:__anon373
261 static int check_control_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) { argument
271 (gid && control_perms[i].gid == gid)) {
283 static int check_perms(const char *name, unsigned int uid, unsigned int gid, char *sctx) argument
296 (gid && property_perms[i].gid == gid)) {
[all...]
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);
H A Dbuiltins.c91 static int _chown(const char *path, unsigned int uid, unsigned int gid) argument
101 ret = fchown(fd, uid, gid);
316 gid_t gid = -1; local
319 gid = decode_uid(args[4]);
322 if (_chown(args[1], uid, gid) < 0) {
H A Ddevices.c79 unsigned int gid; member in struct:perms_
99 mode_t perm, unsigned int uid, unsigned int gid,
117 node->dp.gid = gid;
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
179 *gid = dp->gid;
184 *gid
98 add_dev_perms(const char *name, const char *attr, mode_t perm, unsigned int uid, unsigned int gid, unsigned short prefix) argument
193 unsigned gid; local
[all...]
/system/core/cpio/
H A Dmkbootfs.c40 int uid, gid, mode; member in struct:fs_config_entry
46 * gid, mode). */
59 // Use the list of file uid/gid/modes loaded from the file
70 s->st_gid = p->gid;
76 s->st_gid = empty_path_config->gid;
307 cc->gid = atoi(strtok(NULL, " \n"));
/system/vold/
H A DCommandListener.cpp339 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: asec fixperms <container-id> <gid> <filename>", false);
344 gid_t gid = (gid_t) strtoul(argv[3], &endptr, 10); local
346 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: asec fixperms <container-id> <gid> <filename>", false);
350 rc = vm->fixupAsecPermissions(argv[2], gid, argv[4]);
H A DVolume.cpp418 int gid; local
423 gid = AID_SDCARD_RW;
426 gid = AID_MEDIA_RW;
429 AID_SYSTEM, gid, 0702, true)) {
521 if (mount("tmpfs", SEC_STG_SECIMGDIR, "tmpfs", MS_RDONLY, "size=0,mode=000,uid=0,gid=0")) {
663 if (mount("tmpfs", SEC_STG_SECIMGDIR, "tmpfs", MS_RDONLY, "size=0,mode=0,uid=0,gid=0")) {
H A DVolumeManager.cpp497 int VolumeManager::fixupAsecPermissions(const char *id, gid_t gid, const char* filename) { argument
502 if (gid < AID_APP) {
571 result |= fchown(fd, AID_SYSTEM, privateFile? gid : AID_SYSTEM);
/system/core/debuggerd/
H A Ddebuggerd.c54 uid_t uid, gid; member in struct:__anon288
224 out_request->gid = cr.gid;
241 &out_request->uid, &out_request->gid);
270 XLOG("BOOM: pid=%d uid=%d gid=%d tid=%d\n",
271 request.pid, request.uid, request.gid, request.tid);
/system/core/include/private/
H A Dandroid_filesystem_config.h150 unsigned gid; member in struct:fs_path_config
203 /* the following two files are INTENTIONALLY set-gid and not set-uid.
232 unsigned *uid, unsigned *gid, unsigned *mode)
254 *gid = pc->gid;
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/extras/tests/fstest/
H A Dperm_checker.c92 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/sdcard/
H A Dsdcard.c300 attr->gid = AID_SDCARD_RW;
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);
1274 res = setgid(gid);
1305 gid_t gid = 0; local
1325 } else if (!gid) {
1328 gid = strtoul(arg, &endptr, 10);
1330 ERROR("Invalid gid");
1347 if (!uid || !gid) {
[all...]

Completed in 152 milliseconds

12