hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject hive git commit: HIVE-12345 : Followup for HIVE-9013 : Hidden conf vars still visible through beeline (Sushanth Sowmyan, reviewed by Thejas Nair)
Date Fri, 06 Nov 2015 18:32:31 GMT
Repository: hive
Updated Branches:
  refs/heads/master-fixed e8076ef41 -> e349ce585


HIVE-12345 : Followup for HIVE-9013 : Hidden conf vars still visible through beeline (Sushanth
Sowmyan, reviewed by Thejas Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/e349ce58
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/e349ce58
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/e349ce58

Branch: refs/heads/master-fixed
Commit: e349ce5852263b229e66d0003d24a30187eefd45
Parents: e8076ef
Author: Sushanth Sowmyan <khorgath@gmail.com>
Authored: Fri Nov 6 09:27:28 2015 -0800
Committer: Owen O'Malley <omalley@apache.org>
Committed: Fri Nov 6 10:31:05 2015 -0800

----------------------------------------------------------------------
 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java |  1 +
 .../test/java/org/apache/hive/jdbc/TestJdbcDriver2.java   | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/e349ce58/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
----------------------------------------------------------------------
diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 12276bf..7272ea4 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -2911,6 +2911,7 @@ public class HiveConf extends Configuration {
     isSparkConfigUpdated = other.isSparkConfigUpdated;
     origProp = (Properties)other.origProp.clone();
     restrictList.addAll(other.restrictList);
+    hiddenSet.addAll(other.hiddenSet);
     modWhiteListPattern = other.modWhiteListPattern;
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/e349ce58/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
index ced454f..2b3fdf1 100644
--- a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
+++ b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
@@ -1854,7 +1854,15 @@ public void testParseUrlHttpMode() throws SQLException, JdbcUriParseException,
     assertEquals(SET_COLUMN_NAME, md.getColumnLabel(1));
 
     //check if there is data in the resultset
-    assertTrue("Nothing returned by set -v", res.next());
+    int numLines = 0;
+    while (res.next()){
+      numLines++;
+      String rline = res.getString(1);
+      assertFalse("set output must not contain hidden variables such as the metastore password:"+rline,
+          rline.contains(HiveConf.ConfVars.METASTOREPWD.varname) && !(rline.contains(HiveConf.ConfVars.HIVE_CONF_HIDDEN_LIST.varname)));
+        // the only conf allowed to have the metastore pwd keyname is the hidden list configuration
value
+    }
+    assertTrue("Nothing returned by set -v", numLines > 0);
 
     res.close();
     stmt.close();


Mime
View raw message