Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3CCF11BBE for ; Fri, 5 Sep 2014 11:12:28 +0000 (UTC) Received: (qmail 37022 invoked by uid 500); 5 Sep 2014 11:12:28 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 36986 invoked by uid 500); 5 Sep 2014 11:12:28 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 36977 invoked by uid 500); 5 Sep 2014 11:12:28 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 36974 invoked by uid 99); 5 Sep 2014 11:12:28 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2014 11:12:28 +0000 Date: Fri, 5 Sep 2014 11:12:28 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-7476) centos cloudstack-usage script does not always pass along $JAVA_HOME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14122798#comment-14122798 ] ASF GitHub Bot commented on CLOUDSTACK-7476: -------------------------------------------- Github user karuturi commented on the pull request: https://github.com/apache/cloudstack/pull/15#issuecomment-54612516 committed https://github.com/apache/cloudstack/commit/0ec36e128bb06704bfe4e9b115aaf4680ee61a43 > centos cloudstack-usage script does not always pass along $JAVA_HOME > -------------------------------------------------------------------- > > Key: CLOUDSTACK-7476 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7476 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Usage > Affects Versions: 4.5.0 > Environment: secured centos/redhat > Reporter: Leo Simons > Fix For: 4.5.0 > > > /etc/init.d/cloudstack-usage finds a $JAVA_HOME and makes sure the environment variable is set, then assumes this variable will be picked up by JSVC. > However, on a secured environment (selinux w/ env_reset enabled in sudoers), the runuser command that is invoked by the daemon() function does not pass along environment variables, so $JAVA_HOME is empty, and JSVC falls back to its default behavior, which may not find java or may not find the intended java. > The simple solution is to pass -home to JSVC, passing it on the command line instead of as an environment variable. > I'll provide a patch. -- This message was sent by Atlassian JIRA (v6.3.4#6332)