Petr Malik 004403c7b7 Do not use '/tmp' as default guestagent log location
The Problem:
Redstack sets 'GUEST_LOGDIR' to the 'log_dir' value from
'etc/trove/trove-guestagent.conf.sample' which happens to be '/tmp/'.

Aside from not being the canonical log file destination,
temporary directory in Linux is a subject to the, so called,
'restricted deletion' policy which dictates that only file owners
(and the directory owner) can delete the files, irrespective of
other access modifiers on the directory.

Redstack changes the owner of 'GUEST_LOGDIR' (default='/tmp')
to the 'trove' user. This may easily mask any potential issues with
the 'restricted deletion' that would only show up later on
production systems where '/tmp' is commonly owned by the root
(see bug/1423759).

The Solution:
Change the default value of 'log_dir' to a directory
which is not subject to the 'restricted deletion'.
Chose '/var/log/trove/' as it is a common place for
trove-related log files on the guestagent.

Change-Id: I39d801a7e19f329c129a0c6df0c3987049d16394
Closes-Bug: 1423760
Related-Bug: 1423759
Depends-On: I9dd6ed543a01ecc4f84065ea4bf3737960de6e24
2015-02-20 12:09:30 -05:00
..
2014-12-23 12:56:19 -08:00