Description of problem: With the fixes to the default user file-creation mask introduced by bug 1024526, the rhq-agent.sh or rhq-agent-wrapper.sh now produce undesired and possibly confusing output in the event that RHQ_AGENT_UMASK is not set/defined. Version-Release number of selected component (if applicable): 3.2.0 How reproducible: Always Steps to Reproduce: 1. Install JBoss ON system 2. Update rhq-agent-env.sh to remove RHQ_AGENT_UMASK Alternatively, it can be changed from: RHQ_AGENT_UMASK=007 To: RHQ_AGENT_UMASK= 3. Start agent. Actual results: 0002 Starting RHQ Agent... Expected results: Starting RHQ Agent... Additional info: This is because the command `umask` without parameters prints the current effective user file-creation mask. As with any user definable value, basic data validation should be performed to ensure that this value can be used. A more suitable change may be something like: # set a default if not already set [ -z "${RHQ_AGENT_UMASK}" ] && RHQ_AGENT_UMASK=007 # when we actually go to use it, make sure it is actually set [ ! -z "${RHQ_AGENT_UMASK}" ] && umask ${RHQ_AGENT_UMASK} An even better option would be something like: # set a default if not already set [ -z "${RHQ_AGENT_UMASK}" ] && RHQ_AGENT_UMASK=007 umask ${RHQ_AGENT_UMASK} >/dev/null || { echo >&2 "RHQ_AGENT_UMASK contains an invalid umask value of [${RHQ_AGENT_UMASK}]" }
commit 5a2ef6a47b7e7d51236637f18f8f77ec02ebe20f Author: Stefan Negrea <snegrea> Date: Mon Feb 10 14:09:49 2014 -0600 [BZ 1037809] Add code set the default umask if the user makes a mistakes and removes the definition from the env sc Signed-off-by: Libor Zoubek <lzoubek> commit 1d19b218993ef276908cdaed8ad1f1ce1aeed549 Author: Stefan Negrea <snegrea> Date: Mon Feb 10 13:52:52 2014 -0600 [BZ 1037809, 1024526] Fix for agent file permissions and related umask settings. Signed-off-by: Libor Zoubek <lzoubek>
commit 1b59b9260557ac527c53e320fea56c4e2110b4c0 Author: Stefan Negrea <snegrea> Date: Tue Feb 18 09:00:46 2014 -0600 [BZ 1037809] Rewrite default umask code to a more traditional shell script syntax to avoid incompatibilities with o (cherry picked from commit a18b558af3479687d89392bdb7bc99bac4d00f8b) Signed-off-by: Libor Zoubek <lzoubek>
Moving to ON_QA as available for testing in the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=340294 Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA. How this will be delivered to customers is still being discussed.
Moving to VERIFIED. The undesirable output of umask (with na mask specified) is not displayed anymore. Tested on JON 3.2.1 DR02 (Build Number: d18651a:f535707), Firefox 26
JON 3.2.1 released week of 5/5/2014