Smart proxy - dnscmd - case sensitivity issues

We've just installed the smart proxy on a Windows server to use as a DNS
and DHCP smart proxy. When trying to create hosts using the proxy, we get
the message:
"The DNS server has no authoritative zone for someserver.whatever.com"
What I have found is that our DNS zone is actually something like
Whatever.com, and has capital letters in MS DNS. In foreman, it's set to
whatever.com, no capitals. (If I try to use a subnet with capitals, when
attempting to build a host, Foreman ends up trying to append the domain to
the hostname on host creation and I get the error "Name must not include
periods" which seems like some sort of bug, so I'm just trying to get this
to work instead.)
I looked through this:
https://github.com/theforeman/smart-proxy/blob/develop/modules/dns_dnscmd/dns_dnscmd_main.rb
and what I'm guessing is what is happening is that when is does 'def
match_zone' that it's comparing the result that the dnscmd came back with,
which has capitals, and the domain foreman is supplying, which does not and
the command fails because Ruby is case sensitive. My question is, would it
make sense to patch this function to be case insensitive? I'm also not sure
where the best place to do that would be in that script.

Thanks.

> https://github.com/theforeman/smart-proxy/pull/429 Fixes this.
Good catch; never thought this was even possible.

Why is it closed?

··· On 08.06.2016 03:07, Jack Watroba wrote:

On Tuesday, June 7, 2016 at 1:41:43 PM UTC-7, Jack Watroba wrote:

We’ve just installed the smart proxy on a Windows server to use as a DNS
and DHCP smart proxy. When trying to create hosts using the proxy, we get
the message:
"The DNS server has no authoritative zone for someserver.whatever.com"
What I have found is that our DNS zone is actually something like
Whatever.com, and has capital letters in MS DNS. In foreman, it’s set to
whatever.com, no capitals. (If I try to use a subnet with capitals, when
attempting to build a host, Foreman ends up trying to append the domain to
the hostname on host creation and I get the error “Name must not include
periods” which seems like some sort of bug, so I’m just trying to get this
to work instead.)
I looked through this:
https://github.com/theforeman/smart-proxy/blob/develop/modules/dns_dnscmd/dns_dnscmd_main.rb
and what I’m guessing is what is happening is that when is does ‘def
match_zone’ that it’s comparing the result that the dnscmd came back with,
which has capitals, and the domain foreman is supplying, which does not and
the command fails because Ruby is case sensitive. My question is, would it
make sense to patch this function to be case insensitive? I’m also not sure
where the best place to do that would be in that script.

Thanks.


Daniel Helgenberger (helge000)
daniel@helgenberger.net

It was PR 431 in the end and commit e182f9a0, due for inclusion in 1.12.1.

··· On 10/06/16 11:09, Daniel Helgenberger wrote: > > > On 08.06.2016 03:07, Jack Watroba wrote: >> https://github.com/theforeman/smart-proxy/pull/429 Fixes this. > Good catch; never thought this was even possible. > > Why is it closed?


Dominic Cleal
dominic@cleal.org