activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Casey (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-2726) init.d script fails if RUN_AS_GROUP not defined due to typo
Date Fri, 07 May 2010 15:17:46 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Casey updated AMQ-2726:
-----------------------------

    Description: 
In the supplied init.d scripts for linux there is a typo 

{{RUN_AS_GROUP=RUN_AS_USER}}

which should be 

{{RUN_AS_GROUP=$RUN_AS_USER}}

We have this in our patches on our production server so we must have hit the problem at some
point, but looking at the code it's not even clear the case that this code would be called
(RUN_AS_USER set to a user which does not have a primary group) could ever happen on a well-configured
mahcine:

{code}
RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
if [ "X$RUN_AS_GROUP" = "X" ]
then
    RUN_AS_GROUP=RUN_AS_USER
fi
{code}

Patch attached to do the change above, but perhaps the whole IF statement should be deleted.

  was:
In the supplied init.d scripts for linux there is a typo 

{{RUN_AS_GROUP=RUN_AS_USER}}

which should be 

{{RUN_AS_GROUP=$RUN_AS_USER}}

Looking at the code it's not even clear the case that this code would be called (RUN_AS_USER
set to a user which does not have a primary group) could ever happen:

{code}
RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
if [ "X$RUN_AS_GROUP" = "X" ]
then
    RUN_AS_GROUP=RUN_AS_USER
fi
{code}

Patch attached to do the change above, but perhaps the whole IF statement should be deleted.


> init.d script fails if RUN_AS_GROUP not defined due to typo
> -----------------------------------------------------------
>
>                 Key: AMQ-2726
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2726
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>         Environment: activemq trunk, RHEL5
>            Reporter: James Casey
>            Priority: Trivial
>         Attachments: run-as-group.patch
>
>
> In the supplied init.d scripts for linux there is a typo 
> {{RUN_AS_GROUP=RUN_AS_USER}}
> which should be 
> {{RUN_AS_GROUP=$RUN_AS_USER}}
> We have this in our patches on our production server so we must have hit the problem
at some point, but looking at the code it's not even clear the case that this code would be
called (RUN_AS_USER set to a user which does not have a primary group) could ever happen on
a well-configured mahcine:
> {code}
> RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
> if [ "X$RUN_AS_GROUP" = "X" ]
> then
>     RUN_AS_GROUP=RUN_AS_USER
> fi
> {code}
> Patch attached to do the change above, but perhaps the whole IF statement should be deleted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message