HADOOP-10781. Unportable getgrouplist usage breaks FreeBSD (Dmitry Sivachenko via Colin Patrick McCabe)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1608871 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Colin McCabe 2014-07-08 18:17:28 +00:00
parent 822790d5af
commit 96bfab8dbc
2 changed files with 4 additions and 1 deletions

View File

@ -309,6 +309,9 @@ Release 2.5.0 - UNRELEASED
HADOOP-10419 BufferedFSInputStream NPEs on getPos() on a closed stream HADOOP-10419 BufferedFSInputStream NPEs on getPos() on a closed stream
(stevel) (stevel)
HADOOP-10781. Unportable getgrouplist() usage breaks FreeBSD (Dmitry
Sivachenko via Colin Patrick McCabe)
BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS
HADOOP-10520. Extended attributes definition and FileSystem APIs for HADOOP-10520. Extended attributes definition and FileSystem APIs for

View File

@ -193,7 +193,7 @@ int hadoop_user_info_getgroups(struct hadoop_user_info *uinfo)
ngroups = uinfo->gids_size; ngroups = uinfo->gids_size;
ret = getgrouplist(uinfo->pwd.pw_name, uinfo->pwd.pw_gid, ret = getgrouplist(uinfo->pwd.pw_name, uinfo->pwd.pw_gid,
uinfo->gids, &ngroups); uinfo->gids, &ngroups);
if (ret > 0) { if (ret >= 0) {
uinfo->num_gids = ngroups; uinfo->num_gids = ngroups;
ret = put_primary_gid_first(uinfo); ret = put_primary_gid_first(uinfo);
if (ret) { if (ret) {