[PATCH] Add DNS widkcard support.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
Patches to add support for DNS wild card records.

Tests validated against Windows server 2012 R2

Reviews and push appreciated

Gary.

0001-dnsserver-Tests-for-dns-wildcard-entries.patch (14K) Download Attachment
0002-dnsserver-Add-support-for-dns-wildcards.patch (15K) Download Attachment
0003-samba-tool-dns-query-Allow-in-names.patch (1K) Download Attachment
signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
On Thu, 2017-07-27 at 14:00 +1200, Gary Lockyer via samba-technical
wrote:
> Patches to add support for DNS wild card records.
>
> Tests validated against Windows server 2012 R2
>
> Reviews and push appreciated

Thanks Gary,

My biggest concern here is in the re-parsing of the DN as a string, and
then the manipulations required to try and create the wildcard
searches.

Can we instead parse this into a struct ldb_parse_tree and use routines
like ldb_dn_get_rdn_name() and ldb_dn_get_rdn_val() to work out the
bits you want from the original DN, and use LDB_SCOPE_ONELEVEL to
ensure you don't look further down the tree than you expect.

That should make the string work here seem much more mundane.

Thanks,

Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT  
https://catalyst.net.nz/services/samba





Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
On Thu, Jul 27, 2017 at 03:31:01PM +1200, Andrew Bartlett via samba-technical wrote:

> On Thu, 2017-07-27 at 14:00 +1200, Gary Lockyer via samba-technical
> wrote:
> > Patches to add support for DNS wild card records.
> >
> > Tests validated against Windows server 2012 R2
> >
> > Reviews and push appreciated
>
> Thanks Gary,
>
> My biggest concern here is in the re-parsing of the DN as a string, and
> then the manipulations required to try and create the wildcard
> searches.
>
> Can we instead parse this into a struct ldb_parse_tree and use routines
> like ldb_dn_get_rdn_name() and ldb_dn_get_rdn_val() to work out the
> bits you want from the original DN, and use LDB_SCOPE_ONELEVEL to
> ensure you don't look further down the tree than you expect.
>
> That should make the string work here seem much more mundane.

Also, a bit nit-picking: Passing down boolean flags is always
completely opaque for the caller. "true" and "false" don't have a
visible meaning themselves, you will always have to look up what this
exactly means. Can we make two routines with obvious names for the
external callers? If absolutely required, they can then pass down a
flag to an internal routine. But if that can be avoided also, even
better.

Thanks, Volker

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
Updated patch set incorporating Andrews and Volkers feedback.

Reviews appreciated.

Gary



On 27/07/17 18:10, Volker Lendecke wrote:

> On Thu, Jul 27, 2017 at 03:31:01PM +1200, Andrew Bartlett via samba-technical wrote:
>> On Thu, 2017-07-27 at 14:00 +1200, Gary Lockyer via samba-technical
>> wrote:
>>> Patches to add support for DNS wild card records.
>>>
>>> Tests validated against Windows server 2012 R2
>>>
>>> Reviews and push appreciated
>>
>> Thanks Gary,
>>
>> My biggest concern here is in the re-parsing of the DN as a string, and
>> then the manipulations required to try and create the wildcard
>> searches.
>>
>> Can we instead parse this into a struct ldb_parse_tree and use routines
>> like ldb_dn_get_rdn_name() and ldb_dn_get_rdn_val() to work out the
>> bits you want from the original DN, and use LDB_SCOPE_ONELEVEL to
>> ensure you don't look further down the tree than you expect.
>>
>> That should make the string work here seem much more mundane.
>
> Also, a bit nit-picking: Passing down boolean flags is always
> completely opaque for the caller. "true" and "false" don't have a
> visible meaning themselves, you will always have to look up what this
> exactly means. Can we make two routines with obvious names for the
> external callers? If absolutely required, they can then pass down a
> flag to an internal routine. But if that can be avoided also, even
> better.
>
> Thanks, Volker
>

0001-dnsserver-Tests-for-dns-wildcard-entries.patch (14K) Download Attachment
0002-dnsserver-Tighten-DNS-name-checking.patch (2K) Download Attachment
0003-dnsserver-Add-support-for-dns-wildcards.patch (16K) Download Attachment
0004-samba-tool-dns-query-Allow-in-names.patch (1K) Download Attachment
signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
On Fri, 2017-08-04 at 07:19 +1200, Gary Lockyer via samba-technical
wrote:
> Updated patch set incorporating Andrews and Volkers feedback.
>
> Reviews appreciated.

Reviewed-by: Andrew Bartlett <[hidden email]>
Reviewed-by: Garming Sam <[hidden email]>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12952

I've pushed the attached to autobuild.

Thanks!

Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT  
https://catalyst.net.nz/services/samba




gary-dns-wildcard.patch.txt (52K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Add DNS widkcard support.

Samba - samba-technical mailing list
Updated patches fixing the error handling.



On 09/08/17 16:12, Andrew Bartlett via samba-technical wrote:

> On Fri, 2017-08-04 at 07:19 +1200, Gary Lockyer via samba-technical
> wrote:
>> Updated patch set incorporating Andrews and Volkers feedback.
>>
>> Reviews appreciated.
>
> Reviewed-by: Andrew Bartlett <[hidden email]>
> Reviewed-by: Garming Sam <[hidden email]>
>
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12952
>
> I've pushed the attached to autobuild.
>
> Thanks!
>
> Andrew Bartlett
>


0005-samba-tool-dns-query-Allow-in-names.patch (1K) Download Attachment
0004-samba-tool-dns-Test-support-of-DNS-wild-card-in-name.patch (4K) Download Attachment
0003-dnsserver-Add-support-for-dns-wildcards.patch (16K) Download Attachment
0002-dnsserver-Tighten-DNS-name-checking.patch (2K) Download Attachment
0001-dnsserver-Tests-for-dns-wildcard-entries.patch (14K) Download Attachment
signature.asc (484 bytes) Download Attachment