[PATCH 00/31] Add complete DNS Faking using resolv_wrapper.

Andreas Schneider asn at samba.org
Wed Dec 3 07:44:56 MST 2014


Hello,

the following patchset integrates resolv_wrapper 1.1.0 to Samba and uses
it in DNS faking mode. Currently we have some bugs in our DNS server
which don't allow to use it. Until this is fixed we will operate in DNS
faking mode on all platforms. It will be easy to change this later.

Implementing DNS faking this way allows 3rd party applications to also
do DNS queries using libresolv. This allows us to correctly test the
Samba DC with MIT Kerberos and also the Samba libraries which use DNS
queries to find out the IP of the DC will always use the codepath they
will use in a real evironment.

Please review soon as we need this to finish our MIT Kerberos work!

The patches are available in git too:

https://git.samba.org/?p=asn/samba.git;a=shortlog;h=refs/heads/resolv_wrapper


     -- andreas


Andreas Schneider (22):
  selftest: Add the normal dns name as an alias for the main DC.
  lib: Add resolv_wrapper version 1.0.0.
  rwrap: Handle trailing dot in dns names.
  rwrap: Correctly calculate the response size and return it.
  rwrap: Bump version to 1.1.0.
  selftest: Preload resolv_wrapper in selftest.
  selftest: Also pass the IPv6 address for the KDC around.
  selftest: Use resolv_wrapper in the samba4 target.
  selftest: Use resolve_wrapper in the samba3 targets to join AD.
  nmblookup: Return if the lookup was successful or not.
  selftest: Wait for the logon server to register to join the member.
  selftest: Print better DC provisioning info.
  samba_dnsupdate: Allow the tool to work in 'make test'.
  samba_dnsupdate: Always fill out the nameservers of a dns object.
  selftest: Define if we should fake dns resolving.
  selftest: Add support for dns faking in Samba4 target.
  selftest: Add support for dns faking in Samba3 target.
  selftest: Always enable dns fakeing.
  addns: Remove support for dns_host_file.
  s4-libcli: Remove obsolete support for file resolving.
  s3-libsmb: Remove obsolete support for dns_host_file.
  libcli-dns: Remove obsolete dns_host_file subsystem.

Jakub Hrozek (9):
  rwrap: Compare dns names case insensitive.
  rwrap: Add data structures and functions to represent and manipulate
    RRs.
  rwrap: Use the rwrap_fake_rr structure instead of raw uint8_t
    pointers.
  rwrap: SRV record can recurse into A or AAAA.
  rwrap: CNAME record can recurse into A, AAAA or CNAME
  rwrap: Make the rwrap_fake_* functions only fake RRs.
  rwrap: Recursively add additional data
  rwrap: Support asking for A via CNAME
  rwrap: Don't dereference NULL when skipping broken records.

 lib/addns/dnsquery.c                  |   96 +-
 lib/addns/dnsquery.h                  |    7 -
 lib/addns/wscript_build               |    2 +-
 lib/resolv_wrapper/resolv_wrapper.c   | 1713 +++++++++++++++++++++++++++++++++
 lib/resolv_wrapper/wscript            |   94 ++
 libcli/dns/dns.h                      |   12 -
 libcli/dns/dns_hosts_file.c           |  434 ---------
 libcli/dns/wscript_build              |    4 -
 libcli/nbt/libnbt.h                   |    6 -
 selftest/selftest.pl                  |   42 +-
 selftest/target/Samba3.pm             |   88 +-
 selftest/target/Samba4.pm             |  168 +++-
 selftest/wscript                      |    8 +
 source3/libads/ldap.c                 |   10 +-
 source3/libsmb/dsgetdcname.c          |   48 +-
 source3/libsmb/namequery.c            |   48 +-
 source3/utils/net_ads.c               |   14 +-
 source3/utils/net_lookup.c            |   16 +-
 source3/utils/nmblookup.c             |   25 +-
 source4/libcli/resolve/dns_ex.c       |    2 +-
 source4/libcli/resolve/file.c         |  160 ---
 source4/libcli/resolve/resolve_lp.c   |    2 -
 source4/libcli/wscript_build          |    2 +-
 source4/scripting/bin/samba_dnsupdate |   17 +-
 wscript                               |    1 +
 wscript_build                         |    1 +
 26 files changed, 2219 insertions(+), 801 deletions(-)
 create mode 100644 lib/resolv_wrapper/resolv_wrapper.c
 create mode 100644 lib/resolv_wrapper/wscript
 delete mode 100644 libcli/dns/dns_hosts_file.c
 delete mode 100644 source4/libcli/resolve/file.c

-- 
2.1.3




More information about the samba-technical mailing list