From f38fdbf648b32f9e93d156a9158de2171bf25c7d Mon Sep 17 00:00:00 2001 From: Todd Lipcon Date: Mon, 10 Dec 2012 22:47:10 +0000 Subject: [PATCH] HDFS-4295. Using port 1023 should be valid when starting Secure DataNode. Contributed by Stephen Chu. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1419855 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/datanode/SecureDataNodeStarter.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1b816ac0f26..dd655abce19 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -318,6 +318,9 @@ Release 2.0.3-alpha - Unreleased HDFS-4292. Sanity check not correct in RemoteBlockReader2.newBlockReader (Binglin Chang via todd) + HDFS-4295. Using port 1023 should be valid when starting Secure DataNode + (Stephen Chu via todd) + BREAKDOWN OF HDFS-3077 SUBTASKS HDFS-3077. Quorum-based protocol for reading and writing edit logs. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/SecureDataNodeStarter.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/SecureDataNodeStarter.java index bcfcd9f76f6..36e4c5062d4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/SecureDataNodeStarter.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/SecureDataNodeStarter.java @@ -120,7 +120,7 @@ public class SecureDataNodeStarter implements Daemon { System.err.println("Successfully obtained privileged resources (streaming port = " + ss + " ) (http listener port = " + listener.getConnection() +")"); - if ((ss.getLocalPort() >= 1023 || listener.getPort() >= 1023) && + if ((ss.getLocalPort() > 1023 || listener.getPort() > 1023) && UserGroupInformation.isSecurityEnabled()) { throw new RuntimeException("Cannot start secure datanode with unprivileged ports"); }