If the target user only belong to one group, then we just set
"identity->mi_gid", and does not set "identity->mi_ginfo", to
save unnecessary memory allocation and groups processing.
So before accessing member inside "identity->mi_ginfo", make
sure "identity->mi_ginfo" is valid.
Change-Id: I880ccadddd93425c301115328d57c552d11bda8e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1252
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
CDEBUG(D_OTHER, "parse mdt identity@%p: %d:%d, ngroups %u, nperms %u\n",
identity, identity->mi_uid, identity->mi_gid,
- identity->mi_ginfo->ngroups, identity->mi_nperms);
+ data->idd_ngroups, data->idd_nperms);
RETURN(0);
}