Commit Graph

230 Commits

Author SHA1 Message Date
Nicolas Williams
3e74e2e3bb Fix some DLL hell: use dladdr() to find plugin dir
Normally one would dlopen() a shared object's basename, not its absolute
path.  However, lib/krb5/plugin.c, in an effort to be zero-conf-ish,
wants to readdir() to find plugins to load, and in the process it ends
up defeating the RTLD's search-the-caller's-rpath.

This commit partially addresses this by allowing the use of $ORIGIN in
plugin_dir values and using them for the default (except on OS X).

This allows multiple Heimdal versions installed on the same host, but
with different plugin ABIs, to co-exist.  A step forward for doing make
check on hosts where Heimdal is installed.

For now we hardcode $ORIGIN/../lib/plugin/krb5 (linux, Solaris, *BSD),
or $ORIGIN (Windows; for assemblies objects need to be in the same
directory) and we eval $ORIGIN by using dladdr() (Linux, Solaris) or
GetModuleHandleEx() (Win32, via a dladdr() wrapper in libroken) to find
the path to libkrb5 whose dirname to use as $ORIGIN.  For Windows,
because we need the plugins to be in the same directory as libkrb5, we
require a prefix on plugin DLLs ("plugin_krb5_") to distinguish them
from other objects.

We should add a special token to mean "look in $ORIGIN, sure, but
dlopen() the plugin basenames only (so the RTLD can search the rpath)".
2013-09-06 16:51:53 -05:00
Nico Williams
1f78baf198 Make krb5-types.h define int64_t on Win32 2013-07-16 21:04:32 -05:00
Ben Kaduk
5dfaa0d10b Be friendly to krb5_generate_random_block consumers
Allow them to disable the EGD/profile access and the use of a
random seed file.

These facilities are not tenable when running in the kernel.
2013-07-03 23:17:38 -05:00
Nicolas Williams
6dd66df594 Make master build on Windows
Add strtoll()/strtoull() to lib/roken
    Add stdint.h to lib/roken (Windows only)
    Add logic to detect whether to use lib/roken's stdint.h based on
        Visual Studio version
    Add include of stdint.h in generated ASN.1 code
    Export missing symbols for 64-bit integers in lib/asn1
    Export missing symbols for FAST
    Add missing sources to kdc/NTMakefile
    Fix issue in kuserok
    Fix bsearch issues
2012-01-17 12:10:14 -06:00
Jeffrey Altman
bad61548dd Windows: Version mgmt for assemblies and thirdparty
Breakout the version data from windows/NTMakefile.config
and move it to windows/NTMakefile.version.  This new file
contains only version data.  This permits version data to
be safely referenced by third party components.

In addition, add version range information for those versions
of Heimdal for which this release is a compatible upgrade.  If
there is a forward incompatible change to the assembly ABI, it
is not a compatible upgrade.  This version data is used to specify
the Windows assembly redirect range.

Change-Id: Ic9f156212599cc4277e2be812f29a6497801046c
2011-09-23 09:48:42 -04:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hörnquist Åstrand
e5eb401fcd simplify checking and start to use __has_extension 2011-06-19 10:43:12 -07:00
Love Hörnquist Åstrand
b8ddbe73c4 quite down clang analyzer warnings for the generate asn1 code 2011-06-14 22:29:49 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Jeffrey Altman
87aad6a13a Add NO_LOCALNAME
The pname to uid functionality at present assumes there is
an implementation of getpwnam() and that the local user
identifier is an integer.  On Windows, the local user identifier
is a SId.  Add NO_LOCALNAME as a build option so that Windows
(for now) can build without providing a getpwnam() implementation.

Change-Id: I04cfd6d2cd52e6228733f1da1dab420b453e6566
2011-05-17 13:56:37 -04:00
Love Hornquist Astrand
b108cbe218 spelling 2010-11-26 15:01:56 -08:00
Love Hornquist Astrand
3debbe8ef5 clean out gssapi_oid.h 2010-11-26 14:28:09 -08:00
Love Hornquist Astrand
95b601af10 clean out cache_plugin.h 2010-11-26 14:27:51 -08:00
Asanka C. Herath
370e245ffc Windows: Only export through .def files
While we use __declspec(dllimport) to import from DLLs, we don't
use __declspec(dllexport) to export them.
2010-11-24 15:33:25 -05:00
Asanka C. Herath
d11917211b Windows: Older Windows SDKs need <winsock2.h>
Older SDKs need <winsock2.h> to be included before <ws2tcpip.h>
2010-11-24 15:33:06 -05:00
Asanka C. Herath
d3582b56c6 Define and use a path separator string
A colon can't be used to separate paths on Windows since they are used
in drive sepecification.  Define a macro that can be used as a path
separator string.  On Windows, this is defined as ";".  It is a ":"
everywhere else.
2010-11-24 15:32:56 -05:00
Love Hornquist Astrand
501c5ac2fe sort and add ntlm_err.h 2010-10-30 22:19:29 -07:00
Love Hornquist Astrand
ef78859954 clean heimbase. 2010-10-27 20:31:13 -07:00
Love Hornquist Astrand
82d15c0ada define helper macros for __attribute__ 2010-10-26 23:41:05 -07:00
Love Hornquist Astrand
a77070f5b1 define helper macros for __attribute__ 2010-10-26 23:39:42 -07:00
Love Hornquist Astrand
d05098b950 New drop with windows code from Secure Endpoints/Asanka 2010-09-14 10:08:03 -07:00
Love Hornquist Astrand
a37554cc27 clean better 2010-09-14 09:29:40 -07:00
Asanka Herath
91bfec3059 Windows: Enable weak crypto by default 2010-09-14 08:04:16 -04:00
Asanka Herath
9db9b146fb Windows: Add support for MSLSA: cache type using a plug-in 2010-09-14 08:04:11 -04:00
Asanka Herath
efd02d929a Windows: No Fortuna method 2010-08-20 13:06:55 -04:00
Asanka Herath
8363d30a47 Remove commented code 2010-08-20 15:21:15 +08:00
Asanka Herath
e7337145ee Define HAVE_WINDNS and NO_LIMIT_FD_SETSIZE
HAVE_WINDNS is defined when we want to use DNSAPI on Windows which
handles most of the resolver work for us.

NO_LIMIT_FD_SETSIZE is defined if the value of a socket FD does not
imply anything about the number of sockets so far assigned.
I.e. checking if the socket is larger than FD_SETSIZE is incorrect.
2010-05-26 10:38:39 -04:00
Asanka Herath
f54630328b strlen() returns a size_t 2010-05-26 10:38:38 -04:00
Asanka Herath
716121bc60 Don't break build if cleanup fails 2010-05-26 10:38:37 -04:00
Love Hornquist Astrand
2a842e90d3 Drop MD2 support
Patch partly from Guillaume Rousse
2010-04-28 22:10:27 +02:00
Love Hornquist Astrand
b914fd57c5 remove NO_INETD by shuffling code around 2009-12-25 06:37:57 +01:00
Asanka Herath
ff11a8ae43 Merge remote branch 'lha/master' into win32-port2
* lha/master:
  Clean kadm5-pwcheck.h
  rename closesocket to rk_closesocket
  Log what principal was used in the failure case
2009-12-22 11:05:03 -05:00
Love Hornquist Astrand
ecf9e3c989 Clean kadm5-pwcheck.h 2009-12-22 13:36:58 +01:00
Asanka Herath
b397a69ca7 Remove krb5-types.h.w32
We are generating krb5-types.h using bits.c.
2009-11-26 01:26:41 -05:00
Asanka Herath
251879f39e Generate krb5-types.h instead of using a static one on Windows 2009-11-25 12:43:12 -05:00
Asanka Herath
7513f59f01 include\crypto-header.h no longer needs to be generated on Windows 2009-11-25 12:43:10 -05:00
Asanka Herath
b191b1e12f Make kdc build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 22:19:37 -08:00
Love Hornquist Astrand
26f7b41f25 define krb5_socket_t 2009-11-25 02:08:13 +01:00
Love Hornquist Astrand
93a56f6153 define krb5_socket_t 2009-11-25 02:07:45 +01:00
Asanka Herath
1650607d4c Windows prebuild filess
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-25 02:07:24 +01:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08:00
Love Hornquist Astrand
313a5011ac move krb5-types.cross to EXTRA_DIST 2009-09-20 01:11:49 -07:00
Love Hornquist Astrand
ddb40e585e don't clean out crypto-headers.h, its a static file 2009-09-20 01:10:26 -07:00
Love Hornquist Astrand
6505961801 double include protection 2009-09-16 00:36:47 -07:00
Love Hornquist Astrand
cddc59924c crypto headers are now stable, provide posix krb5-types.h 2009-09-16 00:24:25 -07:00
Love Hornquist Astrand
8d8bc185ee Clean evp-{hcrypto,cc}.h 2009-08-14 10:32:48 +02:00
Love Hornquist Astrand
88cd143fd4 Spelling 2009-08-14 10:04:45 +02:00
Love Hornquist Astrand
0351294ddf clean better 2009-08-06 10:19:11 +02:00
Love Hornquist Astrand
85a46732ef Include ec*.h files 2009-08-06 09:22:43 +02:00
Love Hornquist Astrand
fa8990dcf4 clean ec*.h files 2009-08-06 09:22:27 +02:00