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 ji...@apache.org on 2011/11/26 12:12:16 UTC

svn commit: r1206428 - in /hadoop/common/branches/branch-0.20-security-205: CHANGES.txt src/core/org/apache/hadoop/security/UserGroupInformation.java

Author: jitendra
Date: Sat Nov 26 11:12:15 2011
New Revision: 1206428

URL: http://svn.apache.org/viewvc?rev=1206428&view=rev
Log:
Merged r1206427 from branch-0.20-security for HADOOP-7854.

Modified:
    hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
    hadoop/common/branches/branch-0.20-security-205/src/core/org/apache/hadoop/security/UserGroupInformation.java

Modified: hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/CHANGES.txt?rev=1206428&r1=1206427&r2=1206428&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security-205/CHANGES.txt Sat Nov 26 11:12:15 2011
@@ -134,6 +134,8 @@ Release 0.20.205.1 - unreleased
 
     HDFS-2590. Fix the missing links in the WebHDFS forrest doc.  (szetszwo)
 
+    HDFS-7854. UGI getCurrentUser is not synchronized. (Daryn Sharp via jitendra)
+
 Release 0.20.205.0 - 2011.10.06
 
   NEW FEATURES

Modified: hadoop/common/branches/branch-0.20-security-205/src/core/org/apache/hadoop/security/UserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/src/core/org/apache/hadoop/security/UserGroupInformation.java?rev=1206428&r1=1206427&r2=1206428&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/src/core/org/apache/hadoop/security/UserGroupInformation.java (original)
+++ hadoop/common/branches/branch-0.20-security-205/src/core/org/apache/hadoop/security/UserGroupInformation.java Sat Nov 26 11:12:15 2011
@@ -407,7 +407,8 @@ public class UserGroupInformation {
    * @return the current user
    * @throws IOException if login fails
    */
-  public static UserGroupInformation getCurrentUser() throws IOException {
+  public synchronized
+  static UserGroupInformation getCurrentUser() throws IOException {
     AccessControlContext context = AccessController.getContext();
     Subject subject = Subject.getSubject(context);
     return subject == null ? getLoginUser() : new UserGroupInformation(subject);