| 651 | } |
| 652 | |
| 653 | static int add_a_group(int f_out, const char *gname) |
| 654 | { |
| 655 | gid_t gid, *gid_p; |
| 656 | if (!group_to_gid(gname, &gid, True)) { |
| 657 | rprintf(FLOG, "Invalid gid %s\n", gname); |
| 658 | io_printf(f_out, "@ERROR: invalid gid %s\n", gname); |
| 659 | return -1; |
| 660 | } |
| 661 | gid_p = EXPAND_ITEM_LIST(&gid_list, gid_t, -32); |
| 662 | *gid_p = gid; |
| 663 | return 0; |
| 664 | } |
| 665 | |
| 666 | #ifdef HAVE_GETGROUPLIST |
| 667 | static int want_all_groups(int f_out, uid_t uid) |
no test coverage detected