]> granicus.if.org Git - sudo/commit
Don't need to preallocate 4 x NGROUP_MAX on AIX or BSD/Linux.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 26 Jul 2018 21:12:26 +0000 (15:12 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 26 Jul 2018 21:12:26 +0000 (15:12 -0600)
commit86413f95ec8a28731a7795b95b7a04c00f7a4c5c
tree4221b571847f5175bfbbea34ec732177015b2137
parent394524fd5d9ee493ce34894579a8c937fa3b9090
Don't need to preallocate 4 x NGROUP_MAX on AIX or BSD/Linux.
For BSD/Linux, getgrouplist(3) will tell us the number of groups if
we don't have enough.  For AIX, we can count the entries in the
group set before allocating the group vector.
lib/util/getgrouplist.c