krb5 commit: Add version info for ccapi dll

Benjamin Kaduk kaduk at MIT.EDU
Wed Aug 29 16:34:58 EDT 2012


https://github.com/krb5/krb5/commit/69d4743dc83a2050e4e2c2fd60929abccfef498b
commit 69d4743dc83a2050e4e2c2fd60929abccfef498b
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date:   Thu Aug 16 11:10:06 2012 -0400

    Add version info for ccapi dll
    
    Without version info, this library would not get installed during
    an upgrade scenario, causing the MIT Kerberos application to crash
    on startup.
    
    Signed-off-by: Kevin Wasserman <kevin.wasserman at painless-security.com>
    
    [kaduk at mit.edu: add motivation to commit message]
    
    ticket: 7336 (new)
    subject: Fix KfW crash on startup after upgrade
    queue: kfw
    target_version: 1.10.4
    tags: pullup

 src/ccapi/lib/win/Makefile.in |    9 +++++++--
 src/windows/version.rc        |   11 +++++++++++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/ccapi/lib/win/Makefile.in b/src/ccapi/lib/win/Makefile.in
index 695fd0e..4a87abc 100644
--- a/src/ccapi/lib/win/Makefile.in
+++ b/src/ccapi/lib/win/Makefile.in
@@ -89,10 +89,15 @@ copysrc :
 
 midl : ccs_request.h ccs_reply.h
 
+VERSIONRC = $(BUILDTOP)\..\windows\version.rc
+CCLIBRES = (OUTPRE)$(CCLIB).res
 # Main program:
-$(OUTPRE)$(CCLIB).dll: $(OBJS) $(CCLIB).def
+$(CCLIBRES): $(VERSIONRC)
+	$(RC) $(RCFLAGS) -DCCAPI_LIB -fo $@ -r $**
+
+$(OUTPRE)$(CCLIB).dll: $(OBJS) $(CCLIB).def $(CCLIBRES)
 	$(LINK) $(LFLAGS) -entry:$(ENTRYPOINT) -dll /map:$*.map /out:$@ /DEF:$(CCLIB).def $(OBJS) \
-	    /implib:$(CCLIB).lib $(dllflags) $(LIBS) $(KFWLIB) $(SCLIB) rpcrt4.lib $(conlibsdll) $(conflags)
+	    /implib:$(CCLIB).lib $(dllflags) $(LIBS) $(KFWLIB) $(SCLIB) $(CCLIBRES) rpcrt4.lib $(conlibsdll) $(conflags)
 
 $(CCLIB).def:
     echo ;$(CCLIB).def is generated by a Makefile rule. > $(CCLIB).def
diff --git a/src/windows/version.rc b/src/windows/version.rc
index b23eec1..810d800 100644
--- a/src/windows/version.rc
+++ b/src/windows/version.rc
@@ -108,6 +108,17 @@
 #endif
 #endif /* GSSAPI */
 
+#ifdef CCAPI_LIB
+#define K5_DESCRIPTION "Kerberos Credentials Cache DLL\0"
+#define K5_INTERNAL_NAME "krbcc\0"
+#define K5_FILETYPE	VFT_DLL
+#if defined(_WIN64)
+#define K5_ORIGINAL_NAME "krbcc64.dll\0"
+#else
+#define K5_ORIGINAL_NAME "krbcc32.dll\0"
+#endif
+#endif /* CCAPI_LIB */
+
 #ifdef LEASH_APP
 #define K5_DESCRIPTION "MIT Kerberos Ticket Manager - " KRB5_PRODUCTNAME_STR "\0"
 #define K5_FILETYPE	VFT_APP


More information about the cvs-krb5 mailing list