You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by je...@apache.org on 2014/03/27 20:56:26 UTC
svn commit: r1582451 - in
/hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt
src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c
Author: jeagles
Date: Thu Mar 27 19:56:26 2014
New Revision: 1582451
URL: http://svn.apache.org/r1582451
Log:
HADOOP-10442. Group look-up can cause segmentation fault when certain JNI-based mapping module is used. (Kihwal Lee via jeagles)
Modified:
hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1582451&r1=1582450&r2=1582451&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu Mar 27 19:56:26 2014
@@ -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
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c?rev=1582451&r1=1582450&r2=1582451&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/security/hadoop_user_info.c Thu Mar 27 19:56:26 2014
@@ -178,6 +178,11 @@ int hadoop_user_info_getgroups(struct ha
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) {