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 om...@apache.org on 2011/03/04 05:10:01 UTC

svn commit: r1077388 - /hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java

Author: omalley
Date: Fri Mar  4 04:10:01 2011
New Revision: 1077388

URL: http://svn.apache.org/viewvc?rev=1077388&view=rev
Log:
commit 9d6c14633674425bee58c4af0222476995834935
Author: Jitendra Nath Pandey <jitendra@sufferhome-lm.(none)>
Date:   Mon Apr 12 13:03:29 2010 -0700

    HADOOP-6687 from https://issues.apache.org/jira/secure/attachment/12440979/HADOOP-6687-y20.2.patch
    
    +++ b/YAHOO-CHANGES.txt
    +    HADOOP-6687.  user object in the subject in UGI should be reused in case of a
    +    relogin. (jitendra)
    +

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

Modified: hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java?rev=1077388&r1=1077387&r2=1077388&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java (original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/core/org/apache/hadoop/security/UserGroupInformation.java Fri Mar  4 04:10:01 2011
@@ -93,6 +93,10 @@ public class UserGroupInformation {
 
     @Override
     public boolean commit() throws LoginException {
+      // if we already have a user, we are done.
+      if (!subject.getPrincipals(User.class).isEmpty()) {
+        return true;
+      }
       Principal user = null;
       // if we are using kerberos, try it out
       if (useKerberos) {