1. 06 Mar, 2019 2 commits
    • Michał Kępień's avatar
      Look for named plugins in ${libdir}/named · 1a9fc624
      Michał Kępień authored
      When the "library" part of a "plugin" configuration stanza does not
      contain at least one path separator, treat it as a filename and assume
      it is a name of a shared object present in the named plugin installation
      directory.  Absolute and relative paths can still be used and will be
      used verbatim.  Get the full path to a plugin before attempting to
      check/register it so that all relevant log messages include the same
      plugin path (apart from the one logged when the full path cannot be
    • Michał Kępień's avatar
      Add ns_plugin_expandpath() · d181c28c
      Michał Kępień authored
      Implement a helper function which, given an input string:
        - copies it verbatim if it contains at least one path separator,
        - prepends the named plugin installation directory to it otherwise.
      This function will allow configuration parsing code to conveniently
      determine the full path to a plugin module given either a path or a
      While other, simpler ways exist for making sure filenames passed to
      dlopen() cause the latter to look for shared objects in a specific
      directory, they are very platform-specific.  Using full paths is thus
      likely the most portable and reliable solution.
      Also added unit tests for ns_plugin_expandpath() to ensure it behaves
      as expected for absolute paths, relative paths, and filenames, for
      various target buffer sizes.
      (Note: plugins share a directory with named on Windows; there is no
      default plugin path. Therefore the source path is copied to the
      destination path with no modification.)
  2. 05 Mar, 2019 13 commits
  3. 04 Mar, 2019 5 commits
  4. 03 Mar, 2019 1 commit
  5. 01 Mar, 2019 4 commits
  6. 28 Feb, 2019 7 commits
  7. 22 Feb, 2019 8 commits
    • Matthijs Mekking's avatar
      Merge branch '813-matthijs-failure-loading-rpz' into 'master' · a111c8d7
      Matthijs Mekking authored
      Resolve "Problems after failure of loading rpz [ISC-support #14002]"
      Closes #813
      See merge request !1507
    • Matthijs Mekking's avatar
      Update CHANGES · e5565808
      Matthijs Mekking authored
    • Matthijs Mekking's avatar
      Unregister RPZ CATZ db cbs when zone load fails · 6ed14eff
      Matthijs Mekking authored
      In case when a zone fails to load because the file does not exist
      or is malformed, we should not run the callback that updates the
      zone database when the load is done.  This is achieved by
      unregistering the callbacks if at zone load end if the result
      indicates something else than success.
    • Matthijs Mekking's avatar
      Update copyrights · 84700f97
      Matthijs Mekking authored
    • Matthijs Mekking's avatar
      Add test for rpz zone load fail · ce5476ac
      Matthijs Mekking authored
    • Matthijs Mekking's avatar
      Remove rpz->db_registered · 67562802
      Matthijs Mekking authored
      As pointed out in !813 db_registered is sort of redundant.  It is
      set to `true` only in `dns_zone_rpz_enable_db()` right before the
      `dns_rpz_dbupdate_callback()` callback is registered.  It is only
      required in that callback and it is the only place that the callback
      is registered.  Therefore there is no path that that `REQUIRE` can
      The `db_registered` variable is only set to `false` in
      `dns_rpz_new_zone`, so it is not like the variable is unset again
      The only other place where `db_registered` is checked is in
      `rpz_detach()`.  If `true`, it will call
      `dns_db_updatenotify_unregister()`.  However if that happens, the
      `db_registered` is not set back to `false` thus this implies that
      this may happen multiple times.  If called a second time, most
      likely the unregister function will return `ISC_R_NOTFOUND`, but
      the return value is not checked anyway.  So it can do without the
      `db_registered` check.
    • Matthijs Mekking's avatar
      Add curly brackets on if statements · 2e5e4296
      Matthijs Mekking authored
    • Matthijs Mekking's avatar
      named crashes on shutdown after load rpz failed · a490c091
      Matthijs Mekking authored
      This may happen when loading an RPZ failed and the code path skips
      calling dns_db_endload().  The dns_rpz_zone_t object is still kept
      marked as having registered db.  So when this object is finally
      destroyed in rpz_detach(), this code will incorrectly call
         if (rpz->db_registered)
                                          dns_rpz_dbupdate_callback, rpz);
      and trigger this assertion failure:
         REQUIRE(db != NULL);
      To fix this, only call `dns_db_updatenotify_unregister()` when
      `rpz->db` is not NULL.