Bug #7508
closed
The rudder-agent cron on AIX uses if then, which makes some security test fails
Added by Nicolas CHARLES almost 9 years ago.
Updated almost 9 years ago.
Category:
System integration
Description
Some security tools on AIX checks the content on the cron, and expect only binaries there
However, we are using if and then, which make the tool complain, as they are not binaries
I'm not sure if it is a rudder bug or the tool that is too strict; but I'm tracing it.
What is the cron line that triggers these test failures?
the only one set on AIX
if [ -x /opt/rudder/bin/check-rudder-agent ]; then /opt/rudder/bin/check-rudder-agent >/dev/null; fi
Does it test && ?
We can use this line instead
[ -x /opt/rudder/bin/check-rudder-agent ] && /opt/rudder/bin/check-rudder-agent >/dev/null
Unfortunately, this does not work
0,5,10,15,20,25,30,35,40,45,50,55 * * * * [ -x /opt/rudder/bin/check-rudder-agent ] && /opt/rudder/bin/check-rudder-agent >/dev/null
Detailed debug from aixpert:
***** AIX MACHINE : Nov 30 17:09:47 ******
rootcrnjobck.sh: Cronjob [ do not have a binary/script associated with it
Well, the whole test if the file exists is a bit superfluous. We could just run the script, no?
Jonathan CLARKE wrote:
Well, the whole test if the file exists is a bit superfluous. We could just run the script, no?
I do agree, but if we really want to keep it, we can use
test -x /opt/rudder/bin/check-rudder-agent && /opt/rudder/bin/check-rudder-agent
as it passes the tests
- Target version changed from 3.2.0~beta1 to 2.10.20
- Status changed from New to In progress
- Assignee set to Jonathan CLARKE
- Status changed from In progress to Pending technical review
- Assignee changed from Jonathan CLARKE to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/809
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Actually, using the whole path would even be better !
- Related to Bug #7525: Use whole path to binaries in cron from check-rudder-agent on AIX added
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.10.20, 2.11.17, 3.0.12 and 3.1.5 which were released today.
Also available in: Atom
PDF