Chunwei Chen 9ba3c01923 Fix crgetgroups out-of-bound and misc cred fix
init_groups has 0 nblocks, therefore calling the current crgetgroups with
init_groups would result in out-of-bound access. We fix this by returning NULL
when nblocks is 0.

Cap crgetngroups to NGROUPS_PER_BLOCK, since crgetgroups will only return
blocks[0].

Also, remove all get_group_info. The cred already holds reference on the
group_info, and cred is not mutable. So there's no reason to hold extra
reference, if we hold cred.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #556
2016-10-20 09:33:01 -07:00
..
2013-03-04 19:09:34 -08:00
2016-06-01 10:26:42 -07:00
2016-09-16 17:10:36 -07:00
2015-01-16 13:55:08 -08:00
2015-12-16 09:35:22 -08:00
2016-01-20 13:07:45 -08:00
2015-01-16 13:55:08 -08:00