krb5 commit: Rename old krb5.ini files away

Benjamin Kaduk kaduk at MIT.EDU
Wed Aug 29 14:56:00 EDT 2012


https://github.com/krb5/krb5/commit/02499b9c31124d66cdc5fd5d650e38f8c408a984
commit 02499b9c31124d66cdc5fd5d650e38f8c408a984
Author: Benjamin Kaduk <kaduk at mit.edu>
Date:   Mon Jul 30 16:50:55 2012 -0400

    Rename old krb5.ini files away
    
    We want to always use a new krb5.ini (and our search order guarantees
    that we will), but users might be confused if there is still a file
    named krb5.ini in the old location which is now non-functional.
    However, it is rude to unconditionally delete the old file which may
    potentially be the only copy a user has of their local changes.
    Instead, rename the old file to a non-functioning name that indicates
    it is no longer being used, so that it may be consulted if needed.
    Only attempt the rename if we found an existing krb5.ini, and ignore errors
    since this is not a critical part of the installation.
    
    ticket: 7328 (new)
    queue: kfw
    target_version: 1.10.4
    tags: pullup

 src/windows/installer/wix/Makefile |    2 +-
 src/windows/installer/wix/kfw.wxs  |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/src/windows/installer/wix/Makefile b/src/windows/installer/wix/Makefile
index 7b66b12..3c2bfd6 100644
--- a/src/windows/installer/wix/Makefile
+++ b/src/windows/installer/wix/Makefile
@@ -45,7 +45,7 @@ $(OBJFILE): kfw.wxs $(WIXINCLUDES)
 
 $(MSIFILE): $(OBJFILE) $(CUSTOMDLL)
 	$(LIGHT) -out $@ $(OBJFILE) \
-		-loc lang\strings_$(LANG).wxl
+		-loc lang\strings_$(LANG).wxl -ext WixUtilExtension.dll
 
 $(CUSTOMDLL): custom\custom.cpp
 	$(CD) custom
diff --git a/src/windows/installer/wix/kfw.wxs b/src/windows/installer/wix/kfw.wxs
old mode 100644
new mode 100755
index c0394ee..74ef8ac
--- a/src/windows/installer/wix/kfw.wxs
+++ b/src/windows/installer/wix/kfw.wxs
@@ -146,6 +146,18 @@
           Return="ignore"
           Execute="deferred" />
 
+        <CustomAction Id="RenameKrb5Ini_Cmd"
+         Property="RenameKrb5Ini"
+         Value="&quot;cmd.exe&quot; /c rename &quot;[WindowsFolder]\krb5.ini&quot; krb5-ini-pre-kfw4"
+         Execute="immediate" />
+        <CustomAction
+         Id="RenameKrb5Ini"
+         BinaryKey="WixCA"
+         DllEntry="CAQuietExec"
+         Execute="deferred"
+         Impersonate="no"
+         Return="ignore" />
+
         <CustomAction
          Id="RollbackNetProvider"
          BinaryKey="binCustom"
@@ -158,6 +170,8 @@
         <InstallExecuteSequence>
 	<Custom Action="KillRunningProcesses" After="InstallValidate"/>
 	<RemoveExistingProducts After="KillRunningProcesses">(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW)</RemoveExistingProducts>
+	<Custom Action="RenameKrb5Ini_Cmd" Before="RenameKrb5Ini"/>
+	<Custom Action="RenameKrb5Ini" Before="InstallFinalize">SYSTEMKRB5INI &lt;&gt; ""</Custom>
 	<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
 	<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)</Custom>
 	<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS &lt;&gt; "" And UILevel &gt;= 4</Custom>


More information about the cvs-krb5 mailing list