]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Rename old krb5.ini files away
authorBenjamin Kaduk <kaduk@mit.edu>
Mon, 30 Jul 2012 20:50:55 +0000 (16:50 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 29 Aug 2012 20:28:22 +0000 (16:28 -0400)
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.

(cherry picked from commit 02499b9c31124d66cdc5fd5d650e38f8c408a984)

ticket: 7328
status: resolved

src/windows/installer/wix/Makefile
src/windows/installer/wix/kfw.wxs [changed mode: 0644->0755]

index 7b66b1211cc38267e7d876154e50ec9ec38e60ff..3c2bfd691f031c6f4dcb6a5530268b1bfacc2165 100644 (file)
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index c0394ee..74ef8ac
           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"
         <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>