Lines Matching refs:gr
398 * int irp_marshall_gr(const struct group *gr, char **buffer, size_t *len)
410 irp_marshall_gr(const struct group *gr, char **buffer, size_t *len) {
415 if (gr == NULL || len == NULL) {
420 sprintf(grGid, "%ld", (long)gr->gr_gid);
422 need += strlen(gr->gr_name) + 1;
424 need += strlen(gr->gr_passwd) + 1;
429 need += joinlength(gr->gr_mem) + 1;
452 strcpy(*buffer, gr->gr_name); strcat(*buffer, fieldsep);
454 strcat(*buffer, gr->gr_passwd);
458 joinarray(gr->gr_mem, *buffer, COMMA) ; strcat(*buffer, fieldsep);
464 * int irp_unmarshall_gr(struct group *gr, char *buffer)
477 irp_unmarshall_gr(struct group *gr, char *buffer) {
489 if (gr == NULL || buffer == NULL) {
539 gr->gr_name = name;
541 gr->gr_passwd = pass;
543 gr->gr_gid = grgid;
544 gr->gr_mem = members;
2210 struct group *gr;
2214 gr = &gr1;
2215 memset(gr, 0xef, sizeof (struct group));
2216 if (irp_unmarshall_gr(gr, argv[1]) != 0) {
2221 irp_marshall_gr(gr, &b, &len);
2229 if ((gr = getgrnam(argv[1])) == NULL) {
2234 if (irp_marshall_gr(gr, &b, &len) != 0) {