Skip to content

Commit 497d039

Browse files
committed
Merged r1206427 from branch-0.20-security for HADOOP-7854.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-205@1206428 13f79535-47bb-0310-9956-ffa450edef68
1 parent a52f2c9 commit 497d039

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ Release 0.20.205.1 - unreleased
134134

135135
HDFS-2590. Fix the missing links in the WebHDFS forrest doc. (szetszwo)
136136

137+
HDFS-7854. UGI getCurrentUser is not synchronized. (Daryn Sharp via jitendra)
138+
137139
Release 0.20.205.0 - 2011.10.06
138140

139141
NEW FEATURES

src/core/org/apache/hadoop/security/UserGroupInformation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ public boolean hasKerberosCredentials() {
407407
* @return the current user
408408
* @throws IOException if login fails
409409
*/
410-
public static UserGroupInformation getCurrentUser() throws IOException {
410+
public synchronized
411+
static UserGroupInformation getCurrentUser() throws IOException {
411412
AccessControlContext context = AccessController.getContext();
412413
Subject subject = Subject.getSubject(context);
413414
return subject == null ? getLoginUser() : new UserGroupInformation(subject);

0 commit comments

Comments
 (0)