Lines Matching refs:toys
42 if (toys.optflags & FLAG_g) {
46 if (toys.optflags & FLAG_S) TT.gid = CFG_TOYBOX_UID_SYS;
52 entry = xmprintf("%s:%s:%d:", *toys.optargs, "x", TT.gid);
53 update_password(GROUP_PATH, *toys.optargs, entry);
55 entry = xmprintf("%s:%s::", *toys.optargs, "!");
56 update_password(SECURE_GROUP_PATH, *toys.optargs, entry);
65 if (toys.optflags && toys.optc == 2) in groupadd_main()
68 if (toys.optc == 2) { //add user to group in groupadd_main()
70 xgetpwnam(*toys.optargs); in groupadd_main()
71 if (!(grp = getgrnam(toys.optargs[1]))) in groupadd_main()
72 error_exit("group '%s' does not exist", toys.optargs[1]); in groupadd_main()
73 if (!grp->gr_mem) entry = xmprintf("%s", *toys.optargs); in groupadd_main()
78 if (!strcmp(grp->gr_mem[i], *toys.optargs)) return; in groupadd_main()
86 entry = xrealloc(entry, strlen(entry) + strlen(*toys.optargs) + 1); in groupadd_main()
87 strcat(entry, *toys.optargs); in groupadd_main()
93 char *s = *toys.optargs; in groupadd_main()