eina_file: Give TMPDIR presedence over XDG_RUNTIME_DIR when defined
authorStefan Schmidt <s.schmidt@samsung.com>
Wed, 29 Oct 2014 14:51:11 +0000 (15:51 +0100)
committerStefan Schmidt <s.schmidt@samsung.com>
Wed, 29 Oct 2014 14:51:11 +0000 (15:51 +0100)
commite105abc99e717b84723ab35258375e27f17f8e82
tree0efccd669c64a3c3b20d2c5684c2d1a212955a76
parentd3eaafe594133fc431aadc2be3b3210f2cc66da5
eina_file: Give TMPDIR presedence over XDG_RUNTIME_DIR when defined

XDG_RUNTIME_DIR gives us a nice securty benefit by only allowing the
same user to read wand write files.

In some configuration this is problematic though. If one looks at the
bug report this fixes  for example you can see that there are build
scripts that use a special build user.

The way this has always worked on unix is that you can define your
own tempdir with TMPDIR. When I was making the original change towards
XDG_RUNTIME_DIR I expected some trouble with it but it worked quite
well so far.

To avoid breaking scripts out there and maybe configurations we
haven't tested yet give TMPDIR precedence over XDG_RUNTIME_DIR.

Fixes T1766
src/lib/eina/eina_file_common.c