Repository: ambari Updated Branches: refs/heads/trunk 08e235098 -> 95833e8c4
AMBARI-6478. Ambari installed JDK owned by uucp user (Jonathan Hurley via ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95833e8c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95833e8c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95833e8c Branch: refs/heads/trunk Commit: 95833e8c4d1cbad67a84e1e828e9729eb662703e Parents: 08e2350 Author: Nate Cole <[email protected]> Authored: Tue Jul 15 10:58:31 2014 -0400 Committer: Nate Cole <[email protected]> Committed: Tue Jul 15 10:58:38 2014 -0400 ---------------------------------------------------------------------- ambari-server/src/main/python/ambari-server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/95833e8c/ambari-server/src/main/python/ambari-server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 8aec854..b61e76e 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -393,7 +393,9 @@ GET_FQDN_SERVICE_URL = "server.fqdn.service.url" JDK_DOWNLOAD_CMD = "curl --create-dirs -o {0} {1}" JDK_DOWNLOAD_SIZE_CMD = "curl -I {0}" -UNTAR_JDK_ARVHIVE = "tar -xvf {0}" + +# use --no-same-owner when running as root to prevent uucp as the user (AMBARI-6478) +UNTAR_JDK_ARCHIVE = "tar --no-same-owner -xvf {0}" #JCE Policy files JCE_POLICY_FILENAMES = ["UnlimitedJCEPolicyJDK7.zip", "jce_policy-6.zip"] @@ -1973,7 +1975,7 @@ def install_jdk(dest_file): retcode, out, err = run_os_command(MAKE_FILE_EXECUTABLE_CMD.format(dest_file)) retcode, out, err = run_os_command(dest_file + ' -noregister') elif dest_file.endswith(".gz"): - retcode, out, err = run_os_command(UNTAR_JDK_ARVHIVE.format(dest_file)) + retcode, out, err = run_os_command(UNTAR_JDK_ARCHIVE.format(dest_file)) else: err = "JDK installation failed.Unknown file mask." raise FatalException(1, err)
