[Zlib-devel] [PATCH 10/12] add ZLIB_LEVEL environmental variable

Andrew Lutomirski andy at luto.us
Fri Dec 13 19:36:19 EST 2013


On Fri, Dec 13, 2013 at 4:29 PM, Jim Kukunas
<james.t.kukunas at linux.intel.com> wrote:
> On Fri, Dec 13, 2013 at 04:23:27PM -0800, Andrew Lutomirski wrote:
>> On Fri, Dec 13, 2013 at 3:13 PM, Jim Kukunas
>> <james.t.kukunas at linux.intel.com> wrote:
>> > The goal is to provide a way for a system administrator
>> > to easily override the deflate level. This environmental
>> > variable is checked in deflateInit, and takes precedence
>> > over the level set by the api.
>>
>> I have to admit that I don't like this.  Why should environment
>> variables be allowed to override an explicit instruction to the API?
>> What's the use case?
>
> Hi Andrew,
>
> The use case is for software that utilizes zlib, but does not expose
> a tunable for controlling the compression level. This environment
> variable would allow a system administrator to change the compression
> level without recompiling those applications.

IMO this should be opt-in by the application.  For example, there
could be an extra level, set of levels, or flag that says "allow
override".

I don't love the idea of ZLIB_LEVEL=1 setuid_program whatever causing
strange results.

--Andy

>
> Thanks.
>
> --
> Jim Kukunas
> Intel Open Source Technology Center
>
> _______________________________________________
> Zlib-devel mailing list
> Zlib-devel at madler.net
> http://mail.madler.net/mailman/listinfo/zlib-devel_madler.net
>




More information about the Zlib-devel mailing list