diff --git a/lib/krb5/config_reg.c b/lib/krb5/config_reg.c index 1e20aa7e2..32240bb3f 100644 --- a/lib/krb5/config_reg.c +++ b/lib/krb5/config_reg.c @@ -35,7 +35,8 @@ #error config_reg.c is only for Windows #endif -#define REGPATH "SOFTWARE\\Kerberos" +#define REGPATH_KERBEROS "SOFTWARE\\Kerberos" +#define REGPATH_HEIMDAL "SOFTWARE\\Heimdal" /** * Parse a registry value as a string @@ -420,6 +421,26 @@ parse_reg_root(krb5_context context, return parse_reg_subkeys(context, key, parent); } +static krb5_error_code +load_config_from_regpath(krb5_context context, + HKEY hk_root, + const char* key_path, + krb5_config_section ** res) +{ + HKEY key = NULL; + LONG rcode; + krb5_error_code code = 0; + + rcode = RegOpenKeyEx(hk_root, key_path, 0, KEY_READ, &key); + if (rcode == ERROR_SUCCESS) { + code = parse_reg_root(context, key, res); + RegCloseKey(key); + key = NULL; + } + + return code; +} + /** * Load configuration from registry * @@ -436,29 +457,26 @@ krb5_error_code _krb5_load_config_from_registry(krb5_context context, krb5_config_section ** res) { - HKEY key = NULL; - LONG rcode; - krb5_error_code code = 0; + krb5_error_code code; - rcode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGPATH, 0, KEY_READ, &key); - if (rcode == ERROR_SUCCESS) { - code = parse_reg_root(context, key, res); - RegCloseKey(key); - key = NULL; + code = load_config_from_regpath(context, HKEY_LOCAL_MACHINE, + REGPATH_KERBEROS, res); + if (code) + return code; - if (code) - return code; - } + code = load_config_from_regpath(context, HKEY_LOCAL_MACHINE, + REGPATH_HEIMDAL, res); + if (code) + return code; - rcode = RegOpenKeyEx(HKEY_CURRENT_USER, REGPATH, 0, KEY_READ, &key); - if (rcode == ERROR_SUCCESS) { - code = parse_reg_root(context, key, res); - RegCloseKey(key); - key = NULL; - - if (code) - return code; - } + code = load_config_from_regpath(context, HKEY_CURRENT_USER, + REGPATH_KERBEROS, res); + if (code) + return code; + code = load_config_from_regpath(context, HKEY_CURRENT_USER, + REGPATH_HEIMDAL, res); + if (code) + return code; return 0; } diff --git a/packages/windows/installer/NTMakefile b/packages/windows/installer/NTMakefile index 77a2491fc..03c368b63 100644 --- a/packages/windows/installer/NTMakefile +++ b/packages/windows/installer/NTMakefile @@ -153,8 +153,10 @@ CANDLEOPTS=$(CANDLEOPTS) -dTarget64 \ !ifdef MULTIPLATFORM_INSTALLER CANDLEOPTS=$(CANDLEOPTS) -dTarget32 +TYPEOPT=-full !else ! message Excluding 32-bit components from installer +TYPEOPT= !endif INSTDEPS=$(INSTDIR32)\Heimdal.msm \ @@ -187,16 +189,17 @@ THIRDPARTYOBJS=$(THIRDPARTYOBJS) $(INSTDIR32)\MKShim.wixlib !endif !endif -INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)-$(VERSIOND).msi +INSTALLER=$(INSTDIR)\Heimdal-$(CPU)$(DEBUGOPT)$(TYPEOPT)-$(VERSIOND).msi +WIXOBJ=$(OBJ)\heimdal-installer$(TYPEOPT).wixobj -$(INSTALLER): $(OBJ)\heimdal-installer.wixobj $(THIRDPARTYOBJS) $(INSTDEPS) lang\en-us.wxl - $(LIGHT) -out $@ $(OBJ)\heimdal-installer.wixobj $(THIRDPARTYOBJS) \ +$(INSTALLER): $(WIXOBJ) $(THIRDPARTYOBJS) $(INSTDEPS) lang\en-us.wxl + $(LIGHT) -out $@ $(WIXOBJ) $(THIRDPARTYOBJS) \ -sval -cultures:en-us -loc lang\en-us.wxl \ -dWixUILicenseRtf=lang\license-en-us.rtf \ -ext WixUIExtension $(_CODESIGN) -$(OBJ)\heimdal-installer.wixobj: heimdal-installer.wxs +$(WIXOBJ): heimdal-installer.wxs $(CANDLE) -arch $(PLATFORM) -o $@ heimdal-installer.wxs \ $(CANDLEOPTS) $(THIRDPARTYOPTS) diff --git a/packages/windows/installer/heimdal-installer.wxs b/packages/windows/installer/heimdal-installer.wxs index 5139e93ef..9eb751544 100644 --- a/packages/windows/installer/heimdal-installer.wxs +++ b/packages/windows/installer/heimdal-installer.wxs @@ -217,7 +217,7 @@ + Key='Software\Heimdal'> @@ -230,7 +230,7 @@ + Key='Software\Heimdal'> @@ -354,7 +354,7 @@ @@ -373,42 +373,62 @@ - - - + + - - - + + - - - + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -425,9 +445,7 @@ - - - + diff --git a/packages/windows/installer/lang/en-us.wxl b/packages/windows/installer/lang/en-us.wxl index 1bfca33cd..be2342e7d 100644 --- a/packages/windows/installer/lang/en-us.wxl +++ b/packages/windows/installer/lang/en-us.wxl @@ -8,6 +8,8 @@ Heimdal Command line tools and libraries for Heimdal Kerberos - Installation of this package requires elevation. + 32-bit tools and libraries + Compatibility libraries for 32-bit applications + Installation of this package requires elevation A current or newer version of Heimdal is already installed on this machine. Please use the Add/Remove Programs control panel to manage the existing installation. diff --git a/windows/NTMakefile.config b/windows/NTMakefile.config index 27288fc8c..f3796c4d2 100644 --- a/windows/NTMakefile.config +++ b/windows/NTMakefile.config @@ -8,8 +8,8 @@ VER_PACKAGE_COMPANY=www.h5l.org VER_PRODUCT_MAJOR=1 VER_PRODUCT_MINOR=4 -VER_PRODUCT_AUX=9921 -VER_PRODUCT_PATCH=1201 +VER_PRODUCT_AUX=9930 +VER_PRODUCT_PATCH=615 VER_PACKAGE_VERSION=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX)