Jelajahi Sumber

commit d8f3016eb6c145c8e5c7623b280df8be4e9f6afe
Author: Boris Shkolnik <borya@yahoo-inc.com>
Date: Mon Mar 1 15:18:55 2010 -0800

HADOOP:6600 from https://issues.apache.org/jira/secure/attachment/12437534/HADOOP-6600-BP20-fix.patch

+++ b/YAHOO-CHANGES.txt
+
+ HADOOP-6600. Fix for branch backport only. Comparing of user should use
+ equals. (boryas).
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077259 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 tahun lalu
induk
melakukan
15ce729e27

+ 1 - 1
src/core/org/apache/hadoop/security/authorize/ServiceAuthorizationManager.java

@@ -80,7 +80,7 @@ public class ServiceAuthorizationManager {
         clientPrincipal = conf.get(clientKey);
       }
     }
-    if((clientPrincipal != null && clientPrincipal != user.getUserName()) || 
+    if((clientPrincipal != null && !clientPrincipal.equals(user.getUserName())) || 
         !acl.isUserAllowed(user)) {
       auditLOG.warn(AUTHZ_FAILED_FOR + user + " for protocol="+protocol);
       throw new AuthorizationException("User " + user +