From c8ccb887882bc4affef02a8193e9b1ed01f885f5 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 25 May 2009 22:30:24 +0000 Subject: [PATCH] windows-libafsconf-20090525 LICENSE MIT libafsconf.dll has been present since OpenAFS 1.0. However, for some unknown reason the components that it consists of (cm_dns.obj, cm_config.obj, cm_nls.obj) have been staticly linked into exes and dlls all over the code base. This commit removes all of the static references and replaces them with libafsconf.lib. libafsconf.dll is also moved from Client\Program to Common because it is now linked to by server and utility components. --- src/WINNT/afsd/NTMakefile | 16 ++++++---------- src/WINNT/install/NSIS/OpenAFS.nsi | 10 +++++++--- src/WINNT/install/wix/files.wxi | 12 +++++------- src/auth/NTMakefile | 4 +--- src/bozo/NTMakefile | 6 ++---- src/bucoord/NTMakefile | 3 +-- src/budb/NTMakefile | 4 +--- src/butc/NTMakefile | 3 +-- src/kauth/NTMakefile | 10 +--------- src/libafsauthent/NTMakefile | 6 ++---- src/ptserver/NTMakefile | 6 ++---- src/tbutc/NTMakefile | 13 +------------ src/update/NTMakefile | 3 +-- src/vlserver/NTMakefile | 3 +-- src/volser/NTMakefile | 3 +-- 15 files changed, 33 insertions(+), 69 deletions(-) diff --git a/src/WINNT/afsd/NTMakefile b/src/WINNT/afsd/NTMakefile index 4f8f24def6..3ff5122549 100644 --- a/src/WINNT/afsd/NTMakefile +++ b/src/WINNT/afsd/NTMakefile @@ -137,7 +137,8 @@ $(OUT)\cm_conn.obj: cm_conn.c $(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $** FSOBJS=$(OUT)\fs.obj \ - $(OUT)\fs_utils.obj + $(OUT)\fs_utils.obj \ + $(OUT)\cm_nls.obj CMDBGOBJS=$(OUT)\cmdebug.obj @@ -181,7 +182,7 @@ MIDL_FLAGS=/app_config \ ############################################################################ # libafsconf.dll -CONF_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libafsconf.dll +CONF_DLLFILE = $(DESTDIR)\lib\libafsconf.dll CONF_DLLLIBS = \ $(DESTDIR)\lib\afs\afsutil.lib \ @@ -193,8 +194,7 @@ $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS) $(DLLPREP) $(CODESIGN_USERLAND) $(MAKECYGLIB) --input-def libafsconf.def - $(COPY) $*.lib $(ILIBDIR) - $(DEL) $*.lib $*.exp + $(DEL) $*.exp ############################################################################ # lanahelper.lib @@ -265,10 +265,7 @@ $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS) ############################################################################ # Install target; primary makefile target -install_objs: $(OUT)\cm_dns.obj $(OUT)\cm_config.obj $(OUT)\cm_nls.obj $(LANAHELPERLIB) $(OUT)\afsicf.obj - $(COPY) $(OUT)\cm_dns.obj $(DESTDIR)\lib - $(COPY) $(OUT)\cm_nls.obj $(DESTDIR)\lib - $(COPY) $(OUT)\cm_config.obj $(DESTDIR)\lib +install_objs: $(CONF_DLLFILE) $(LANAHELPERLIB) $(OUT)\afsicf.obj $(COPY) $(OUT)\afsicf.obj $(DESTDIR)\lib install_headers: $(IDLFILES) $(INCFILES) @@ -316,8 +313,7 @@ EXELIBS = \ $(DESTDIR)\lib\afsrx.lib \ $(DESTDIR)\lib\afslwp.lib \ $(DESTDIR)\lib\libosi.lib \ - $(DESTDIR)\lib\libafsconf.lib \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib EXELIBS2 = \ $(DESTDIR)\lib\afsrpc.lib \ diff --git a/src/WINNT/install/NSIS/OpenAFS.nsi b/src/WINNT/install/NSIS/OpenAFS.nsi index 3786b77fef..692a5a53b9 100644 --- a/src/WINNT/install/NSIS/OpenAFS.nsi +++ b/src/WINNT/install/NSIS/OpenAFS.nsi @@ -546,7 +546,6 @@ Section "!AFS Client" secClient SetOutPath "$INSTDIR\Client\Program" File "${AFS_CLIENT_BUILDDIR}\afsshare.exe" !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR" - !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR" File "${AFS_CLIENT_BUILDDIR}\klog.exe" File "${AFS_CLIENT_BUILDDIR}\tokens.exe" File "${AFS_CLIENT_BUILDDIR}\unlog.exe" @@ -576,6 +575,8 @@ Section "!AFS Client" secClient File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe" ; Remove the binaries from the old location if present + Delete /REBOOTOK "$INSTDIR\Client\Program\libafsconf.dll" + Delete "$INSTDIR\Client\Program\libafsconf.pdb" Delete /REBOOTOK "$SYSDIR\afslogon.dll" Delete "$SYSDIR\afscpcc.exe" Delete "$SYSDIR\afslogon.pdb" @@ -1161,7 +1162,8 @@ Section /o "Debug symbols" secDebug SetOutPath "$INSTDIR\Client\Program" File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb" File "${AFS_CLIENT_BUILDDIR}\libosi.pdb" - File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb" + ; remove old location if present + Delete "$INSTDIR\Client\Program\libafsconf.pdb" File "${AFS_CLIENT_BUILDDIR}\klog.pdb" File "${AFS_CLIENT_BUILDDIR}\tokens.pdb" File "${AFS_CLIENT_BUILDDIR}\unlog.pdb" @@ -1268,6 +1270,7 @@ DoCommon: File "${AFS_DESTDIR}\lib\afsauthent.pdb" File "${AFS_DESTDIR}\lib\afspthread.pdb" File "${AFS_DESTDIR}\lib\afsrpc.pdb" + File "${AFS_DESTDIR}\lib\libafsconf.pdb" File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb" File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb" File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb" @@ -2770,7 +2773,8 @@ Function AFSLangFiles File "${AFS_CLIENT_BUILDDIR}\afs_config.exe" !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR" - !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\libafsconf.dll" "$INSTDIR\Common\libafsconf.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsadminutil.dll" "$INSTDIR\Common\afsadminutil.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll" "$INSTDIR\Common\afsclientadmin.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll" "$INSTDIR\Common\afsprocmgmt.dll" "$INSTDIR" diff --git a/src/WINNT/install/wix/files.wxi b/src/WINNT/install/wix/files.wxi index c206bf903a..b213758415 100644 --- a/src/WINNT/install/wix/files.wxi +++ b/src/WINNT/install/wix/files.wxi @@ -48,6 +48,9 @@ + + + @@ -77,6 +80,7 @@ + @@ -1058,9 +1062,6 @@ - - - @@ -1238,7 +1239,6 @@ - @@ -1648,15 +1648,13 @@ - - - + diff --git a/src/auth/NTMakefile b/src/auth/NTMakefile index 532e92350e..da767ade5b 100644 --- a/src/auth/NTMakefile +++ b/src/auth/NTMakefile @@ -81,9 +81,7 @@ EXELIBS =\ $(EXELIBDIR)\afs\afsutil.lib \ $(EXELIBDIR)\afs\afseventlog.lib \ $(EXELIBDIR)\afs\afsreg.lib \ - $(EXELIBDIR)\cm_dns.obj \ - $(EXELIBDIR)\cm_nls.obj - + $(EXELIBDIR)\libafsconf.lib $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS) $(EXECONLINK) dnsapi.lib shell32.lib diff --git a/src/bozo/NTMakefile b/src/bozo/NTMakefile index 03c5167a15..64d46dcc38 100644 --- a/src/bozo/NTMakefile +++ b/src/bozo/NTMakefile @@ -67,8 +67,7 @@ BOSSERVER_EXELIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS) $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib @@ -104,8 +103,7 @@ BOS_EXELIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ $(DESTDIR)\lib\afs\afspioctl.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(RS_BOS_EXEFILE): $(BOS_EXEOBJS) $(BOS_EXELIBS) diff --git a/src/bucoord/NTMakefile b/src/bucoord/NTMakefile index 43a56e8ec3..fb95e8f397 100644 --- a/src/bucoord/NTMakefile +++ b/src/bucoord/NTMakefile @@ -88,8 +88,7 @@ EXELIBS =\ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ $(DESTDIR)\lib\afs\afspioctl.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS) diff --git a/src/budb/NTMakefile b/src/budb/NTMakefile index 48e794b427..ba93aeb5f5 100644 --- a/src/budb/NTMakefile +++ b/src/budb/NTMakefile @@ -77,9 +77,7 @@ EXELIBS =\ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj - + $(DESTDIR)\lib\libafsconf.lib $(EXEFILE): $(EXEOBJS) $(EXELIBS) $(EXECONLINK) dnsapi.lib iphlpapi.lib shell32.lib diff --git a/src/butc/NTMakefile b/src/butc/NTMakefile index 6ab9b7954c..45c3b7bf54 100644 --- a/src/butc/NTMakefile +++ b/src/butc/NTMakefile @@ -53,8 +53,7 @@ EXELIBS =\ $(DESTDIR)\lib\afs\afspioctl.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(EXERES): butc.rc AFS_component_version_number.h diff --git a/src/kauth/NTMakefile b/src/kauth/NTMakefile index 75a1bc9780..29835483b5 100644 --- a/src/kauth/NTMakefile +++ b/src/kauth/NTMakefile @@ -39,14 +39,8 @@ KAUTH_LIBOBJS =\ $(OUT)\kaerrors.obj \ $(OUT)\user_nt.obj \ $(OUT)\krb_tf.obj \ - $(OUT)\cm_config.obj \ $(OUT)\AFS_component_version_number.obj -WINNTAFSD = ..\WINNT\afsd\ - -$(OUT)\cm_config.obj: $(WINNTAFSD)\cm_config.c - $(C2OBJ) $** - $(KAUTH_LIBFILE): $(KAUTH_LIBOBJS) $(LIBARCH) @@ -67,7 +61,6 @@ KAUTH_KRB_LIBOBJS =\ $(OUT)\kaerrors.obj \ $(OUT)\user.krb.obj \ $(OUT)\krb_tf.obj \ - $(OUT)\cm_config.obj \ $(OUT)\AFS_component_version_number.obj $(KAUTH_KRB_LIBFILE): $(KAUTH_KRB_LIBOBJS) @@ -98,8 +91,7 @@ AFSLIBS = \ $(DESTDIR)\lib\afsubik.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afsrxkad.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib TOKENLIB = $(DESTDIR)\lib\afs\afspioctl.lib diff --git a/src/libafsauthent/NTMakefile b/src/libafsauthent/NTMakefile index f4f8fcca60..fb68a942af 100644 --- a/src/libafsauthent/NTMakefile +++ b/src/libafsauthent/NTMakefile @@ -82,7 +82,6 @@ SYSOBJS = \ $(OUT)\pioctl_nt.obj WINNTAFSDOBJS =\ - $(OUT)\cm_config.obj \ $(OUT)\afsrpc_c.obj DLLOBJS =\ @@ -95,8 +94,6 @@ DLLOBJS =\ $(SYSOBJS) \ $(WINNTAFSDOBJS) \ $(AUDITBJS) \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj \ $(OUT)\afsauthent.res $(RXOBJS): $(RX)\$$(@B).c @@ -142,7 +139,8 @@ DLLLIBS =\ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ $(DESTDIR)\lib\afslwp.lib \ - $(DESTDIR)\lib\lanahelper.lib + $(DESTDIR)\lib\lanahelper.lib \ + $(DESTDIR)\lib\libafsconf.lib $(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS) $(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib shell32.lib diff --git a/src/ptserver/NTMakefile b/src/ptserver/NTMakefile index 3a50501b55..71cd575715 100644 --- a/src/ptserver/NTMakefile +++ b/src/ptserver/NTMakefile @@ -69,8 +69,7 @@ PTSERVER_EXELIBS =\ $(DESTDIR)\lib\afs\afsaudit.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib !IF (("$(SYS_NAME)"!="i386_win95" ) && ("$(SYS_NAME)"!="I386_WIN95" )) PTSERVER_EXELIBS =$(PTSERVER_EXELIBS) $(DESTDIR)\lib\afs\afsprocmgmt.lib @@ -111,8 +110,7 @@ PTS_EXELIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afspioctl.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS) $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib diff --git a/src/tbutc/NTMakefile b/src/tbutc/NTMakefile index 815530afe5..11b4500baf 100644 --- a/src/tbutc/NTMakefile +++ b/src/tbutc/NTMakefile @@ -94,20 +94,9 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \ $(DESTDIR)\lib\afspthread.lib \ !ENDIF $(DESTDIR)\lib\afsdes.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib -# $(DESTDIR)\lib\afsauthent.lib \ -# $(DESTDIR)\lib\afsrpc.lib \ -# $(DESTDIR)\lib\afs\afscmd.lib \ -# $(DESTDIR)\lib\afs\afsaudit.lib \ -# $(DESTDIR)\lib/afs/afscom_err.lib \ -# $(DESTDIR)\lib\afs\afsreg.lib \ -# $(DESTDIR)\lib\afs\afsprocmgmt.lib \ -# $(DESTDIR)\lib\afs\afseventlog.lib \ -# $(DESTDIR)\lib\pthread.lib - # rm $(OUT)\tcstatus.obj # nmake /nologo /f ntmakefile install #----------------------------------------------- BUTC diff --git a/src/update/NTMakefile b/src/update/NTMakefile index 3f651c89a1..d8500320f1 100644 --- a/src/update/NTMakefile +++ b/src/update/NTMakefile @@ -22,8 +22,7 @@ LIBS = \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afsrxkad.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib ############################################################################ # Definitions for generating files via RXGEN diff --git a/src/vlserver/NTMakefile b/src/vlserver/NTMakefile index faf11b1aaa..59e62744cf 100644 --- a/src/vlserver/NTMakefile +++ b/src/vlserver/NTMakefile @@ -88,8 +88,7 @@ VLSERVER_EXECLIBS = \ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afsprocmgmt.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS) $(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib diff --git a/src/volser/NTMakefile b/src/volser/NTMakefile index 61976cffbb..5ca1d246c9 100644 --- a/src/volser/NTMakefile +++ b/src/volser/NTMakefile @@ -70,8 +70,7 @@ EXEC_LIBS = \ $(DESTDIR)\lib\afs\afsacl.lib \ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\afs\afseventlog.lib \ - $(DESTDIR)\lib\cm_dns.obj \ - $(DESTDIR)\lib\cm_nls.obj + $(DESTDIR)\lib\libafsconf.lib ############################################################################