You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by zh...@apache.org on 2017/08/28 02:24:31 UTC
ranger git commit: RANGER-1751:The importJCEKSKeys.sh and DBMK2HSM.sh
will throw an exception when the JAVA_HOME is equal to null.
Repository: ranger
Updated Branches:
refs/heads/master 4daf1e9ed -> 83b67df99
RANGER-1751:The importJCEKSKeys.sh and DBMK2HSM.sh will throw an exception when the JAVA_HOME is equal to null.
Signed-off-by: zhangqiang2 <zh...@zte.com.cn>
Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/83b67df9
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/83b67df9
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/83b67df9
Branch: refs/heads/master
Commit: 83b67df99b87e8fa14564e237623f8749f1fab81
Parents: 4daf1e9
Author: peng.jianhua <pe...@zte.com.cn>
Authored: Thu Aug 24 03:10:30 2017 -0400
Committer: zhangqiang2 <zh...@zte.com.cn>
Committed: Sun Aug 27 22:23:08 2017 -0400
----------------------------------------------------------------------
kms/scripts/DBMK2HSM.sh | 5 +++++
kms/scripts/HSMMK2DB.sh | 5 +++++
kms/scripts/exportKeysToJCEKS.sh | 5 +++++
kms/scripts/importJCEKSKeys.sh | 5 +++++
4 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ranger/blob/83b67df9/kms/scripts/DBMK2HSM.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/DBMK2HSM.sh b/kms/scripts/DBMK2HSM.sh
index e5beec3..89c8c2d 100644
--- a/kms/scripts/DBMK2HSM.sh
+++ b/kms/scripts/DBMK2HSM.sh
@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------------
+if [ "$JAVA_HOME" != "" ]; then
+ export PATH=$JAVA_HOME/bin:$PATH
+else
+ exit ;
+fi
RANGER_KMS_HOME=`dirname $0`
cp="${RANGER_KMS_HOME}/cred/lib/*:${RANGER_KMS_HOME}/./ews/webapp/WEB-INF/classes/conf/:${RANGER_KMS_HOME}/ews/webapp/config:${RANGER_KMS_HOME}/ews/lib/*:${RANGER_KMS_HOME}/ews/webapp/lib/*:${RANGER_KMS_HOME}/ews/webapp/META-INF"
java -cp "${cp}" org.apache.hadoop.crypto.key.DB2HSMMKUtil ${1} ${2}
http://git-wip-us.apache.org/repos/asf/ranger/blob/83b67df9/kms/scripts/HSMMK2DB.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/HSMMK2DB.sh b/kms/scripts/HSMMK2DB.sh
index 03e9888..2637cf6 100644
--- a/kms/scripts/HSMMK2DB.sh
+++ b/kms/scripts/HSMMK2DB.sh
@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------------
+if [ "$JAVA_HOME" != "" ]; then
+ export PATH=$JAVA_HOME/bin:$PATH
+else
+ exit ;
+fi
RANGER_KMS_HOME=`dirname $0`
cp="${RANGER_KMS_HOME}/cred/lib/*:${RANGER_KMS_HOME}/./ews/webapp/WEB-INF/classes/conf/:${RANGER_KMS_HOME}/ews/webapp/config:${RANGER_KMS_HOME}/ews/lib/*:${RANGER_KMS_HOME}/ews/webapp/lib/*:${RANGER_KMS_HOME}/ews/webapp/META-INF"
java -cp "${cp}" org.apache.hadoop.crypto.key.HSM2DBMKUtil ${1} ${2}
http://git-wip-us.apache.org/repos/asf/ranger/blob/83b67df9/kms/scripts/exportKeysToJCEKS.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/exportKeysToJCEKS.sh b/kms/scripts/exportKeysToJCEKS.sh
index 03dbe48..f320578 100644
--- a/kms/scripts/exportKeysToJCEKS.sh
+++ b/kms/scripts/exportKeysToJCEKS.sh
@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------------
+if [ "$JAVA_HOME" != "" ]; then
+ export PATH=$JAVA_HOME/bin:$PATH
+else
+ exit ;
+fi
RANGER_KMS_HOME=`dirname $0`
cp="${RANGER_KMS_HOME}/cred/lib/*:${RANGER_KMS_HOME}/./ews/webapp/WEB-INF/classes/conf/:${RANGER_KMS_HOME}/ews/webapp/config:${RANGER_KMS_HOME}/ews/lib/*:${RANGER_KMS_HOME}/ews/webapp/lib/*:${RANGER_KMS_HOME}/ews/webapp/META-INF"
java -cp "${cp}" org.apache.hadoop.crypto.key.Ranger2JKSUtil ${1} ${2}
http://git-wip-us.apache.org/repos/asf/ranger/blob/83b67df9/kms/scripts/importJCEKSKeys.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/importJCEKSKeys.sh b/kms/scripts/importJCEKSKeys.sh
index 57a2053..d72c93e 100755
--- a/kms/scripts/importJCEKSKeys.sh
+++ b/kms/scripts/importJCEKSKeys.sh
@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------------------------
+if [ "$JAVA_HOME" != "" ]; then
+ export PATH=$JAVA_HOME/bin:$PATH
+else
+ exit ;
+fi
RANGER_KMS_HOME=`dirname $0`
cp="${RANGER_KMS_HOME}/cred/lib/*:${RANGER_KMS_HOME}/./ews/webapp/WEB-INF/classes/conf/:${RANGER_KMS_HOME}/ews/webapp/config:${RANGER_KMS_HOME}/ews/lib/*:${RANGER_KMS_HOME}/ews/webapp/lib/*:${RANGER_KMS_HOME}/ews/webapp/META-INF"
java -cp "${cp}" org.apache.hadoop.crypto.key.JKS2RangerUtil ${1} ${2}