HADOOP-10442. Group look-up can cause segmentation fault when certain JNI-based mapping module is used. (Kihwal Lee via jeagles)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1582451 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Turner Eagles 2014-03-27 19:56:26 +00:00
parent 54c1daa580
commit b5b350c02e
2 changed files with 8 additions and 0 deletions

View File

@ -500,6 +500,9 @@ Release 2.4.0 - UNRELEASED
HADOOP-10399. FileContext API for ACLs. (Vinayakumar B via cnauroth)
HADOOP-10442. Group look-up can cause segmentation fault when certain
JNI-based mapping module is used. (Kihwal Lee via jeagles)
Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -178,6 +178,11 @@ int hadoop_user_info_getgroups(struct hadoop_user_info *uinfo)
return ret;
}
return 0;
} else if (ret != -1) {
// Any return code that is not -1 is considered as error.
// Since the user lookup was successful, there should be at least one
// group for this user.
return EIO;
}
ngids = realloc(uinfo->gids, sizeof(uinfo->gids[0]) * ngroups);
if (!ngids) {