Lines Matching defs:gr
299 static int parse_group_packet(uint8_t *body, size_t blen, struct group *gr, uint32_t *nmem)
304 SAFEALIGN_COPY_UINT32(&gr->gr_gid, body+rp, &rp);
307 gr->gr_name = (char *) body+rp;
308 rp += strlen(gr->gr_name) + 1;
311 gr->gr_passwd = (char *) body+rp;
312 rp += strlen(gr->gr_passwd) + 1;
315 gr->gr_mem = talloc_zero_array(nss_test_ctx, char *, *nmem);
316 if (gr->gr_mem == NULL) return ENOMEM;
321 gr->gr_mem[i] = talloc_strdup(gr->gr_mem, (char *) body+rp);
322 rp += strlen(gr->gr_mem[i]) + 1;
456 struct group *gr, const int nmem)
460 assert_int_equal(gr->gr_gid, expected->gr_gid);
461 assert_string_equal(gr->gr_name, expected->gr_name);
462 assert_string_equal(gr->gr_passwd, expected->gr_passwd);
465 assert_string_equal(gr->gr_mem[i], expected->gr_mem[i]);
1273 struct group gr;
1277 ret = parse_group_packet(body, blen, &gr, &nmem);
1281 assert_groups_equal(&getgrnam_no_members, &gr, nmem);
1344 struct group gr;
1356 ret = parse_group_packet(body, blen, &gr, &nmem);
1360 assert_groups_equal(&expected, &gr, nmem);
1419 struct group gr;
1446 ret = parse_group_packet(body, blen, &gr, &nmem);
1450 assert_groups_equal(&expected, &gr, nmem);
1520 struct group gr;
1545 ret = parse_group_packet(body, blen, &gr, &nmem);
1549 assert_groups_equal(&expected, &gr, nmem);
1609 struct group gr;
1630 ret = parse_group_packet(body, blen, &gr, &nmem);
1634 assert_groups_equal(&expected, &gr, nmem);
1673 struct group gr;
1703 ret = parse_group_packet(body, blen, &gr, &nmem);
1707 assert_groups_equal(&expected, &gr, nmem);
1743 struct group gr;
1772 ret = parse_group_packet(body, blen, &gr, &nmem);
1776 assert_groups_equal(&expected, &gr, nmem);
1822 struct group gr;
1826 ret = parse_group_packet(body, blen, &gr, &nmem);
1830 assert_groups_equal(&space_group, &gr, nmem);
1868 struct group gr;
1872 ret = parse_group_packet(body, blen, &gr, &nmem);
1877 assert_groups_equal(&space_group, &gr, nmem);