Commit Graph

3653 Commits

Author SHA1 Message Date
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
7d7624f7f7 Fix CVE-2011-4862 Buffer overflow in libtelnet/encrypt.c in telnetd
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-4862
    http://security.freebsd.org/advisories/FreeBSD-SA-11:08.telnetd.asc
    http://security.freebsd.org/patches/SA-11:08/telnetd.patch
2011-12-28 17:50:30 -06:00
Nicolas Williams
89bae59b49 Fix error clobbering bug and code review comments 2011-12-02 01:04:22 -06:00
Nicolas Williams
659c761213 Add private text file binary search API to libheimbase 2011-12-02 01:02:44 -06:00
Nicolas Williams
265d9ba5ca Error/warning cleanups for clang (LLVM) 2011-11-28 14:42:06 -06:00
Love Hornquist Astrand
84caf5bbd8 jgssapi_server is a java file 2011-11-09 08:04:52 -08:00
Nicolas Williams
40a7d4b62f More fixes for -Werror (GCC 4.6 catches more stuff) 2011-11-02 23:20:55 -05:00
Nicolas Williams
3bebbe5323 Fixes to make Heimdal -Wall -Werror clean
These fixes make developer mode build, at least on Ubuntu.
2011-11-02 21:42:08 -05:00
Love Hornquist Astrand
483afb3390 avoid compile warning 2011-10-29 19:14:14 -07:00
Love Hornquist Astrand
00773b4119 test verify_mic is both directions 2011-09-25 20:38:17 +02:00
Love Hornquist Astrand
d9dc7c9761 try read message in java code too 2011-09-25 19:40:02 +02:00
Love Hornquist Astrand
aabe9f0f4a let client do unwrap, handle keytab for gss 2011-09-22 16:10:06 +02:00
Love Hornquist Astrand
d3b5bc36fe support ipv6 and don't use channelbindings 2011-08-10 17:25:09 -07:00
Love Hornquist Astrand
960b5d4c5b include jgssapi_server.c 2011-08-10 17:24:20 -07:00
Love Hornquist Astrand
ed573ce9fa test java gssapi server 2011-08-10 17:24:01 -07:00
Love Hörnquist Åstrand
d8ae7b5a35 drop krb4 2011-08-10 09:28:16 -07:00
Love Hörnquist Åstrand
4c639408e6 drop krb4 2011-08-10 09:27:48 -07:00
Love Hörnquist Åstrand
308d15615e drop krb4 2011-08-10 09:27:14 -07:00
Love Hörnquist Åstrand
47fee3d056 drop krb4 2011-08-10 09:26:31 -07:00
Love Hörnquist Åstrand
1828443089 drop krb4 2011-08-10 09:26:20 -07:00
Love Hörnquist Åstrand
fc3b4fcd3e drop unused KRB4 bits 2011-07-30 14:17:09 -07:00
Love Hörnquist Åstrand
c97322adf2 fix compile warning 2011-07-24 15:46:11 -07:00
Love Hörnquist Åstrand
16eabf8e4c add an invalid protection level to the enum 2011-07-24 14:00:23 -07:00
Marc Balmer
ae9ac01f3f Typo
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 10:29:47 -07:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hörnquist Åstrand
09b07e9ef4 fix ifdef 2011-06-19 10:58:50 -07:00
Love Hörnquist Åstrand
625d29fc3e remove unused ifdef 2011-06-19 10:58:35 -07:00
Love Hörnquist Åstrand
749c112c31 only set IP_TOS on IPv4 sockets 2011-06-19 10:58:22 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Thomas Klausner
97df66c0a0 Put Nd argument after Nd macro.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:27 -07:00
Thomas Klausner
db8e287e41 Use "Fl Fl" for long options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-05-21 11:54:14 -07:00
Luke Howard
79ff133ae9 make gss_acquire_cred_ext private 2011-05-20 14:31:08 +02:00
Love Hornquist Astrand
553ad48e38 remove label no longer used 2011-05-17 21:49:40 -07:00
Luke Howard
b9c96aa6de use gss_acquire_cred_ext in test app 2011-05-14 17:13:51 +02:00
Luke Howard
e128b0ca01 Merge branch 'master' into lukeh/moonshot
Conflicts:
	lib/gssapi/krb5/external.c
	lib/libedit/src/vi.c
2011-05-12 13:04:55 +02:00
Love Hornquist Astrand
0363c62520 no more strndup 2011-05-04 21:53:10 -07:00
Love Hornquist Astrand
41328aa28e fix argument to get_window_size 2011-05-04 21:50:17 -07:00
Luke Howard
1a8bb5143c compile fix 2011-04-08 12:19:25 +10:00
Luke Howard
0fbfe9b38e Revert MIT code from gss test application 2011-03-22 16:51:30 +11:00
Luke Howard
84f5aebc10 use gss_userok 2011-03-20 20:50:19 +11:00
Luke Howard
9455577b65 Merge branch 'master' of github.com:heimdal/heimdal
Conflicts:
	lib/gssapi/gssapi/gssapi.h
	lib/gssapi/gssapi_mech.h
	lib/gssapi/mech/gss_mech_switch.c
2011-03-20 19:08:10 +11:00
Love Hornquist Astrand
bf5b86857b add more private symbols 2011-03-12 14:03:30 -08:00
Love Hornquist Astrand
3327fd1464 add _krb5_key_data 2011-03-12 14:01:21 -08:00
Love Hornquist Astrand
679c708f5f use krb5_err() instead of krb5_get_err_text() 2011-03-12 13:35:21 -08:00
Love Hornquist Astrand
177122d8b9 use krb5_get_error_message for logging 2011-03-12 13:23:07 -08:00
Jelmer Vernooij
1bc55fab42 Explicitly link against required libraries.
This breaks on some newer systems which enable --as-needed by default.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-12-19 22:50:00 -08:00
Love Hornquist Astrand
9f244d27cc use krb5_warn 2010-11-25 10:51:30 -08:00
Love Hornquist Astrand
aa750c33d1 remove unused variables 2010-11-20 14:13:58 -08:00
Love Hornquist Astrand
65a1ee8163 dont use private prototype 2010-11-20 14:13:31 -08:00
Joerg Pulz
6f5b42957e add some more #ifdefs to compile on utmpx only systems
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-10-31 00:38:41 -07:00