dhcpcd-discuss

Re: nonstandard options missing from --dumplease in 6.10.1

Roy Marples

Sun Oct 22 09:18:33 2017

I tested with bash and dash, the two shells Debian ships with and neither now work with a - in the variable name when exported using the env command. So they could rightly argue it's a bug fix and not a regression.

If you wanted to keep using - then use something other than a shell to extract the data.

I wouldn't bother reporting this.

Roy

On 22 Oct 2017 00:57, Mike McCabe <mike@xxxxxxxx> wrote:
I've just verified this in our environment.

Thank you!  You've saved is a bunch of trouble!

Do you think this is worth bringing up with Debian as a potential regression?  Obviously it's not specific to dhcpcd, but to how it's used...

Mike

On Sat, Oct 21, 2017 at 7:18 AM, Roy Marples <roy@marples.name> wrote:
Hi Mike

On 19/10/2017 23:45, Mike McCabe wrote:
Thanks for testing!  I'm still able to reproduce the issue, stock raspbian jessie lite works vs. raspbian stretch lite doesn't... in each case with option vium-env lines added to dhcpcd.conf



$ dhcpcd -V4 | grep vium
239 vium-env                                     string

$ dhcpcd -U4 eth0 | grep vium
domain_name='vium.com <http://vium.com>'
< no vium-env >

I've been so blind!
It's not a dhcpcd bug per se, but the shell you're using.
dhcpcd just sets env vars as given, however, it makes no attempt to sanitize them instead leaving it up to whatever the hook uses.
In this case it's /bin/sh.
I'm guessing there has been an upgrade there which stops - being used in environment vars. You aren't allowed - in shell variables, and you use shell variables to extract env vars.

Try changing from vium-env to vium_env and you'll find this working should be working.
I had to test this on a Debian derivative box to actually track this one down.

Roy



References:
Re: nonstandard options missing from --dumplease in 6.10.1Mike McCabe
Archive administrator: postmaster@marples.name