=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/ids.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/rsync/ids.c 2019/02/12 19:13:03 1.3 --- src/usr.bin/rsync/ids.c 2019/02/12 19:39:57 1.4 *************** *** 1,4 **** ! /* $Id: ids.c,v 1.3 2019/02/12 19:13:03 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: ids.c,v 1.4 2019/02/12 19:39:57 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * *************** *** 77,89 **** void idents_gid_remap(struct sess *sess, struct ident *gids, size_t gidsz) { ! size_t i; struct group *grp; for (i = 0; i < gidsz; i++) { assert(gids[i].id != 0); ! /* * (1) Empty names inherit. * (2) Unknown group names inherit. * (3) Group wheel inherits. --- 77,89 ---- void idents_gid_remap(struct sess *sess, struct ident *gids, size_t gidsz) { ! size_t i; struct group *grp; for (i = 0; i < gidsz; i++) { assert(gids[i].id != 0); ! /* * (1) Empty names inherit. * (2) Unknown group names inherit. * (3) Group wheel inherits. *************** *** 124,130 **** if ((*gids)[i].id == (int32_t)gid) return 1; ! /* * Look us up in /etc/group. * Make sure that the group name length is sane: we transmit it * using a single byte. --- 124,130 ---- if ((*gids)[i].id == (int32_t)gid) return 1; ! /* * Look us up in /etc/group. * Make sure that the group name length is sane: we transmit it * using a single byte. *************** *** 157,163 **** return 0; } ! LOG4(sess, "adding group to list: %s (%u)", (*gids)[*gidsz].name, (*gids)[*gidsz].id); (*gidsz)++; return 1; --- 157,163 ---- return 0; } ! LOG4(sess, "adding group to list: %s (%u)", (*gids)[*gidsz].name, (*gids)[*gidsz].id); (*gidsz)++; return 1; *************** *** 170,176 **** * Return zero on failure, non-zero on success. */ int ! idents_send(struct sess *sess, int fd, const struct ident *ids, size_t idsz) { size_t i, sz; --- 170,176 ---- * Return zero on failure, non-zero on success. */ int ! idents_send(struct sess *sess, int fd, const struct ident *ids, size_t idsz) { size_t i, sz; *************** *** 220,227 **** return 0; } else if (id == 0) break; ! ! pp = reallocarray(*ids, *idsz + 1, sizeof(struct ident)); if (pp == NULL) { ERR(sess, "reallocarray"); --- 220,227 ---- return 0; } else if (id == 0) break; ! ! pp = reallocarray(*ids, *idsz + 1, sizeof(struct ident)); if (pp == NULL) { ERR(sess, "reallocarray");