Re: [ccache] Insufficient environment sanitization in test.sh

2018-01-06 Thread Joel Rosdahl via ccache
On 23 December 2017 at 14:49, Radu Rendec via ccache  wrote:

> I ran across a weird issue where test.sh fails in the CCACHE_NOHASHDIR
> test because the CCACHE_HASHDIR variable happens to be set in my
> environment.

[...]

My idea is to iterate through the output of `env` and unset all
> variables starting with CCACHE_ instead of listing them explicitly
> (since this is pretty much what conf_update_from_environment() does).
> Any thoughts?
>

Sounds good, I'll fix it. Thanks!

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] Insufficient environment sanitization in test.sh

2017-12-23 Thread Radu Rendec via ccache
Hi all,

I ran across a weird issue where test.sh fails in the CCACHE_NOHASHDIR
test because the CCACHE_HASHDIR variable happens to be set in my
environment.

I added a debug print in conf_update_from_environment() and the
variable that is inherited from the shell (CCACHE_HASHDIR) comes last,
so it has precedence over CCACHE_NOHASHDIR=1 that is set locally by the
test.

I would say this is a problem with test.sh, which fails to sanitize the
environment properly at the beginning of the TEST() function. Probably
this is a problem with all boolean options, which accept either the
direct or negated form (e.g. CCACHE_HASHDIR vs. CCACHE_NOHASHDIR).

My idea is to iterate through the output of `env` and unset all
variables starting with CCACHE_ instead of listing them explicitly
(since this is pretty much what conf_update_from_environment() does).
Any thoughts?

Thanks,
Radu Rendec

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache