s4-dnsserver: Compare two dns names using last uncommon name components
authorAmitay Isaacs <amitay@gmail.com>
Mon, 24 Oct 2011 06:07:45 +0000 (17:07 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 2 Nov 2011 04:26:54 +0000 (15:26 +1100)
commitc1b45afcf254ed0bbb36b125e440a2731c253e63
treec7fc80306a6543ed49d7090408f7e1782b83cacc
parentc651b4e99b8bd70eb3be7b3d416c329b4d506f76
s4-dnsserver: Compare two dns names using last uncommon name components

When search_name is not NULL, use the second last component of name
instead of the last name.

e.g. To compare following two names,
   _ldap._tcp.gc, and
   _ldap._tcp.Default-First-Site-Name._sites.gc

with search_name=NULL, it is gc and gc
with search_name=gc, it is _tcp and _sites

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/rpc_server/dnsserver/dnsdata.c