3667 Commits

Author SHA1 Message Date
Viktor Dukhovni
bf40b8cc63 Comment wordsmithing 2013-05-02 01:31:01 -04:00
Love Hornquist Astrand
f17c4a6c5c only check for keytab content where its needed 2013-04-24 16:42:30 -07:00
Love Hornquist Astrand
f97f15a86c bound len 2012-11-27 22:01:37 -08:00
Love Hornquist Astrand
764e701e2d try to unconfuse coverity 2012-11-27 21:58:05 -08:00
Roland C. Dowdeswell
be5afdbf7f Make concurrent builds work.
To stop the errors when building concurrently, we make a number of
changes:

        1.  stop including generated files in *_SOURCES,

        2.  make *-protos.h and *-private.h depend on the *_SOURCES,

        3.  make all objects depend on *-{protos,private}.h,

        4.  in a few places change dir/header.h to $(srcdir)/dir/header.h,

This appears to work for me with make -j16 on a 4-way box.
2012-08-08 00:04:04 +01:00
Roland C. Dowdeswell
5459558dea Move #undef ENABLE_PTHREAD_SUPPORT lower in appl/gssmask/common.h
This wasn't having the intended effect because after we #include
config.h and #undef ENABLE_PTHREAD_SUPPORT we then #include other
headers that also #include config.h.  I've moved this lower so that
it has the effect that appears to be intended but the correct answer
may be to make it work but this will require #including pthread.h
as the build fails with -Werror when pthread functions are called.
2012-06-07 16:57:51 +01:00
Marco Molteni
8cdcd53a5a Add comments to tcp_server.c, to make it easier for a newcomer to understand the krb5 API usage.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-05-09 08:15:51 +02:00
Marco Molteni
e242c40746 Verify the existence of the keytab for tcp_server, gssapi_server
appl/test/tcp_server and gssapi_server try to open the keytab file only when processing a connection.

This patch verifies the existence of the keytab file on program startup, so that troubleshooting is easier. In addition it adds some comments.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-05-01 23:01:19 +02:00
Jelmer Vernooij
15696d9b90 telnet.1: Avoid undefined macro 'B'.
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2012-03-18 11:25:55 -07:00
Love Hörnquist Åstrand
d791e70894 support ipv6 2012-03-07 07:58:50 -08:00
Roland C. Dowdeswell
e8779d5d4a Add -Wshadow and deal with the warnings. 2012-02-21 11:17:55 +00:00
Roland C. Dowdeswell
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00:00
Roland C. Dowdeswell
083780d5b5 Eliminate warning.
On NetBSD, cgetent has a prototype of ``const char *const *'' for
argument two.  Many other OSes have ``char **''.  It seems that
gcc will generate a warning if you pass a char ** to it.  Casting
the value to void avoids this warning.
2012-02-15 13:08:33 +00:00
Roland C. Dowdeswell
db484e73a2 Fix a few warnings. 2012-02-15 12:01:12 +00: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
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