Home | History | Annotate | Download | only in pending

Lines Matching refs:toys

24 #include "toys.h"
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)
68 if (toys.optc == 2) { //add user to group
69 //toys.optargs[0]- user, toys.optargs[1] - group
70 xgetpwnam(*toys.optargs);
71 if (!(grp = getgrnam(toys.optargs[1])))
72 error_exit("group '%s' does not exist", toys.optargs[1]);
73 if (!grp->gr_mem) entry = xmprintf("%s", *toys.optargs);
78 if (!strcmp(grp->gr_mem[i], *toys.optargs)) return;
86 entry = xrealloc(entry, strlen(entry) + strlen(*toys.optargs) + 1);
87 strcat(entry, *toys.optargs);
93 char *s = *toys.optargs;