Commit Graph

10 Commits

Author SHA1 Message Date
Roland C. Dowdeswell
f0f07ff408 Use krb5_enomem() more consistently in lib/krb5. 2013-02-13 16:15:00 +08:00
Jeffrey Altman
132693df5a Add _krb5_store_string_to_reg_value() for Windows
The new _krb5_store_string_to_reg_value() function permits
the caller to create REG_SZ, REG_EXPAND_SZ, REG_DWORD, and
REG_MULTI_SZ entries in the registry.

Change-Id: Ib5740ad07209618d8ea4c0bf3c75615f27e98b4e
2011-09-26 01:58:29 -04:00
Asanka C. Herath
3048545de3 Windows: Use Software/Heimdal registry key for Heimdal specific configuration
The 'plugin_dir' value is Heimdal specific.  So keep it in the
Software/Heimdal registry key.  The Software/Kerberos registry key
will also be loaded and will contain generic Kerberos configuration.
2011-06-15 01:55:19 -04:00
Asanka C. Herath
aa9be97d0d Windows: Always initialize buffers in config_reg 2010-11-24 15:33:31 -05:00
Asanka C. Herath
158b107005 Remove unused variable 2010-11-24 15:33:13 -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
fe3e119691 Windows: Use SOFTWARE\Kerberos for storing configuration 2010-11-24 15:32:44 -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
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