Print this page
4078 groupadd execs getent unnecessarily
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>

*** 24,33 **** --- 24,37 ---- */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ + /* + * Copyright (c) 2013 RackTop Systems. + */ + #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <sys/param.h>
*** 58,68 **** if (ngroups_max == 0) { ngroups_max = sysconf(_SC_NGROUPS_MAX); grplist = malloc((ngroups_max + 1) * sizeof (gid_t)); } ! while (ptr = strtok(((i || n_invalid || dup_prim)? NULL: list), ",")) { switch (valid_group(ptr, &g_ptr, &warning)) { case INVALID: errmsg( M_INVALID, ptr, "group id" ); n_invalid++; --- 62,72 ---- if (ngroups_max == 0) { ngroups_max = sysconf(_SC_NGROUPS_MAX); grplist = malloc((ngroups_max + 1) * sizeof (gid_t)); } ! while ((ptr = strtok((i || n_invalid || dup_prim)? NULL: list, ","))) { switch (valid_group(ptr, &g_ptr, &warning)) { case INVALID: errmsg( M_INVALID, ptr, "group id" ); n_invalid++;