cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-7476) centos cloudstack-usage script does not always pass along $JAVA_HOME
Date Fri, 05 Sep 2014 08:52:28 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14122692#comment-14122692
] 

ASF GitHub Bot commented on CLOUDSTACK-7476:
--------------------------------------------

Github user lsimons commented on the pull request:

    https://github.com/apache/cloudstack/pull/15#issuecomment-54600044
  
    I'm afraid not. This fix actually counts on setJavaHome() succeeding -- but _after_ that,
that value does not make it to JSVC. The call to daemon calls runuser which, depending on
configuration, *does not pass along environment variables like JAVA_HOME*.


> 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)

Mime
View raw message