Commit Graph

15355 Commits

Author SHA1 Message Date
Asanka C. Herath
8432f850ed Windows: Make Heimdal a single assembly 2010-11-24 15:32:59 -05:00
Asanka C. Herath
809eccb682 Windows: Add an API for reading a multistring from registry
The _krb5_parse_reg_value_as_string() used to concatenate
multi-strings using a space to be compatible with
krb5_config_get_strings() and friends.  Add a new function that can
read a multi-string with an arbitrary delimiter character
_krb5_parse_reg_value_as_multi_string().
2010-11-24 15:32:56 -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
Asanka C. Herath
1e365190d0 Windows: Manage thread local storage manually in dlfcn_w32 2010-11-24 15:32:51 -05:00
Asanka C. Herath
e4a2e9cfe0 Windows: Build and export localtime_r 2010-11-24 15:32:49 -05:00
Asanka C. Herath
0f853405fe Add missing export and calling convention annotations 2010-11-24 15:32:49 -05:00
Asanka C. Herath
9f37626a33 Windows: Proper cleanup on failure 2010-11-24 15:32:48 -05:00
Asanka C. Herath
9d7227d1c1 Windows: Fix missing exports 2010-11-24 15:32:47 -05:00
Asanka C. Herath
f50b9727b2 Windows: Copy GSSAPI header files into the SDK 2010-11-24 15:32:46 -05:00
Asanka C. Herath
f51ded7f34 Export annotations for com_right.h 2010-11-24 15:32:46 -05:00
Asanka C. Herath
70c3a1c209 Move export macros from com_err.h to com_right.h 2010-11-24 15:32:45 -05:00
Asanka C. Herath
fe3e119691 Windows: Use SOFTWARE\Kerberos for storing configuration 2010-11-24 15:32:44 -05:00
Asanka C. Herath
c0b62e3204 Windows: Configuration file locations can be set in the registry 2010-11-24 15:32:42 -05:00
Asanka C. Herath
dd74713e22 Windows: _krb5_load_config_from_registry() is an internal API 2010-11-24 15:32:41 -05:00
Asanka C. Herath
7569337e9f Windows: Move cache specific code out of mit_glue.c
Move code for checking backwards compatible configuration file location into cache.c.  Also use registry handling code from config_reg.c.
2010-11-24 15:32:41 -05:00
Asanka C. Herath
f190a65aed Windows: Refactor and fix config_reg.c
We want to be able to reuse registry handling code here from elsewhere.
2010-11-24 15:32:40 -05:00
Asanka C. Herath
c3ecf0c372 Windows: Lookup configuration file %{WINDOWS}/krb5.ini
For backwards compatibility.
2010-11-24 15:32:36 -05:00
Asanka C. Herath
6e6468ab98 Windows: Search for config files in %{COMMON_APPDATA}/Kerberos
In addition to the Heimdal directory, also search in the
generic Kerberos configuration file directory.
2010-11-24 15:32:36 -05:00
Asanka C. Herath
2f2dca748d Don't dereference a possible NULL pointer 2010-11-24 15:32:35 -05:00
Asanka C. Herath
00ba841893 Windows: Use backwards compatible registry key for default cache
On Windows, existing applications determine and change the default
credentials cache using the Kerberos for Windows registry key
(\Software\MIT\Kerberos5, ccname).  Use it for backwards
compatibility.
2010-11-24 15:32:34 -05:00
Asanka C. Herath
45002e092c Use rk_socket_t in lib/krb5/changepw.c 2010-11-24 15:32:33 -05:00
Asanka C. Herath
3855dd33bd Windows: Catch up with hcrypto changes 2010-11-24 15:32:31 -05:00
Asanka C. Herath
610bd66bbd Windows: Support building using newer flex 2010-11-24 15:32:29 -05:00
Asanka C. Herath
a87b4e23d6 Windows: Implement gettimeofday() using native APIs
We now use GetSystemTimeAsFileTime() for gettimeofday().  This gives
us a better resolution than one second.
2010-11-24 15:32:26 -05:00
Asanka C. Herath
dd99c2054c Windows: Add missing hcrypto dependencies and exports 2010-11-24 15:32:25 -05:00
Asanka C. Herath
6ee40622b1 Embed application manifest in Heimdal assembly .dlls 2010-11-24 15:32:24 -05:00
Asanka C. Herath
ba6c36b0d7 Windows: Fix exports for libkrb5 2010-11-24 15:32:22 -05:00
Asanka C. Herath
e8dd4bfaf3 Windows: Build kadm5 tools in a separate build-step
The application manifests for Heimdal can't be built until the
libraries are built.  Since tools depend on application manifests, we
need to build them separately.
2010-11-24 15:32:21 -05:00
Asanka C. Herath
1b32efe62c Windows: Include manifest dependencies by default when building tools 2010-11-24 15:32:20 -05:00
Asanka C. Herath
034cb905e9 Windows: Rename libheimntlm.dll to heimntlm.dll
For consistency with other .dlls shipped as assemblies.
2010-11-24 15:32:18 -05:00
Asanka C. Herath
f40fe926ad Windows: Comprehensive clean target 2010-11-24 15:32:13 -05:00
Asanka C. Herath
f44925e8a6 Deal with quoted strings when reading lists of config strings 2010-11-24 15:32:12 -05:00
Asanka C. Herath
03694f3505 Trim trailing slashes of plug-in paths 2010-11-24 15:32:11 -05:00
Asanka C. Herath
f159cef78a Rename get_entry() -> _krb5_config_get_entry() 2010-11-24 15:32:11 -05:00
Asanka C. Herath
d247242f63 Windows: Registry based configuration
Load configuration data in the registry into a krb5_config_section.
Each registry key corresponds to a krb5_config_section and each
registry value becomes a bound string value.

The set of values contained in the root Heimdal registry key is
treated as if they were defined in the [libdefaults] section.

E.g. the configuration file:

[libdefaults]
foo = bar

[Foo]
x = y
y = {
  baz = quux
}

is equivalent to the registry keys:

[HKEY_CURRENT_USER\Software\Heimdal]
"foo"="bar"

[HKEY_CURRENT_USER\Software\Heimdal\Foo]
"x"="y"

[HKEY_CURRENT_USER\Software\Heimdal\Foo\y]
"baz"="quux"
2010-11-24 15:32:08 -05:00
Asanka C. Herath
392f9541f1 Override existing plug-ins by default when loading cache plug-ins 2010-11-24 15:32:08 -05:00
Asanka C. Herath
8f7a1311e1 Windows: Construct search string from directory name
The implementation of opendir() in lib/roken/dirent.c takes as input a
directory name.  For the contents of the specified directory to be
enumerated correctly, this directory name must be converted to a
wildcard.
2010-11-24 15:32:07 -05:00
Asanka C. Herath
6abe08a0a3 Validate plug-in names before loading
On Windows, we only want to load .dll files are plug-ins, even though
there might be other support files present in the plug-in directory.
2010-11-24 15:32:06 -05:00
Asanka C. Herath
7fea5ff69a Use expanded path names when loading plug-ins 2010-11-24 15:32:05 -05:00
Simon Wilkinson
5b91f58f35 hcrypto: Remove getarg.h include from validate.c
None of the functions prototyped in getarg.h are used by validate.c,
so simplify out-of-tree builds by removing the header from the file.
2010-11-24 10:55:27 +00:00
Simon Wilkinson
9fc90e01b5 roken: Remove multiple prototype for hstrerror
hsterror had two prototypes, one with the Windows magic, and one
without. Remove the one without so Windows can build again.
2010-11-24 10:32:55 +00:00
Jeffrey Altman
f317b91b1b roken: Prototype getopt
Add a prototype for getopt to the roken.h header, and fix the function
definition in getopt.c to be ANSI, rather than K&Rs style.
2010-11-24 09:43:04 +00:00
Asanka C. Herath
0cc7b890e2 Windows: Build getopt.c in roken 2010-11-23 02:25:34 -05:00
Asanka C. Herath
e266044cc4 Declarations for getopt externs 2010-11-23 02:25:24 -05:00
Asanka C. Herath
904d779d06 Windows: Support building roken as a DLL 2010-11-23 02:25:17 -05:00
Asanka C. Herath
1f2dc24b5d Annotate exported variables in getopt.c 2010-11-23 02:24:43 -05:00
Asanka C. Herath
0ee4597aed Always include <config.h> in roken implementation
Remove unnecessary ifdefs and add <config.h> to dlfcn_w32.c.  This is
required for correct export declarations when building roken as a DLL.
2010-11-23 02:24:38 -05:00
Simon Wilkinson
bbd724dad0 roken: getopt should include roken.h
In order to correctly rename the function, getopt.c needs to include
roken.h
2010-11-22 23:33:46 +00:00
Jeffrey Altman
bd78baf668 Windows: Include winsock2.h before ws2tcpip.h
Before we can include ws2tcpip.h, we must have already included
winsock2.h. The latest SDK does this by including winsock2 within
the ws2tcpip header, but the older SDKs do not, and fail to build.
2010-11-22 23:09:07 +00:00
Love Hornquist Astrand
2514d45803 add basekey 2010-11-22 10:57:01 -08:00