Commit Graph

23 Commits

Author SHA1 Message Date
Viktor Dukhovni
529a91d69a MacOS/X fixes 2016-06-09 01:13:14 -04:00
Nicolas Williams
b48bed5f42 Daemons detach atomically to avoid having to wait
Tests that start daemons have to "wait" for them to start.

This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready.  The parent exits only which the child is
ready.  This means that tests will no longer need to wait for daemons.

However, tests will still need a pidfile or such so they can stop the
daemons.

Note that the --detach options should not be used on OS X from launchd,
only from tests.
2015-03-24 11:49:59 -05:00
Love Hornquist Astrand
1d84562886 add HDBGET: that only supports get, iteration doesnt really make sense for the HDB keytab except when dumping 2013-10-15 12:40:39 +02:00
Love Hornquist Astrand
c1423a8eea redo plugin interface 2013-02-10 22:50:49 -08:00
Love Hornquist Astrand
58ff480763 rewrite send to kdc to be more agressive, try kdcs in paralell and easier to configure behavior 2013-02-10 19:02:52 -08:00
Love Hornquist Astrand
8ceff72d80 enabled the performance hack 2012-12-27 13:06:25 +01:00
Love Hornquist Astrand
4e40f3e30f Make a memory copy of the keytab to avoid unbuffered krb5_storage
300req/s faster (20% performance increase)
2012-12-27 12:40:40 +01:00
Nicolas Williams
f4ba41ebdd Pluggable libheimbase interface for DBs and misc libheimbase enhancements
[Code reviewed by Love Hörnquist Åstrand <lha@kth.se>]

    Added heim_db_*() entry points for dealing with databases, and
    make krb5_aname_to_localname() use it.

    The following enhancements to libheimbase are included:

     - Add heim_data_t and heim_string_t "reference" variants to
       avoid memory copies of potentially large data/strings.

       See heim_data_ref_create() and heim_string_ref_create().

     - Added enhancements to heim_array_t to allow their use for
       queues and stacks, and to improve performance.  See
       heim_array_insert_value().

     - Added XPath-like accessors for heim_object_t.  See
       heim_path_get(), heim_path_copy(), heim_path_create(), and
       heim_path_delete().  These are used extensively in the DB
       framework's generic composition of ACID support and in the
       test_base program

     - Made libheimbase more consistent with Core Foundation naming
       conventions.  See heim_{dict, array}_{get, copy}_value() and
       heim_path_{get, copy}().

     - Added functionality to and fixed bugs in base/json.c:
        - heim_serialize();
        - depth limit for JSON parsing (for DoS protection);
        - pretty-printing;
        - JSON compliance (see below);
        - flag options for parsing and serializing; these are needed
          because of impedance mismatches between heim_object_t and
          JSON (e.g., heim_dict_t allows non-string keys, but JSON
          does not; heimbase supports binary data, while JSON does
          not).

     - Added heim_error_enomem().

     - Enhanced the test_base program to test new functionality and
       to use heim_path*() to better test JSON encoding.  This
       includes some fuzz testing of JSON parsing, and running the
       test under valgrind.

     - Started to add doxygen documentation for libheimbase (but doc
       build for libheimbase is still incomplete).

    Note that there's still some incomplete JSON support:

     - JSON string quoting is not fully implemented;

     - libheimbase lacks support for real numbers, while JSON has
       it -- otherwise libheimbase is a superset of JSON,
       specifically in that any heim_object_t can be a key for an
       associative array.

    The following DB backends are supported natively:

     - "sorted-text", a binary search of sorted (in C locale), flat
       text files;

     - "json", a backend that stores DB contents serialized as JSON
       (this is intended for configuration-like contents).

    The DB framework supports:

     - multiple key/value tables per-DB
     - ACID transactions

    The DB framework also natively implements ACID transactions for
    any DB backends that a) do not provide transactions natively, b)
    do provide lock/unlock/sync methods (even on Windows).  This
    includes autocommit of DB updates outside transactions.

    Future DB enhancements may include:

     - add backends for various DB types (BDB, CDB, MDB, ...);

     - make libhdb use heim_db_t;

     - add a command-line tool for interfacing to databases via
       libheimbase (e.g., to get/set/delete values, create/copy/
       backup DBs, inspect history, check integrity);

     - framework-level transaction logging (with redo and undo
       logging), for generic incremental replication;

     - framework-level DB integrity checking.

       We could store a MAC of the XOR of a hash function applied to
       {key, value} for every entry in the DB, then use this to check
       DB integrity incrementally during incremental replication, as
       well as for the whole DB.
2012-02-05 16:26:32 -06:00
Nicolas Williams
11763aecc7 There's no HEIM_BOOL_TRUE; use heim_bool_create(1) instead 2012-01-13 16:18:50 -06:00
Love Hornquist Astrand
07a88f4b5a use no-store 2012-01-10 22:54:16 +01:00
Love Hornquist Astrand
9b0bc022f1 support kgetcred 2012-01-10 22:54:16 +01:00
Love Hörnquist Åstrand
fa304162db test rsa mode too 2011-11-23 09:43:56 -08:00
Love Hörnquist Åstrand
04895ee955 extract out perf number code 2011-11-23 07:10:35 -08:00
Love Hörnquist Åstrand
dce7b990ed handle writing credential into ccache, use them in as fast-ccache and then destory them 2011-11-22 17:57:05 -08:00
Nicolas Williams
35f4032381 Add PKINIT support in kdc-tester and check-tester 2011-11-22 18:48:41 -06:00
Nicolas Williams
d630567f70 Add performance measurements for FAST (with host key and user keys, not password) 2011-11-22 17:05:06 -06:00
Love Hornquist Astrand
72e88209f8 support keytab testing (and use it) 2011-11-22 11:00:51 -08:00
Nicolas Williams
1572b762b6 Fix missing symbols. 2011-11-22 00:32:52 -06:00
Love Hörnquist Åstrand
a82fb8ae3e perf counter 2011-11-21 20:57:17 -08:00
Love Hörnquist Åstrand
af7f0eb746 less verbose 2011-11-21 20:34:36 -08:00
Love Hörnquist Åstrand
6af6e27c50 glue in send_to_kdc 2011-11-21 20:34:36 -08:00
Love Hörnquist Åstrand
c4721dd1d0 add basic support for pkinit 2011-11-21 20:34:35 -08:00
Love Hörnquist Åstrand
503266c4a3 use json to drive kdc-tester 2011-11-21 20:34:35 -08:00