Commit Graph

27266 Commits

Author SHA1 Message Date
Love Hornquist Astrand
216bfa564d rename mdb to mitdb 2012-10-06 15:38:56 -07:00
Love Hornquist Astrand
65107e39ee fixup error messages 2012-10-01 09:54:13 -07:00
Love Hornquist Astrand
0a237dc778 don't use free'd string 2012-10-01 09:53:52 -07:00
Love Hornquist Astrand
d9aa1ff496 use configuration for db-dir 2012-10-01 09:50:46 -07:00
Love Hornquist Astrand
703ae0e22d add db-dir 2012-10-01 09:50:32 -07:00
Love Hornquist Astrand
baf748fb8e catch better slave message now that iprop is more verbose 2012-10-01 09:36:11 -07:00
Marco Molteni
8cc9326f64 Document some GSS-API functions and fix some spelling errors. No code changes.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-09-27 14:26:29 -07:00
Stef Walter
b0b94a445a Add pkg-config files for krb5 libraries
* These can be used along side krb5-config

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-09-27 14:00:49 -07:00
Love Hornquist Astrand
9ba23d7da8 guess some code for SUN_PROC_POINT 2012-09-24 21:28:04 -07:00
Love Hornquist Astrand
db85d0998e include <stddef.h> so that we have a size_t
from metanest and https://github.com/heimdal/heimdal/issues/15
2012-09-23 10:56:16 -07:00
Love Hornquist Astrand
8fb0c019ec use Getopt::Std, patch original from Leonardo <rnalrd@gmail.com>, updated by me 2012-09-23 10:41:34 -07:00
Love Hornquist Astrand
846f6e0e7b always produce a signature that is the size of the modulus 2012-09-11 20:45:43 -07:00
Philip Boulain
12f7c3248b dd include flags for test cases.
When building with OpenSSL at a custom prefix, some test cases will fail
 to compile due to missing include path compiler options. This patch adds
 them, as well as defining CPPFLAGS and LDADD for test_expr.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-09-10 08:39:42 -07:00
Jeffrey Altman
6f594e7d8b Merge pull request #18 from meffie/master
drop the __restrict keyword in roken to please old compilers.
2012-08-16 12:55:20 -07:00
Michael Meffie
4a438db29d drop __restrict some more, to please old compilers
Avoid the __restrict keyword in roken to appease older compilers.
2012-08-16 15:19:44 -04:00
Roland C. Dowdeswell
3a30f3b0d1 Windows doesn't support poll(2) or fcntl(2) so #ifdef it out in send_to_kdc.c. 2012-08-14 22:50:33 +01:00
Jeffrey Altman
571e7daab3 Revert "generated files must #include config if supported"
therefore #include config.h is not required.

This reverts commit 9be792055c.
2012-08-12 16:05:04 -04: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
Andrew Tridgell
d9d8e94d66 heimdal: fixed -Werror=format error in com_err
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-08-02 14:43:52 +02:00
Jeffrey Altman
b8a53329fc Windows: rk_wcsdup allocator
patchset 3fe5572840 should have
replaced wcsdup().

Change-Id: Ib1e09477b430525267c6c930d7c4ab29858a68bb
2012-07-20 09:40:22 -04:00
Jeffrey Altman
0686ad5ece Windows: rk_strdup allocator
patchset 3fe5572840 should have
replaced strdup().

Change-Id: I7af7b3e953e379fb23fccd9fa7a9e02c354c2dc4
2012-07-20 00:50:47 -04:00
Roland C. Dowdeswell
13a6ac59ad Fix memory leak in hx509_context_init().
OpenSSL_add_all_algorithms() should only be run once per application
or it will cause data structures to expand.  It's not a classic
memory leak as all of the memory will be free(3)d when EVP_cleanup()
is called but as we are a library we cannot call this.  We provide
a short term fix here which is using heim_base_once_f() to ensure
that we only call it once.

But the long term fix should be to stop using OpenSSL_add_all_algorithms()
entirely because it both has side effects outside our library and
the caller may destroy our OpenSSL global variables by calling
EVP_cleanup() on his own.  It is suboptimal to have potential
interactions between our library and other code in this way.
2012-07-17 19:38:46 +01:00
Nicolas Williams
54e6e8d99d Fix Makefile.am issue with test_expand_toks 2012-07-16 18:24:10 -05:00
Nicolas Williams
dadcf3beb4 Fix bug in _krb5_expand_path_tokensv() 2012-07-15 01:30:09 -05:00
Nicolas Williams
17c6516620 Make test_store.c build w/o warnings and run 2012-07-15 00:55:08 -05:00
Roland C. Dowdeswell
842ca62336 Ensure that timeouts apply to TCP socket connexions.
Currently the Heimdal code calls connect(2) on TCP connexions to
the KDC without setting O_NONBLOCK.  This code implements a
timed_connect() function which will in the case of SOCK_STREAM
sockets put the socket into non-blocking mode prior to calling
connect and use select(2) to apply the configured timeout to connect
completion.  This does not entirely solve the problem of potential
timeouts in the code as it is still possible to block while writing
to the socket.  A proper implementation would also likely start
new connexions after a short interval before timing out existing
connexions and return the results from the first KDC which successfully
responds but we did not do that yet.

This patch is from heimdal-1-5-branch patches:

	5b55e4429caed27b32aac4bc5930f2672a43f273
	6b66321b271ee4672e70ad349ec796dd755cf897
	2e12c7f3e8dca7e1696ebd92199617ce413565e7

Squashed together along with a quick shadowed variable warning fix
to allow it to compile with --enable-developer.
2012-07-12 01:00:23 +01:00
Roland C. Dowdeswell
7aaeafb72b Typo and separate formatting error in lib/com_err/com_err.3.
Reported by jklowden@schemamania.org and jdf@NetBSD.org via NetBSD in:

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46651
2012-07-04 21:53:36 +01:00
Roland C. Dowdeswell
c2ea171a9c Fix a typo: ai should have been a. 2012-07-04 20:07:45 +01:00
Jeffrey Altman
24ddc80f7f krb5_enomem to separate source file
krb5_enomem() is a wrapper around krb5_set_error_message() which
is used throughout the lib/krb5 sources.  Some of the lib/krb5
sources are imported into third party projects and those projects
must be able to pull in krb5_enomem() without other baggage.
Create a new source file lib/krb5/enomem.c.

Change-Id: Id109386d48e3e2988b705b82525adf4f1fa5ea98
2012-07-02 11:33:18 -04:00
Jeffrey Altman
3fe5572840 roken: Use a common allocator for all windows
Windows applications become very unhappy when memory is allocated
in one module (exe or dll) and deallocated in another.  This is
because each of the C run time library instances uses its own
heap.  Mixing allocating in one heap and deallocating in another
will lead to memory leaks and heap corruption.   For modules that
build against roken avoid this problem by sharing roken's allocator
with the module that uses it.

Change-Id: I31e35c600a78350b168a281811160696dc327544
2012-07-01 22:09:31 -04:00
Roland C. Dowdeswell
7de08cd5d0 hdb.h uses FILE * and so should #include <stdio.h>. 2012-06-27 01:58:19 +01:00
Roland C. Dowdeswell
16c93c4e87 Not all make implementations define RM by default. So, we can't use it. 2012-06-26 22:25:42 +01:00
Roland C. Dowdeswell
01e7b326b6 Remove unused function from lib/base/string.c as it breaks with -Werror. 2012-06-26 22:14:47 +01:00
Jeffrey Altman
2f17afacda Revert "do not include stdint.h unprotected"
This reverts commit cb6f7ea40e.

stdint.h can be included everywhere now that the Windows
platform generates and installs a stdint.h when Visual
Studio does not provide one.

Change-Id: Ia3cab28d7f5806203cd45227765debda54ac7472
2012-06-26 17:05:54 -04:00
Nicolas Williams
98809e86ce Move base into lib
This involves reverting dd267e8fc3,
    but that gets lost in the move.

    This builds on Ubuntu and Windows at this time.
2012-06-20 19:32:08 -05:00
Roland C. Dowdeswell
a3ff62cc76 Eliminate shadow variable in lib/ntlm/test_ntlm.c. 2012-06-20 16:12:57 +01:00
Nicolas Williams
82f1c1f391 Encrypt keys in change password code even when !keepold 2012-06-14 13:46:20 -05:00
Nicolas Williams
20b5e2a2c6 Make check-authz run when objdir != srcdir 2012-06-14 11:53:55 -05:00
Jeffrey Altman
21b03df57a Remove krb5_425_xx and krb4 compat glue from exports
The lib/krb5 export lists contained the following functions
that are no longer in the tree:

  krb5_425_conv_principal
  krb5_425_conv_principal_ext2
  krb5_425_conv_principal_ext
  krb5_524_conv_principal
  _krb5_krb_tf_setup
  _krb5_krb_dest_tkt
  _krb5_krb_life_to_time
  _krb5_krb_decomp_ticket
  _krb5_krb_create_ticket
  _krb5_krb_create_ciph
  _krb5_krb_create_auth_reply
  _krb5_krb_rd_req
  _krb5_krb_free_auth_data
  _krb5_krb_time_to_life
  _krb5_krb_cr_err_reply

Change-Id: I1f73768de2f7e9243e4e7a623b54af282ec54641
2012-06-12 18:55:32 -04:00
Jeffrey Altman
aed7a3b948 Windows: missing exports on Windows
synchronize the export lists on Windows and UNIX.
When new functions are exported on UNIX or Windows,
the "test" build target on Windows will verify if
the export lists are in sync.

Change-Id: I9df3607983b03ee8dc6fa7cd22f85b07a6cee784
2012-06-12 18:48:37 -04:00
Jeffrey Altman
55e941f3f2 Windows: export krb5_storage_fsync
df42274d96 added krb5_storage_fsync
but failed to export it on Windows.

Change-Id: I325cef08cbbfd8e9d86a323ed0e03bb3282d4250
2012-06-12 18:48:35 -04:00
Jeffrey Altman
b8e7f977f8 Windows: link libhdb against heimbase
heim_abort and heim_assert are not exported from heimdal.dll.
must link against heimbase to use them.

Change-Id: I57a29b90360f9036723c114f03a95684a4802529
2012-06-12 18:48:33 -04:00
Stefan Metzmacher
d28613ce11 heimdal:lib/asn1: try to fix the build on IRIX
cc-1028 cc: ERROR File = ../source4/heimdal/lib/asn1/gen_template.c, Line = 548
  The expression used must have a constant value.

  struct templatehead template = { 0L, &(template). tqh_first };
                                         ^
If this really fixes the IRIX build, we'll propose this for heimdal upstream.

metze

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-06-11 11:05:37 +02:00
Love Hornquist Astrand
671c91fd5f just mark sig algs as weak instead of expiration date 2012-06-08 18:08:23 +02:00
Love Hornquist Astrand
d2c37acf7c pull in <errno.h> 2012-06-08 17:57:02 +02:00
Love Hornquist Astrand
5bb60d9dc4 move windows compat errno constants to after <errno.h> is included 2012-06-08 17:56:48 +02:00
Roland C. Dowdeswell
5775cb529c randkey_s.c must also clear requires_pwchange flag. 2012-06-08 16:09:55 +01:00
Roland C. Dowdeswell
c2cd2395bb chpass_s.c must set KADM5_ATTRIBUTES when writing the log entry...
...because we may have cleared the requires_pwchange flag.
2012-06-08 16:08:25 +01:00
Jeffrey Altman
0a7d2e27eb Windows EAFNOSUPPORT defined by VS2010
EAFNOSUPPORT is defined by VS2010 errno.h.   Use the VS2010
value instead of WSAEAFNOSUPPORT if EAFNOSUPPORT is not defined.

Change-Id: Ie641fd8f212ea1be11811dbb2e0def9fdbac795f
2012-06-07 23:16:05 -04:00
Roland C. Dowdeswell
abdde6a608 Additional changes to make -Wshadow build on Ubuntu 10.04.
Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
2012-06-07 16:59:01 +01:00