- /* only allow those in group zero to su to root. */
- if (pwd->pw_uid == 0 && (gr = getgrgid((gid_t)0)))
- for (g = gr->gr_mem;; ++g) {
- if (!*g) {
- (void)fprintf(stderr,
- "su: you are not in the correct group to su %s.\n", user);
- exit(1);
- }
- if (!strcmp(username, *g))
- break;
- }
-