ticket: 6826
authorghudson <ghudson@dc483132-0cff-0310-8789-dd5450dbe970>
Thu, 25 Nov 2010 20:28:30 +0000 (20:28 +0000)
committerghudson <ghudson@dc483132-0cff-0310-8789-dd5450dbe970>
Thu, 25 Nov 2010 20:28:30 +0000 (20:28 +0000)
subject: Fix Windows build
target_version: 1.9
tags: pullup

Repair the Windows build.  Tested with the prepare-on-Unix method.
Some specific changes include:

* Removed the IPC finalizer (no longer used after r20787) from
  ccapi/lib/ccapi_ipc.c, as it was creating a difficult dependency
  chain for the pingtest build in ccapi/test.  Also updated pingtest
  to use the k5_ipc_stream interfaces since cci_stream is gone.

* Reverted the apparently non-functional r20277.

* klist -V prints just "Kerberos for Windows", since it has no access
  to PACKAGE_NAME and PACKAGE_VERSION from autoconf.  This should be
  addressed correctly.

* krb5, telnet, gssftp, and NIM are removed from the build.

* Some files had CRLFs; these were replaced with LFs and the
  svn:eol-style property set on the files.  Otherwise the CRLFs became
  CRCRLFs after the zip transfer.

* Windows does not have opendir/readdir, so added Windows code to
  prof_parse.c for includedir.  Probable fodder for a libkrb5support
  portability shim.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24533 dc483132-0cff-0310-8789-dd5450dbe970

82 files changed:
src/Makefile.in
src/appl/Makefile.in
src/ccapi/lib/ccapi_context.c
src/ccapi/lib/ccapi_ipc.c
src/ccapi/lib/ccapi_ipc.h
src/ccapi/lib/ccapi_os_ipc.h
src/ccapi/lib/mac/ccapi_os_ipc.c
src/ccapi/lib/win/Makefile.in
src/ccapi/lib/win/ccapi_os_ipc.cxx
src/ccapi/server/win/Makefile.in
src/ccapi/server/win/Server.sln
src/ccapi/server/win/Server.vcproj
src/ccapi/server/win/WorkItem.cpp
src/ccapi/server/win/WorkQueue.cpp
src/ccapi/server/win/ccs_os_server.cpp
src/ccapi/test/Makefile.in
src/ccapi/test/pingtest.c
src/clients/kinit/kinit.c
src/clients/klist/klist.c
src/config/pre.in
src/config/win-pre.in
src/include/k5-int.h
src/include/win-mac.h
src/lib/Makefile.in
src/lib/crypto/Makefile.in
src/lib/crypto/builtin/Makefile.in
src/lib/crypto/builtin/aes/Makefile.in
src/lib/crypto/builtin/camellia/Makefile.in
src/lib/crypto/builtin/des/Makefile.in
src/lib/crypto/builtin/enc_provider/Makefile.in
src/lib/crypto/builtin/enc_provider/camellia.c
src/lib/crypto/builtin/hash_provider/Makefile.in
src/lib/crypto/builtin/md4/Makefile.in
src/lib/crypto/builtin/md5/Makefile.in
src/lib/crypto/builtin/sha1/Makefile.in
src/lib/crypto/builtin/sha2/Makefile.in
src/lib/crypto/crypto_tests/Makefile.in
src/lib/crypto/krb/Makefile.in
src/lib/crypto/krb/arcfour/Makefile.in
src/lib/crypto/krb/checksum/Makefile.in
src/lib/crypto/krb/crc32/Makefile.in
src/lib/crypto/krb/dk/Makefile.in
src/lib/crypto/krb/old/Makefile.in
src/lib/crypto/krb/prf/Makefile.in
src/lib/crypto/krb/prng/Makefile.in
src/lib/crypto/krb/prng/fortuna/Makefile.in
src/lib/crypto/krb/prng/nss/Makefile.in
src/lib/crypto/krb/prng/yarrow/Makefile.in
src/lib/crypto/krb/rand2key/Makefile.in
src/lib/crypto/krb/raw/Makefile.in
src/lib/gssapi/generic/Makefile.in
src/lib/gssapi/krb5/copy_ccache.c
src/lib/gssapi/krb5/get_tkt_flags.c
src/lib/gssapi/krb5/gssapiP_krb5.h
src/lib/gssapi/krb5/gssapi_krb5.c
src/lib/gssapi/krb5/krb5_gss_glue.c
src/lib/gssapi/krb5/lucid_context.c
src/lib/gssapi/krb5/set_allowable_enctypes.c
src/lib/gssapi/krb5/set_ccache.c
src/lib/gssapi/mechglue/g_mechattr.c
src/lib/gssapi/mechglue/g_oid_ops.c
src/lib/gssapi/mechglue/g_store_cred.c
src/lib/gssapi/mechglue/mglueP.h
src/lib/gssapi/spnego/gssapiP_spnego.h
src/lib/gssapi/spnego/spnego_mech.c
src/lib/gssapi32.def
src/lib/krb5/asn.1/krb5_decode.c
src/lib/krb5/keytab/kt_file.c
src/lib/krb5/krb/Makefile.in
src/lib/krb5/krb/auth_con.c
src/lib/krb5/krb/get_creds.c
src/lib/krb5/krb/kfree.c
src/lib/krb5/os/hst_realm.c
src/lib/krb5_32.def
src/lib/win_glue.c
src/util/profile/Makefile.in
src/util/profile/prof_parse.c
src/windows/Makefile.in
src/windows/README
src/windows/build/bkw.pl
src/windows/ntsecapitest.c [deleted file]
src/windows/ntsecapitest.pl [deleted file]

index 16d04e65c2150e156720bfabf324817822453623..5a78c77bbfcb68ad68f3904a38164e07dbf6a0ac 100644 (file)
@@ -66,13 +66,10 @@ all-windows:: maybe-awk Makefile-windows
        @echo Making in clients
        cd ..\clients
        $(MAKE) -$(MFLAGS)
-       @echo Making in appl\gss-sample
-       cd ..\appl\gss-sample
+       @echo Making in appl
+       cd ..\appl
        $(MAKE) -$(MFLAGS)
-       @echo Making in appl\gssftp\ftp
-       cd ..\..\appl\gssftp\ftp
-       $(MAKE) -$(MFLAGS)
-       cd ..\..\..
+       cd ..
 
 world::
        date
@@ -185,8 +182,7 @@ config-windows:: Makefile-windows
 ##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
 
 WINMAKEFILES=Makefile \
-       appl\gss-sample\Makefile \
-       appl\gssftp\ftp\Makefile \
+       appl\Makefile appl\gss-sample\Makefile \
        ccapi\Makefile \
        ccapi\lib\win\Makefile \
        ccapi\server\win\Makefile \
@@ -196,17 +192,19 @@ WINMAKEFILES=Makefile \
        clients\kpasswd\Makefile clients\kvno\Makefile \
        clients\kcpytkt\Makefile clients\kdeltkt\Makefile \
        include\Makefile \
-       lib\Makefile lib\crypto\Makefile \
-       lib\crypto\krb\crc32\Makefile lib\crypto\@CRYPTO_IMPL@\des\Makefile \
-       lib\crypto\krb\dk\Makefile lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile \
-       lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile \
-       lib\crypto\krb\keyhash_provider\Makefile \
-       lib\crypto\krb\prf\Makefile lib\crypto\krb\rand2key\Makefile \
-       lib\crypto\krb\raw\Makefile lib\crypto\krb\old\Makefile \
-       lib\crypto\@CRYPTO_IMPL@\sha1\Makefile lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile \
-       lib\crypto\@CRYPTO_IMPL@\md4\Makefile lib\crypto\@CRYPTO_IMPL@\md5\Makefile \
-       lib\crypto\krb\prng\Makefile lib\crypto\@CRYPTO_IMPL@\aes\Makefile \
-       lib\crypto\crypto_tests \
+       lib\Makefile lib\crypto\Makefile lib\crypto\krb\Makefile \
+       lib\crypto\krb\crc32\Makefile lib\crypto\krb\rand2key\Makefile \
+       lib\crypto\krb\prng\Makefile lib\crypto\krb\prng\yarrow\Makefile \
+       lib\crypto\krb\prf\Makefile lib\crypto\krb\checksum\Makefile \
+       lib\crypto\krb\old\Makefile lib\crypto\krb\raw\Makefile \
+       lib\crypto\krb\arcfour\Makefile lib\crypto\krb\dk\Makefile \
+       lib\crypto\builtin\Makefile lib\crypto\builtin\aes\Makefile \
+       lib\crypto\builtin\enc_provider\Makefile \
+       lib\crypto\builtin\des\Makefile lib\crypto\builtin\md5\Makefile \
+       lib\crypto\builtin\camellia\Makefile lib\crypto\builtin\md4\Makefile \
+       lib\crypto\builtin\hash_provider\Makefile \
+       lib\crypto\builtin\sha2\Makefile lib\crypto\builtin\sha1\Makefile \
+       lib\crypto\crypto_tests\Makefile \
        lib\gssapi\Makefile lib\gssapi\generic\Makefile \
        lib\gssapi\krb5\Makefile lib\gssapi\mechglue\Makefile \
        lib\gssapi\spnego\Makefile \
@@ -232,9 +230,9 @@ WINMAKEFILES=Makefile \
 
 ##DOS##Makefile: Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
+##DOS##appl\Makefile: appl\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##appl\gssftp\ftp\Makefile: appl\gssftp\ftp\Makefile.in $(MKFDEP)
+##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
 ##DOS##ccapi\Makefile: ccapi\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
@@ -268,35 +266,49 @@ WINMAKEFILES=Makefile \
 ##DOS##        $(WCONFIG) config < $@.in > $@
 ##DOS##lib\crypto\krb\crc32\Makefile: lib\crypto\krb\crc32\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\des\Makefile: lib\crypto\@CRYPTO_IMPL@\des\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\rand2key\Makefile: lib\crypto\krb\rand2key\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\dk\Makefile: lib\crypto\krb\dk\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\prng\fortuna\Makefile: lib\crypto\krb\prng\fortuna\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile: lib\crypto\@CRYPTO_IMPL@\enc_provider\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\prng\yarrow\Makefile: lib\crypto\krb\prng\yarrow\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile: lib\crypto\@CRYPTO_IMPL@\hash_provider\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\prng\Makefile: lib\crypto\krb\prng\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\keyhash_provider\Makefile: lib\crypto\krb\keyhash_provider\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\prf\Makefile: lib\crypto\krb\prf\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\sha1\Makefile: lib\crypto\@CRYPTO_IMPL@\sha1\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\checksum\Makefile: lib\crypto\krb\checksum\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile: lib\crypto\@CRYPTO_IMPL@\arcfour\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\Makefile: lib\crypto\krb\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\md4\Makefile: lib\crypto\@CRYPTO_IMPL@\md4\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\old\Makefile: lib\crypto\krb\old\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\md5\Makefile: lib\crypto\md5\@CRYPTO_IMPL@\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\raw\Makefile: lib\crypto\krb\raw\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\yarrow\Makefile: lib\crypto\krb\yarrow\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\arcfour\Makefile: lib\crypto\krb\arcfour\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\aes\Makefile: lib\crypto\@CRYPTO_IMPL@\aes\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\krb\dk\Makefile: lib\crypto\krb\dk\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\old\Makefile: lib\crypto\krb\old\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\builtin\aes\Makefile: lib\crypto\builtin\aes\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\raw\Makefile: lib\crypto\krb\raw\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\builtin\enc_provider\Makefile: lib\crypto\builtin\enc_provider\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\krb\Makefile: lib\crypto\krb\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\builtin\des\Makefile: lib\crypto\builtin\des\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\md5\Makefile: lib\crypto\builtin\md5\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\camellia\Makefile: lib\crypto\builtin\camellia\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\md4\Makefile: lib\crypto\builtin\md4\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\hash_provider\Makefile: lib\crypto\builtin\hash_provider\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
-##DOS##lib\crypto\@CRYPTO_IMPL@\Makefile: lib\crypto\@CRYPTO_IMPL@\Makefile.in $(MKFDEP)
+##DOS##lib\crypto\builtin\sha2\Makefile: lib\crypto\builtin\sha2\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\sha1\Makefile: lib\crypto\builtin\sha1\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\builtin\Makefile: lib\crypto\builtin\Makefile.in $(MKFDEP)
+##DOS##        $(WCONFIG) config < $@.in > $@
+##DOS##lib\crypto\crypto_tests\Makefile: lib\crypto\crypto_tests\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
 ##DOS##lib\gssapi\Makefile: lib\gssapi\Makefile.in $(MKFDEP)
 ##DOS##        $(WCONFIG) config < $@.in > $@
@@ -373,13 +385,10 @@ clean-windows:: Makefile-windows
        @echo Making clean in clients
        cd ..\clients
        $(MAKE) -$(MFLAGS) clean
-       @echo Making clean in appl\gss-sample
-       cd ..\appl\gss-sample
-       $(MAKE) -$(MFLAGS) clean
-       @echo Making clean in appl\gssftp\ftp
-       cd ..\..\appl\gssftp\ftp
+       @echo Making clean in appl
+       cd ..\appl
        $(MAKE) -$(MFLAGS) clean
-       cd ..\..\..
+       cd ..
        @echo Making clean in root
 
 #
@@ -393,41 +402,43 @@ ren2long:
 # Macintosh sites from the source tree on Unix.
 #
 ZIP=zip
-FILES= ./* \
+FILES= ./* appl/* appl/gss-sample/* \
     clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
-       clients/kpasswd/* clients/kcpytkt/* clients/kdeltkt/* \
-       config/* include/* include/kerberosIV/* \
-       include/krb5/* include/krb5/stock/* include/sys/* lib/* \
-       lib/crypto/* lib/crypto/krb/crc32/* lib/crypto/@CRYPTO_IMPL@/des/* lib/crypto/krb/dk/* \
-       lib/crypto/@CRYPTO_IMPL@/enc_provider/* lib/crypto/@CRYPTO_IMPL@/hash_provider/* \
-       lib/crypto/krb/keyhash_provider/* \
-       lib/crypto/krb/prf/* lib/crypto/krb/rand2key/* \
-       lib/crypto/krb/old/* lib/crypto/krb/raw/* \
-       lib/crypto/@CRYPTO_IMPL@/sha1/* lib/crypto/@CRYPTO_IMPL@/arcfour/* \
-       lib/crypto/@CRYPTO_IMPL@/md4/* \
-       lib/crypto/@CRYPTO_IMPL@/md5/* lib/crypto/krb/prng/* \
-       lib/crypto/krb/prng/@PRNG_ALG@/* \
-       lib/crypto/@CRYPTO_IMPL@/* lib/crypto/krb/* lib/crypto/crypto_tests \
+       clients/kpasswd/* clients/kvno/* clients/kcpytkt/* clients/kdeltkt/* \
+       config/* include/* \
+       include/krb5/* lib/* lib/crypto/* lib/crypto/krb/* \
+       lib/crypto/krb/crc32/* lib/crypto/krb/rand2key/* \
+       lib/crypto/krb/prng/fortuna/* lib/crypto/krb/prng/nss/* \
+       lib/crypto/krb/prng/yarrow/* lib/crypto/krb/prng/* \
+       lib/crypto/krb/prf/* lib/crypto/krb/checksum/* lib/crypto/krb/old/* \
+       lib/crypto/krb/raw/* lib/crypto/krb/arcfour/* lib/crypto/krb/dk/* \
+       lib/crypto/builtin/aes/* lib/crypto/builtin/enc_provider/* \
+       lib/crypto/builtin/des/* lib/crypto/builtin/md5/* \
+       lib/crypto/builtin/camellia/* lib/crypto/builtin/md4/* \
+       lib/crypto/builtin/hash_provider/* lib/crypto/builtin/sha2/* \
+       lib/crypto/builtin/sha1/* lib/crypto/builtin/* \
+       lib/crypto/crypto_tests/* \
        lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
        lib/gssapi/mechglue/* lib/gssapi/spnego/* \
        lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
        lib/krb5/ccache/* lib/krb5/ccache/ccapi/* \
        lib/krb5/error_tables/* \
-       lib/krb5/keytab/* lib/krb5/keytab/file/* lib/krb5/keytab/srvtab/* \
-       lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
-       util/* util/et/* util/profile/*
+       lib/krb5/keytab/* lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
+       lib/krb5/unicode/* lib/krb5/unicode/utbm/* lib/krb5/unicode/ure/* \
+       lib/krb5/unicode/ucdata/* \
+       util/* util/et/* util/profile/* util/support/*
 
 WINFILES= \
-    ccapi/common/* ccapi/common/win/* ccapi/common/win/OldCC/* \
+    ccapi/* ccapi/common/* ccapi/common/win/* ccapi/common/win/OldCC/* \
     ccapi/lib/* ccapi/lib/win/* ccapi/lib/win/OldCC/* \
     ccapi/server/* ccapi/server/win/* \
-    ccapi\test\* \
+    ccapi/test/* \
     util/windows/* windows/* windows/lib/* windows/cns/* \
        windows/wintel/* windows/gss/* windows/gina/* windows/ms2mit/* \
        windows/kfwlogon/*
 
 WINBINARYFILES=        windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
-       windows/*/*.hpj windows/lib/*.lib
+       windows/*/*.hpj
 
 #
 # Part of building the PC release has to be done on Unix. This includes
@@ -456,7 +467,7 @@ ETOUT =     \
        $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c \
        $(CCL)ccapi_err.h $(CCL)ccapi_err.c
 
-HOUT = $(INC)krb5\krb5.h $(GG)gssapi.h $(PR)profile.h
+HOUT = $(INC)krb5/krb5.h $(GG)gssapi.h $(PR)profile.h
 
 CLEANUP= Makefile $(ETOUT) $(HOUT) \
        include/profile.h include/osconf.h \
@@ -549,10 +560,10 @@ $(CE)test1.c: $(AC) $(CE)test1.et
 $(CE)test2.c: $(AC) $(CE)test2.et
        $(AWK) -f $(AC) outfile=$@ $(CE)test2.et
 
-KRBHDEP = $(INC)krb5\krb5.hin $(INC)krb5_err.h $(INC)k5e1_err.h \
+KRBHDEP = $(INC)krb5/krb5.hin $(INC)krb5_err.h $(INC)k5e1_err.h \
        $(INC)kdb5_err.h $(INC)kv5m_err.h $(INC)krb524_err.h $(INC)asn1_err.h
 
-$(INC)krb5\krb5.h: $(KRBHDEP)
+$(INC)krb5/krb5.h: $(KRBHDEP)
        rm -f $@
        cat $(KRBHDEP) > $@
 $(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
@@ -584,6 +595,8 @@ distclean-windows:
        config\rm.bat $(KBINDIR)\*.dll $(KBINDIR)\*.exe
        @if exist $(KBINDIR)\nul rmdir $(KBINDIR)
 
+# Avoid using $(CP) here because the nul+ hack breaks implicit
+# destination filenames.
 install-windows::
        @if "$(KRB_INSTALL_DIR)"=="" @echo KRB_INSTALL_DIR is not defined!  Please define it.
        @if "$(KRB_INSTALL_DIR)"=="" @dir /b \nul\nul
@@ -594,31 +607,29 @@ install-windows::
        @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi"
        @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib"
        @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin"
-       $(CP) include\krb5.h "$(KRB_INSTALL_DIR)\include\."
-       $(CP) include\krb5\krb5.h "$(KRB_INSTALL_DIR)\include\krb5\."
-       $(CP) include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
-       $(CP) include\profile.h "$(KRB_INSTALL_DIR)\include\."
-       $(CP) include\com_err.h "$(KRB_INSTALL_DIR)\include\."
-       $(CP) include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
-       $(CP) include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
-       $(CP) lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
-       $(CP) lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) windows\wintel\$(OUTPRE)telnet.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) appl\gss-sample\$(OUTPRE)gss-server.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) appl\gss-sample\$(OUTPRE)gss-client.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) windows\ms2mit\$(OUTPRE)ms2mit.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) appl\gssftp\ftp\$(OUTPRE)ftp.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) ccapi\lib\win\$(OUTPRE)ccapi.dll "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) ccapi\server\win\$(OUTPRE)ccapiserver.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kvno\$(OUTPRE)kvno.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kcpytkt\$(OUTPRE)kcpytkt.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kdeltkt\$(OUTPRE)kdeltkt.exe "$(KRB_INSTALL_DIR)\bin\."
-       $(CP) clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy include\krb5.h "$(KRB_INSTALL_DIR)\include\."
+       copy include\krb5\krb5.h "$(KRB_INSTALL_DIR)\include\krb5\."
+       copy include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
+       copy include\profile.h "$(KRB_INSTALL_DIR)\include\."
+       copy include\com_err.h "$(KRB_INSTALL_DIR)\include\."
+       copy include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
+       copy include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
+       copy lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
+       copy lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
+       copy windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy appl\gss-sample\$(OUTPRE)gss-server.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy appl\gss-sample\$(OUTPRE)gss-client.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy windows\ms2mit\$(OUTPRE)ms2mit.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy ccapi\lib\win\srctmp\$(OUTPRE)ccapi.dll "$(KRB_INSTALL_DIR)\bin\."
+       copy ccapi\server\win\srctmp\$(OUTPRE)ccapiserver.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kvno\$(OUTPRE)kvno.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kcpytkt\$(OUTPRE)kcpytkt.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kdeltkt\$(OUTPRE)kdeltkt.exe "$(KRB_INSTALL_DIR)\bin\."
+       copy clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
 
 install-unix:: 
        $(INSTALL_SCRIPT) krb5-config \
index 57eafd2e3c5c7c89ad18a8c6b690b74fb59657b5..015961110d655411453fd1022c12f1ccfa0bb868 100644 (file)
@@ -3,4 +3,14 @@ BUILDTOP=$(REL)..
 
 SUBDIRS= sample simple user_user gss-sample
 
+all-windows:: 
+       @echo Making in gss-sample
+       cd gss-sample
+       $(MAKE) -$(MFLAGS)
+       cd ..
 
+clean-windows::
+       @echo Making clean in lib\crypto
+       cd gss-sample
+       $(MAKE) -$(MFLAGS) clean
+       cd ..
index da8aa59f08ceb151bb4b6fe4a241ea59eed4fcf8..7715139ff4fff1169d8f30b9338838c80190748c 100644 (file)
@@ -114,7 +114,6 @@ static void cci_thread_fini (void)
 
     remove_error_table(&et_CAPI_error_table);
     cci_context_change_time_thread_fini ();
-    cci_ipc_thread_fini ();
 }
 
 
index 54b5faa867721ff2a6823eeeefb4b9f7952633d5..0f14df80afe6ecf93aff9750af0009b22a3f824d 100644 (file)
@@ -36,13 +36,6 @@ cc_int32 cci_ipc_thread_init (void)
 
 /* ------------------------------------------------------------------------ */
 
-void cci_ipc_thread_fini (void)
-{
-    cci_os_ipc_thread_fini ();
-}
-
-/* ------------------------------------------------------------------------ */
-
 static cc_int32 _cci_ipc_send (enum cci_msg_id_t  in_request_name,
                                cc_int32           in_launch_server,
                                cci_identifier_t   in_identifier,
index 5b7d5d3745be7e03b23e82792ec7b0f22544811f..03b890b1fc542f07740e266c207eecb5358008f7 100644 (file)
@@ -30,7 +30,6 @@
 #include "cci_common.h"
 
 cc_int32 cci_ipc_thread_init (void);
-void cci_ipc_thread_fini (void);
 
 cc_int32 cci_ipc_send (enum cci_msg_id_t  in_request_name,
                        cci_identifier_t   in_identifier,
index b5e040599731000b5fc1faec0e00bde902307543..eabea254e2674d3c586f216a17eea19e4c77abf8 100644 (file)
@@ -30,7 +30,6 @@
 #include "cci_common.h"
 
 cc_int32 cci_os_ipc_thread_init (void);
-void cci_os_ipc_thread_fini (void);
 
 cc_int32 cci_os_ipc (cc_int32      in_launch_server,
                      k5_ipc_stream in_request_stream,
index e0a81d878605f895d7e708fdf128fb6402990b64..a25297e311f80a9081359b1eb441f2b4785cf0f2 100644 (file)
@@ -40,14 +40,6 @@ cc_int32 cci_os_ipc_thread_init (void)
 
 /* ------------------------------------------------------------------------ */
 
-void cci_os_ipc_thread_fini (void)
-{
-    /* k5_ipc_send_request handles all thread data for us */
-    return;
-}
-
-/* ------------------------------------------------------------------------ */
-
 cc_int32 cci_os_ipc (cc_int32      in_launch_server,
                      k5_ipc_stream in_request_stream,
                      k5_ipc_stream *out_reply_stream)
index d5ca7a55be09f3f5dd33a81e53041d78fc8d31bd..7ca749a1895be8bd40ac749ba88a6f4291a31682 100644 (file)
@@ -116,4 +116,4 @@ clean::
        if exist $(OUTPRE)*.map del $(OUTPRE)*.map
        if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb
        if exist *.err del *.err
-    if exist $(SRCTMP) rm -rf $(SRCTMP)
+    if exist $(SRCTMP) rmdir /s /q $(SRCTMP)
index b6fc70155ce17599fecdb811f3c71d6af5bfffaa..062558cb1ffabf76794a00e1fb50133c67ba0c39 100644 (file)
@@ -118,13 +118,6 @@ extern "C" cc_int32 cci_os_ipc_thread_init (void) {
     }
 
 
-/* ------------------------------------------------------------------------ */
-
-void cci_os_ipc_thread_fini (void)
-{    
-}
-
-
 /* ------------------------------------------------------------------------ */
 
 cc_int32 cci_os_ipc (cc_int32      in_launch_server,
index 3d8da6d223a4240a74eaaf6cc14b52a5cdd3a559..36909b85ebae76179b8f5a3f83265bcf2f1263ac 100644 (file)
-# makefile: Constructs the Kerberos for Windows CCAPI server.\r
-\r
-#BUILDTOP is krb5/src and is relative to krb5/src/ccapi/server/win, for making Makefile.\r
-BUILDTOP=..\..\..\      \r
-CCAPI   = $(BUILDTOP)\CCAPI\r
-CO      = $(CCAPI)\common\r
-COWIN   = $(CCAPI)\common\win\r
-CCUTIL  = $(CCAPI)\common\win\OldCC             \r
-SRVDIR  = $(CCAPI)\server\r
-SRVWIN  = $(SRVDIR)\win\r
-POSIX   = $(BUILDTOP)\lib\krb5\posix\r
-SRCTMP  = $(SRVWIN)\srctmp\r
-\r
-!if defined(KRB5_KFW_COMPILE)\r
-KFWINC= /I$(BUILDTOP)\..\..\krbcc\include\r
-!endif\r
-\r
-OBJS   = $(OUTPRE)cci_array_internal.$(OBJEXT) \\r
-          $(OUTPRE)cci_cred_union.$(OBJEXT) \\r
-          $(OUTPRE)cci_debugging.$(OBJEXT) \\r
-          $(OUTPRE)cci_identifier.$(OBJEXT) \\r
-          $(OUTPRE)cci_message.$(OBJEXT) \\r
-          $(OUTPRE)cci_os_debugging.$(OBJEXT) \\r
-          $(OUTPRE)cci_os_identifier.$(OBJEXT) \\r
-          $(OUTPRE)ccs_array.$(OBJEXT) \\r
-          $(OUTPRE)ccs_cache_collection.$(OBJEXT) \\r
-          $(OUTPRE)ccs_callback.$(OBJEXT) \\r
-          $(OUTPRE)ccs_ccache.$(OBJEXT) \\r
-          $(OUTPRE)ccs_ccache_iterator.$(OBJEXT) \\r
-          $(OUTPRE)ccs_client.$(OBJEXT) \\r
-          $(OUTPRE)ccs_credentials.$(OBJEXT) \\r
-          $(OUTPRE)ccs_credentials_iterator.$(OBJEXT) \\r
-          $(OUTPRE)ccs_list.$(OBJEXT) \\r
-          $(OUTPRE)ccs_list_internal.$(OBJEXT) \\r
-          $(OUTPRE)ccs_lock.$(OBJEXT) \\r
-          $(OUTPRE)ccs_lock_state.$(OBJEXT) \\r
-          $(OUTPRE)ccs_os_pipe.$(OBJEXT) \\r
-          $(OUTPRE)ccs_os_server.$(OBJEXT) \\r
-          $(OUTPRE)ccs_pipe.$(OBJEXT) \\r
-          $(OUTPRE)ccs_reply_c.$(OBJEXT) \\r
-          $(OUTPRE)ccs_request_proc.$(OBJEXT) \\r
-          $(OUTPRE)ccs_server.$(OBJEXT) \\r
-          $(OUTPRE)ccs_win_pipe.$(OBJEXT) \\r
-          $(OUTPRE)ccs_request_s.$(OBJEXT) \\r
-          $(OUTPRE)ccutils.$(OBJEXT) \\r
-          $(OUTPRE)init.$(OBJEXT) \\r
-          $(OUTPRE)opts.$(OBJEXT) \\r
-          $(OUTPRE)secure.$(OBJEXT) \\r
-          $(OUTPRE)tls.$(OBJEXT) \\r
-          $(OUTPRE)util.$(OBJEXT) \\r
-          $(OUTPRE)win-utils.$(OBJEXT) \\r
-          $(OUTPRE)WorkItem.$(OBJEXT) \\r
-          $(OUTPRE)WorkQueue.$(OBJEXT)\r
-\r
-##### Options\r
-\r
-# Because all the sources are pulled together into the temp directory SRCTMP,\r
-#  the only includes we need are to directories outside of ccapi.\r
-LOCALINCLUDES = /I..\$(BUILDTOP) /I..\$(BUILDTOP)\include /I..\$(BUILDTOP)\include\krb5 $(KFWINC) \\r
-    -I..\$(BUILDTOP)\util\et /I.\r
-MIDLI  = /I..\$(BUILDTOP)\include\r
-\r
-CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \\r
--D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS\r
-\r
-##### Linker\r
-LINK   = link\r
-LIBS   = ..\$(SLIB) rpcrt4.lib advapi32.lib ws2_32.lib user32.lib\r
-LFLAGS = /nologo $(LOPTS)\r
-\r
-\r
-all:: Makefile copysrc midl $(OUTPRE)ccapiserver.exe finish\r
-\r
-ccs_request.h ccs_request_c.c ccs_request_s.c : ccs_request.idl ccs_request.acf\r
-    midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \\r
-    ccs_request.idl\r
-\r
-ccs_reply.h   ccs_reply_c.c   ccs_reply_s.c   : ccs_reply.idl   ccs_reply.acf\r
-    midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \\r
-    ccs_reply.idl\r
-\r
-copysrc :\r
-    echo "Copying all sources needed to build ccapiserver.exe to $(SRCTMP)"\r
-    if NOT exist $(SRCTMP)\nul mkdir $(SRCTMP)\r
-    xcopy /D/Y   $(CO)\*.*     $(SRCTMP)\r
-    xcopy /D/Y   $(COWIN)\*.*  $(SRCTMP)\r
-    xcopy /D/Y   $(CCUTIL)\*.* $(SRCTMP)\r
-    xcopy /D/Y   $(SRVDIR)\*.* $(SRCTMP)\r
-    xcopy /D/Y   $(SRVWIN)\*.* $(SRCTMP)\r
-    cd $(SRCTMP)\r
-    if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE)\r
-\r
-midl : ccs_request.h ccs_reply.h\r
-\r
-$(OUTPRE)ccapiserver.exe: $(OBJS)\r
-       $(LINK) $(LFLAGS) /map:$*.map /out:$@ $(OBJS) $(LIBS) $(conlibsdll) $(conflags) \r
-\r
-finish : \r
-    @echo "Finished building ccapiserver.exe"\r
-    cd\r
-\r
-clean:: \r
-       if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe\r
-       if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj\r
-       if exist $(OUTPRE)*.res del $(OUTPRE)*.res\r
-       if exist $(OUTPRE)*.map del $(OUTPRE)*.map\r
-       if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb\r
-       if exist *.err del *.err\r
-    if exist $(SRCTMP) rm -rf $(SRCTMP)\r
+# makefile: Constructs the Kerberos for Windows CCAPI server.
+
+#BUILDTOP is krb5/src and is relative to krb5/src/ccapi/server/win, for making Makefile.
+BUILDTOP=..\..\..
+CCAPI   = $(BUILDTOP)\CCAPI
+CO      = $(CCAPI)\common
+COWIN   = $(CCAPI)\common\win
+CCUTIL  = $(CCAPI)\common\win\OldCC
+SRVDIR  = $(CCAPI)\server
+SRVWIN  = $(SRVDIR)\win
+POSIX   = $(BUILDTOP)\lib\krb5\posix
+SRCTMP  = $(SRVWIN)\srctmp
+
+!if defined(KRB5_KFW_COMPILE)
+KFWINC= /I$(BUILDTOP)\..\..\krbcc\include
+!endif
+
+OBJS   = $(OUTPRE)cci_array_internal.$(OBJEXT) \
+          $(OUTPRE)cci_cred_union.$(OBJEXT) \
+          $(OUTPRE)cci_debugging.$(OBJEXT) \
+          $(OUTPRE)cci_identifier.$(OBJEXT) \
+          $(OUTPRE)cci_message.$(OBJEXT) \
+          $(OUTPRE)cci_os_debugging.$(OBJEXT) \
+          $(OUTPRE)cci_os_identifier.$(OBJEXT) \
+          $(OUTPRE)ccs_array.$(OBJEXT) \
+          $(OUTPRE)ccs_cache_collection.$(OBJEXT) \
+          $(OUTPRE)ccs_callback.$(OBJEXT) \
+          $(OUTPRE)ccs_ccache.$(OBJEXT) \
+          $(OUTPRE)ccs_ccache_iterator.$(OBJEXT) \
+          $(OUTPRE)ccs_client.$(OBJEXT) \
+          $(OUTPRE)ccs_credentials.$(OBJEXT) \
+          $(OUTPRE)ccs_credentials_iterator.$(OBJEXT) \
+          $(OUTPRE)ccs_list.$(OBJEXT) \
+          $(OUTPRE)ccs_list_internal.$(OBJEXT) \
+          $(OUTPRE)ccs_lock.$(OBJEXT) \
+          $(OUTPRE)ccs_lock_state.$(OBJEXT) \
+          $(OUTPRE)ccs_os_pipe.$(OBJEXT) \
+          $(OUTPRE)ccs_os_server.$(OBJEXT) \
+          $(OUTPRE)ccs_pipe.$(OBJEXT) \
+          $(OUTPRE)ccs_reply_c.$(OBJEXT) \
+          $(OUTPRE)ccs_request_proc.$(OBJEXT) \
+          $(OUTPRE)ccs_server.$(OBJEXT) \
+          $(OUTPRE)ccs_win_pipe.$(OBJEXT) \
+          $(OUTPRE)ccs_request_s.$(OBJEXT) \
+          $(OUTPRE)ccutils.$(OBJEXT) \
+          $(OUTPRE)init.$(OBJEXT) \
+          $(OUTPRE)opts.$(OBJEXT) \
+          $(OUTPRE)secure.$(OBJEXT) \
+          $(OUTPRE)tls.$(OBJEXT) \
+          $(OUTPRE)util.$(OBJEXT) \
+          $(OUTPRE)win-utils.$(OBJEXT) \
+          $(OUTPRE)WorkItem.$(OBJEXT) \
+          $(OUTPRE)WorkQueue.$(OBJEXT)
+
+##### Options
+
+# Because all the sources are pulled together into the temp directory SRCTMP,
+#  the only includes we need are to directories outside of ccapi.
+LOCALINCLUDES = /I..\$(BUILDTOP) /I..\$(BUILDTOP)\include /I..\$(BUILDTOP)\include\krb5 $(KFWINC) \
+    -I..\$(BUILDTOP)\util\et /I.
+MIDLI  = /I..\$(BUILDTOP)\include
+
+CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \
+-D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS
+
+##### Linker
+LINK   = link
+LIBS   = ..\$(SLIB) rpcrt4.lib advapi32.lib ws2_32.lib user32.lib
+LFLAGS = /nologo $(LOPTS)
+
+
+all:: Makefile copysrc midl $(OUTPRE)ccapiserver.exe finish
+
+ccs_request.h ccs_request_c.c ccs_request_s.c : ccs_request.idl ccs_request.acf
+    midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
+    ccs_request.idl
+
+ccs_reply.h   ccs_reply_c.c   ccs_reply_s.c   : ccs_reply.idl   ccs_reply.acf
+    midl $(MIDL_OPTIMIZATION) $(MIDLI) -oldnames -cpp_cmd $(CC) -cpp_opt "-E" \
+    ccs_reply.idl
+
+copysrc :
+    echo "Copying all sources needed to build ccapiserver.exe to $(SRCTMP)"
+    if NOT exist $(SRCTMP)\nul mkdir $(SRCTMP)
+    xcopy /D/Y   $(CO)\*.*     $(SRCTMP)
+    xcopy /D/Y   $(COWIN)\*.*  $(SRCTMP)
+    xcopy /D/Y   $(CCUTIL)\*.* $(SRCTMP)
+    xcopy /D/Y   $(SRVDIR)\*.* $(SRCTMP)
+    xcopy /D/Y   $(SRVWIN)\*.* $(SRCTMP)
+    cd $(SRCTMP)
+    if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE)
+
+midl : ccs_request.h ccs_reply.h
+
+$(OUTPRE)ccapiserver.exe: $(OBJS)
+       $(LINK) $(LFLAGS) /map:$*.map /out:$@ $(OBJS) $(LIBS) $(conlibsdll) $(conflags)
+
+finish :
+    @echo "Finished building ccapiserver.exe"
+    cd
+
+clean::
+       if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe
+       if exist $(OUTPRE)*.obj del $(OUTPRE)*.obj
+       if exist $(OUTPRE)*.res del $(OUTPRE)*.res
+       if exist $(OUTPRE)*.map del $(OUTPRE)*.map
+       if exist $(OUTPRE)*.pdb del $(OUTPRE)*.pdb
+       if exist *.err del *.err
+    if exist $(SRCTMP) rm -rf $(SRCTMP)
index 64cc7f08c9b962607295a1953df99c04afeab48d..ea1bd455f661c7c1d13e13dc653ec927c464941a 100644 (file)
@@ -1,20 +1,20 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server.vcproj", "{114DCD80-6D13-4AAA-9510-B51CE6D94C1C}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Release|Win32 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Debug|Win32.Build.0 = Debug|Win32\r
-               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Release|Win32.ActiveCfg = Release|Win32\r
-               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Release|Win32.Build.0 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server.vcproj", "{114DCD80-6D13-4AAA-9510-B51CE6D94C1C}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Win32 = Debug|Win32
+               Release|Win32 = Release|Win32
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Debug|Win32.ActiveCfg = Debug|Win32
+               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Debug|Win32.Build.0 = Debug|Win32
+               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Release|Win32.ActiveCfg = Release|Win32
+               {114DCD80-6D13-4AAA-9510-B51CE6D94C1C}.Release|Win32.Build.0 = Release|Win32
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
index 39db361d8e86b0f77869186dc82bc9acdda2349c..626c7a3c789fe0083ec994d10a70b6898df963ce 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="Server"\r
-       ProjectGUID="{114DCD80-6D13-4AAA-9510-B51CE6D94C1C}"\r
-       RootNamespace="Server"\r
-       Keyword="MakeFileProj"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory="Debug"\r
-                       IntermediateDirectory="Debug"\r
-                       ConfigurationType="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCNMakeTool"\r
-                               BuildCommandLine="nmake"\r
-                               ReBuildCommandLine="nmake"\r
-                               CleanCommandLine="nmake clean"\r
-                               Output=""\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;"\r
-                               IncludeSearchPath=""\r
-                               ForcedIncludes=""\r
-                               AssemblySearchPath=""\r
-                               ForcedUsingAssemblies=""\r
-                               CompileAsManaged=""\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory="Release"\r
-                       IntermediateDirectory="Release"\r
-                       ConfigurationType="0"\r
-                       >\r
-                       <Tool\r
-                               Name="VCNMakeTool"\r
-                               BuildCommandLine="nmake"\r
-                               ReBuildCommandLine="nmake"\r
-                               CleanCommandLine="nmake clean"\r
-                               Output=""\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;"\r
-                               IncludeSearchPath=""\r
-                               ForcedIncludes=""\r
-                               AssemblySearchPath=""\r
-                               ForcedUsingAssemblies=""\r
-                               CompileAsManaged=""\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\common\cci_debugging.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\cci_os_debugging.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\cci_stream.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_reply.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_request.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ccs_server.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\ccutils.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\init.hxx"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\..\include\k5-platform.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\secure.hxx"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\util.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\win-utils.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\workitem.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\WorkQueue.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
-                       >\r
-               </Filter>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\..\common\cci_debugging.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\cci_os_debugging.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\cci_stream.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ccs_lock.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_os_pipe.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_os_server.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccs_reply.Idl"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_reply_c.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_reply_s.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccs_request.idl"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_request_c.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_request_proc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\ccs_request_s.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ccs_server.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\ccutils.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\init.cxx"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\secure.cxx"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\ccutil\util.cxx"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\..\common\win\win-utils.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\WorkItem.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\WorkQueue.cpp"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <File\r
-                       RelativePath="..\..\common\win\ccs_reply.Acf"\r
-                       >\r
-               </File>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="Server"
+       ProjectGUID="{114DCD80-6D13-4AAA-9510-B51CE6D94C1C}"
+       RootNamespace="Server"
+       Keyword="MakeFileProj"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="Debug"
+                       IntermediateDirectory="Debug"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="nmake"
+                               ReBuildCommandLine="nmake"
+                               CleanCommandLine="nmake clean"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;_DEBUG;"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="Release"
+                       IntermediateDirectory="Release"
+                       ConfigurationType="0"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="nmake"
+                               ReBuildCommandLine="nmake"
+                               CleanCommandLine="nmake clean"
+                               Output=""
+                               PreprocessorDefinitions="WIN32;NDEBUG;"
+                               IncludeSearchPath=""
+                               ForcedIncludes=""
+                               AssemblySearchPath=""
+                               ForcedUsingAssemblies=""
+                               CompileAsManaged=""
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath="..\..\common\cci_debugging.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\cci_os_debugging.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\cci_stream.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_reply.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_request.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ccs_server.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\ccutils.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\init.hxx"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\include\k5-platform.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\secure.hxx"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\util.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\win-utils.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\workitem.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\WorkQueue.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+               </Filter>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath="..\..\common\cci_debugging.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\cci_os_debugging.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\cci_stream.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ccs_lock.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_os_pipe.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_os_server.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccs_reply.Idl"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_reply_c.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_reply_s.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccs_request.idl"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_request_c.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_request_proc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\ccs_request_s.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ccs_server.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\ccutils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\init.cxx"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\secure.cxx"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\ccutil\util.cxx"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\common\win\win-utils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\WorkItem.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\WorkQueue.cpp"
+                               >
+                       </File>
+               </Filter>
+               <File
+                       RelativePath="..\..\common\win\ccs_reply.Acf"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 1b1725a8aa4dc263abf25be361127f24e19f3e78..22e209de9f89fb2c07bfa820809e6e0d5ba56853 100644 (file)
-/*\r
- * $Header$\r
- *\r
- * Copyright 2008 Massachusetts Institute of Technology.\r
- * All Rights Reserved.\r
- *\r
- * Export of this software from the United States of America may\r
- * require a specific license from the United States Government.\r
- * It is the responsibility of any person or organization contemplating\r
- * export to obtain such a license before exporting.\r
- *\r
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and\r
- * distribute this software and its documentation for any purpose and\r
- * without fee is hereby granted, provided that the above copyright\r
- * notice appear in all copies and that both that copyright notice and\r
- * this permission notice appear in supporting documentation, and that\r
- * the name of M.I.T. not be used in advertising or publicity pertaining\r
- * to distribution of the software without specific, written prior\r
- * permission.  Furthermore if you modify this software you must label\r
- * your software as modified software and not distribute it in such a\r
- * fashion that it might be confused with the original M.I.T. software.\r
- * M.I.T. makes no representations about the suitability of\r
- * this software for any purpose.  It is provided "as is" without express\r
- * or implied warranty.\r
- */\r
-\r
-#include <string.h>\r
-#include "assert.h"\r
-\r
-#pragma warning (disable : 4996)\r
-\r
-#include "win-utils.h"\r
-#include "WorkItem.h"\r
-\r
-extern "C" {\r
-#include "cci_debugging.h"\r
-    }\r
-\r
-// CountedBuffer makes a copy of the data.  Each CountedBuffer must be deleted.\r
-\r
-void deleteBuffer(char** buf) {\r
-    if (*buf) {\r
-        delete [](*buf);\r
-        *buf = NULL;\r
-        }\r
-    }\r
-\r
-// WorkItem contains a CountedBuffer which must be deleted, \r
-//  so each WorkItem must be deleted.\r
-WorkItem::WorkItem(k5_ipc_stream buf, WIN_PIPE* pipe, const long type, const long sst) \r
-: _buf(buf), _rpcmsg(type), _pipe(pipe), _sst(sst) { }\r
-\r
-WorkItem::WorkItem(const WorkItem& item) : _buf(NULL), _rpcmsg(0), _pipe(NULL), _sst(0) {\r
-\r
-    k5_ipc_stream    _buf = NULL;\r
-    krb5int_ipc_stream_new(&_buf);\r
-    krb5int_ipc_stream_write(_buf, \r
-                     krb5int_ipc_stream_data(item.payload()),\r
-                     krb5int_ipc_stream_size(item.payload()) );\r
-    WorkItem(_buf, item._pipe, item._rpcmsg, item._sst);\r
-    }\r
-\r
-WorkItem::WorkItem() : _buf(NULL), _rpcmsg(CCMSG_INVALID), _pipe(NULL), _sst(0) { }\r
-\r
-WorkItem::~WorkItem() {\r
-    if (_buf)   krb5int_ipc_stream_release(_buf);\r
-    if (_pipe)  ccs_win_pipe_release(_pipe);\r
-    }\r
-\r
-const k5_ipc_stream WorkItem::take_payload() {\r
-    k5_ipc_stream temp  = payload();\r
-    _buf                = NULL;\r
-    return temp;\r
-    }\r
-\r
-WIN_PIPE* WorkItem::take_pipe() {\r
-    WIN_PIPE* temp  = pipe();\r
-    _pipe           = NULL;\r
-    return temp;\r
-    }\r
-\r
-WorkList::WorkList() {\r
-    assert(InitializeCriticalSectionAndSpinCount(&cs, 0x80000400));\r
-    }\r
-\r
-WorkList::~WorkList() {\r
-    // Delete any WorkItems in the queue:\r
-    WorkItem*   item;\r
-    cci_debug_printf("%s", __FUNCTION__);\r
-    char        buf[2048];\r
-    char*       pbuf        = (char*)buf;\r
-    while (remove(&item)) {\r
-        cci_debug_printf("WorkList::~WorkList() deleting %s", item->print(pbuf));\r
-        delete item;\r
-        }\r
-\r
-    DeleteCriticalSection(&cs);\r
-    }\r
-\r
-char* WorkItem::print(char* buf) {\r
-    sprintf(buf, "WorkItem msg#:%d sst:%ld pipe:<%s>/0x%X", _rpcmsg, _sst, \r
-        ccs_win_pipe_getUuid(_pipe), ccs_win_pipe_getHandle(_pipe));\r
-    return buf;\r
-    }\r
-\r
-int WorkList::add(WorkItem* item) {\r
-    EnterCriticalSection(&cs);\r
-        wl.push_front(item);\r
-    LeaveCriticalSection(&cs);\r
-    return 1;\r
-    }\r
-\r
-int WorkList::remove(WorkItem** item) {\r
-    bool    bEmpty;\r
-\r
-    bEmpty = wl.empty() & 1;\r
-\r
-    if (!bEmpty) {\r
-        EnterCriticalSection(&cs);\r
-            *item    = wl.back();\r
-            wl.pop_back();\r
-        LeaveCriticalSection(&cs);\r
-        }\r
-\r
-    return !bEmpty;\r
-    }\r
+/*
+ * $Header$
+ *
+ * Copyright 2008 Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ */
+
+#include <string.h>
+#include "assert.h"
+
+#pragma warning (disable : 4996)
+
+#include "win-utils.h"
+#include "WorkItem.h"
+
+extern "C" {
+#include "cci_debugging.h"
+    }
+
+// CountedBuffer makes a copy of the data.  Each CountedBuffer must be deleted.
+
+void deleteBuffer(char** buf) {
+    if (*buf) {
+        delete [](*buf);
+        *buf = NULL;
+        }
+    }
+
+// WorkItem contains a CountedBuffer which must be deleted,
+//  so each WorkItem must be deleted.
+WorkItem::WorkItem(k5_ipc_stream buf, WIN_PIPE* pipe, const long type, const long sst)
+: _buf(buf), _rpcmsg(type), _pipe(pipe), _sst(sst) { }
+
+WorkItem::WorkItem(const WorkItem& item) : _buf(NULL), _rpcmsg(0), _pipe(NULL), _sst(0) {
+
+    k5_ipc_stream    _buf = NULL;
+    krb5int_ipc_stream_new(&_buf);
+    krb5int_ipc_stream_write(_buf,
+                     krb5int_ipc_stream_data(item.payload()),
+                     krb5int_ipc_stream_size(item.payload()) );
+    WorkItem(_buf, item._pipe, item._rpcmsg, item._sst);
+    }
+
+WorkItem::WorkItem() : _buf(NULL), _rpcmsg(CCMSG_INVALID), _pipe(NULL), _sst(0) { }
+
+WorkItem::~WorkItem() {
+    if (_buf)   krb5int_ipc_stream_release(_buf);
+    if (_pipe)  ccs_win_pipe_release(_pipe);
+    }
+
+const k5_ipc_stream WorkItem::take_payload() {
+    k5_ipc_stream temp  = payload();
+    _buf                = NULL;
+    return temp;
+    }
+
+WIN_PIPE* WorkItem::take_pipe() {
+    WIN_PIPE* temp  = pipe();
+    _pipe           = NULL;
+    return temp;
+    }
+
+WorkList::WorkList() {
+    assert(InitializeCriticalSectionAndSpinCount(&cs, 0x80000400));
+    }
+
+WorkList::~WorkList() {
+    // Delete any WorkItems in the queue:
+    WorkItem*   item;
+    cci_debug_printf("%s", __FUNCTION__);
+    char        buf[2048];
+    char*       pbuf        = (char*)buf;
+    while (remove(&item)) {
+        cci_debug_printf("WorkList::~WorkList() deleting %s", item->print(pbuf));
+        delete item;
+        }
+
+    DeleteCriticalSection(&cs);
+    }
+
+char* WorkItem::print(char* buf) {
+    sprintf(buf, "WorkItem msg#:%d sst:%ld pipe:<%s>/0x%X", _rpcmsg, _sst,
+        ccs_win_pipe_getUuid(_pipe), ccs_win_pipe_getHandle(_pipe));
+    return buf;
+    }
+
+int WorkList::add(WorkItem* item) {
+    EnterCriticalSection(&cs);
+        wl.push_front(item);
+    LeaveCriticalSection(&cs);
+    return 1;
+    }
+
+int WorkList::remove(WorkItem** item) {
+    bool    bEmpty;
+
+    bEmpty = wl.empty() & 1;
+
+    if (!bEmpty) {
+        EnterCriticalSection(&cs);
+            *item    = wl.back();
+            wl.pop_back();
+        LeaveCriticalSection(&cs);
+        }
+
+    return !bEmpty;
+    }
index f16ad117e45f83b0e187d5c0fc822c584c429148..cc12054a10b613674400bbe711ed6d660a211107 100644 (file)
@@ -1,61 +1,61 @@
-/*\r
- * $Header$\r
- *\r
- * Copyright 2008 Massachusetts Institute of Technology.\r
- * All Rights Reserved.\r
- *\r
- * Export of this software from the United States of America may\r
- * require a specific license from the United States Government.\r
- * It is the responsibility of any person or organization contemplating\r
- * export to obtain such a license before exporting.\r
- *\r
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and\r
- * distribute this software and its documentation for any purpose and\r
- * without fee is hereby granted, provided that the above copyright\r
- * notice appear in all copies and that both that copyright notice and\r
- * this permission notice appear in supporting documentation, and that\r
- * the name of M.I.T. not be used in advertising or publicity pertaining\r
- * to distribution of the software without specific, written prior\r
- * permission.  Furthermore if you modify this software you must label\r
- * your software as modified software and not distribute it in such a\r
- * fashion that it might be confused with the original M.I.T. software.\r
- * M.I.T. makes no representations about the suitability of\r
- * this software for any purpose.  It is provided "as is" without express\r
- * or implied warranty.\r
- */\r
-\r
-extern "C" {\r
-    #include "cci_debugging.h"\r
-    }\r
-\r
-#include "WorkItem.h"\r
-\r
-WorkList    worklist;\r
-\r
-/* C interfaces: */\r
-EXTERN_C    bool worklist_isEmpty() {\r
-        return worklist.isEmpty();\r
-        }\r
-\r
-EXTERN_C    int worklist_add(   const long          rpcmsg, \r
-                                const ccs_pipe_t    pipe, \r
-                                const k5_ipc_stream stream, \r
-                                const time_t        serverStartTime) {\r
-        return worklist.add(new WorkItem(stream, pipe, rpcmsg, serverStartTime) );\r
-        }\r
-\r
-EXTERN_C    int  worklist_remove(long*              rpcmsg,\r
-                                 ccs_pipe_t*        pipe,\r
-                                 k5_ipc_stream*      stream,\r
-                                 time_t*            sst) {\r
-        WorkItem*   item    = NULL;\r
-        cc_int32    err     = worklist.remove(&item);\r
-\r
-        *rpcmsg         = item->type();\r
-        *pipe           = item->take_pipe();\r
-        *stream         = item->take_payload();\r
-        *sst            = item->sst();\r
-        delete item;\r
-        return err;\r
-        }\r
-\r
+/*
+ * $Header$
+ *
+ * Copyright 2008 Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ */
+
+extern "C" {
+    #include "cci_debugging.h"
+    }
+
+#include "WorkItem.h"
+
+WorkList    worklist;
+
+/* C interfaces: */
+EXTERN_C    bool worklist_isEmpty() {
+        return worklist.isEmpty();
+        }
+
+EXTERN_C    int worklist_add(   const long          rpcmsg,
+                                const ccs_pipe_t    pipe,
+                                const k5_ipc_stream stream,
+                                const time_t        serverStartTime) {
+        return worklist.add(new WorkItem(stream, pipe, rpcmsg, serverStartTime) );
+        }
+
+EXTERN_C    int  worklist_remove(long*              rpcmsg,
+                                 ccs_pipe_t*        pipe,
+                                 k5_ipc_stream*      stream,
+                                 time_t*            sst) {
+        WorkItem*   item    = NULL;
+        cc_int32    err     = worklist.remove(&item);
+
+        *rpcmsg         = item->type();
+        *pipe           = item->take_pipe();
+        *stream         = item->take_payload();
+        *sst            = item->sst();
+        delete item;
+        return err;
+        }
+
index b22fdfa9b9b00ba6ff919508cdc6cebaa719c3e7..e0695876d6a2257a0cc0cf7b79939769209a1c2c 100644 (file)
-/*\r
- * $Header$\r
- *\r
- * Copyright 2008 Massachusetts Institute of Technology.\r
- * All Rights Reserved.\r
- *\r
- * Export of this software from the United States of America may\r
- * require a specific license from the United States Government.\r
- * It is the responsibility of any person or organization contemplating\r
- * export to obtain such a license before exporting.\r
- *\r
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and\r
- * distribute this software and its documentation for any purpose and\r
- * without fee is hereby granted, provided that the above copyright\r
- * notice appear in all copies and that both that copyright notice and\r
- * this permission notice appear in supporting documentation, and that\r
- * the name of M.I.T. not be used in advertising or publicity pertaining\r
- * to distribution of the software without specific, written prior\r
- * permission.  Furthermore if you modify this software you must label\r
- * your software as modified software and not distribute it in such a\r
- * fashion that it might be confused with the original M.I.T. software.\r
- * M.I.T. makes no representations about the suitability of\r
- * this software for any purpose.  It is provided "as is" without express\r
- * or implied warranty.\r
- */\r
-\r
-#include "process.h"\r
-#include "windows.h" \r
-\r
-extern "C" {\r
-#include "ccs_common.h"\r
-#include "ccs_os_notify.h"\r
-#include "ccs_os_server.h"\r
-#include "ccs_reply.h"\r
-#include "ccs_request.h"\r
-#include "win-utils.h"\r
-#include "ccutils.h"\r
-    }\r
-\r
-#include "WorkQueue.h"\r
-#include "util.h"\r
-#include "opts.hxx"\r
-#include "init.hxx"\r
-\r
-#pragma warning (disable : 4996)\r
-\r
-BOOL                bListen             = TRUE; /* Why aren't bool and true defined? */\r
-const char*         sessID              = NULL; /* The logon session we are running on behalf of. */\r
-time_t              _sst                = 0;\r
-unsigned char*      pszNetworkAddress   = NULL;\r
-unsigned char*      pszStringBinding    = NULL;\r
-BOOL                bRpcHandleInited    = FALSE; \r
-_RPC_ASYNC_STATE*    rpcState            = NULL;\r
-\r
-/* Thread procedures can take only one void* argument.  We put all the args we want \r
-   to pass into this struct and then pass a pointer to the struct: */\r
-struct RpcRcvArgs {\r
-    char*               networkAddress;\r
-    unsigned char*      protocolSequence;\r
-    unsigned char*      sessID;                     /* Used for this server's endpoint */\r
-    unsigned char*      uuid;                       /* Used for client's UUID */\r
-    ParseOpts::Opts*    opts;\r
-    RPC_STATUS          status;\r
-    } rpcargs = {   NULL,                       /* pszNetworkAddress    */\r
-                    (unsigned char*)"ncalrpc",  /* pszProtocolSequence  */\r
-                    NULL,                       /* sessID placeholder   */\r
-                    NULL,                       /* uuid   placeholder   */\r
-                    NULL };                     /* Opts placeholder     */\r
-\r
-/* Command line format:\r
-   argv[0] Program name\r
-   argv[1] session ID to use\r
-   argv[2] "D" Debug: go into infinite loop in ccs_os_server_initialize so process \r
-           can be attached in debugger.\r
-           Any other value: continue \r
- */\r
-#define N_FIXED_ARGS 3\r
-#define SERVER_REPLY_RPC_HANDLE ccs_reply_IfHandle\r
-\r
-/* Forward declarations: */\r
-void            receiveLoop(void* rpcargs);\r
-void            connectionListener(void* rpcargs);\r
-void            Usage(const char* argv0);\r
-void            printError(TCHAR* msg);\r
-void            setMySST()      {_sst = time(&_sst);}\r
-time_t          getMySST()      {return _sst;}\r
-RPC_STATUS      send_connection_reply(ccs_pipe_t in_pipe);\r
-void RPC_ENTRY  clientListener( _RPC_ASYNC_STATE*,    \r
-                                void* Context,\r
-                                RPC_ASYNC_EVENT Event);\r
-RPC_STATUS RPC_ENTRY sec_callback(  IN RPC_IF_ID *Interface,\r
-                                    IN void *Context);\r
-RPC_STATUS      send_init(char* clientUUID);\r
-//DWORD alloc_name(LPSTR* pname, LPSTR postfix);\r
-\r
-\r
-/* The layout of the rest of this module:  \r
-\r
-   The four entrypoints defined in ccs_os_server.h:\r
-      ccs_os_server_initialize\r
-      cc_int32 ccs_os_server_cleanup \r
-      cc_int32 ccs_os_server_listen_loop \r
-      cc_int32 ccs_os_server_send_reply \r
-\r
-   Other routines needed by those four.\r
- */\r
-\r
-/* ------------------------------------------------------------------------ */\r
-\r
-cc_int32 ccs_os_server_initialize (int argc, const char *argv[]) {\r
-    cc_int32        err                 = 0;\r
-    ParseOpts::Opts opts                = { 0 };\r
-    ParseOpts       PO;\r
-    BOOL            bAdjustedShutdown   = FALSE;\r
-    HMODULE         hKernel32           = GetModuleHandle("kernel32");\r
-\r
-    if (!err) {\r
-        sessID = argv[1];\r
-        setMySST();\r
-\r
-        opts.cMinCalls  = 1;\r
-        opts.cMaxCalls  = 20;\r
-        opts.fDontWait  = TRUE;\r
-\r
-#ifdef CCAPI_TEST_OPTIONS\r
-        PO.SetValidOpts("kemnfubc");\r
-#else\r
-        PO.SetValidOpts("kc");\r
-#endif\r
-\r
-        PO.Parse(opts, argc, (char**)argv);\r
-    \r
-//        while(*argv[2] == 'D') {}       /* Hang here to attach process with debugger. */\r
-\r
-        if (hKernel32) {\r
-            typedef BOOL (WINAPI *FP_SetProcessShutdownParameters)(DWORD, DWORD);\r
-            FP_SetProcessShutdownParameters pSetProcessShutdownParameters =\r
-                (FP_SetProcessShutdownParameters)\r
-                GetProcAddress(hKernel32, "SetProcessShutdownParameters");\r
-            if (pSetProcessShutdownParameters) {\r
-                bAdjustedShutdown = pSetProcessShutdownParameters(100, 0);\r
-                }\r
-            }\r
-        cci_debug_printf("%s Shutdown Parameters", \r
-            bAdjustedShutdown ? "Adjusted" : "Did not adjust");\r
-\r
-        err = Init::Initialize();\r
-        }\r
-\r
-//    if (!err) {\r
-//        if (opts.bShutdown) {\r
-//            status = shutdown_server(opts.pszEndpoint);\r
-//            }\r
-//        } \r
-//    else {\r
-//        status = startup_server(opts);\r
-//        }\r
-\r
-    if (err) {\r
-        Init::Cleanup();\r
-        fprintf(    stderr, "An error occured while %s the server (%u)\n", \r
-                    opts.bShutdown ? "shutting down" : "starting/running",\r
-                    err);\r
-        exit(cci_check_error (err));\r
-        }\r
-\r
-    return cci_check_error (err);\r
-    }\r
-\r
-/* ------------------------------------------------------------------------ */\r
-\r
-cc_int32 ccs_os_server_cleanup (int argc, const char *argv[]) {\r
-    cc_int32 err = 0;\r
-    \r
-    cci_debug_printf("%s for user <%s> shutting down.", argv[0], argv[1]);\r
-    \r
-    return cci_check_error (err);\r
-    }\r
-\r
-/* ------------------------------------------------------------------------ */\r
-\r
-/* This function takes work items off the work queue and executes them.\r
- * This is the one and only place where the multi-threaded Windows code\r
- * calls into the single-threaded common code.\r
- *\r
- * The actual 'listening' for requests from clients happens after receiveloop\r
- * establishes the RPC endpoint the clients will connect to and the RPC procedures\r
- * put the work items into the work queue.\r
- */\r
-cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {\r
-    cc_int32        err = 0;\r
-    uintptr_t       threadStatus;\r
-    unsigned int    loopCounter  = 0;\r
-\r
-    ParseOpts::Opts opts         = { 0 };\r
-    ParseOpts       PO;\r
-    \r
-    opts.cMinCalls  = 1;\r
-    opts.cMaxCalls  = 20;\r
-    opts.fDontWait  = TRUE;\r
-\r
-#ifdef CCAPI_TEST_OPTIONS\r
-    PO.SetValidOpts("kemnfubc");\r
-#else\r
-    PO.SetValidOpts("kc");\r
-#endif\r
-    PO.Parse(opts, argc, (char**)argv);\r
-\r
-        \r
-    //++ debug stuff\r
-    #define INFO_BUFFER_SIZE 32767\r
-    TCHAR  infoBuf[INFO_BUFFER_SIZE];\r
-    DWORD  bufCharCount = INFO_BUFFER_SIZE;\r
-    // Get and display the user name. \r
-    bufCharCount = INFO_BUFFER_SIZE;\r
-    if( !GetUserName( infoBuf, &bufCharCount ) )  printError( TEXT("GetUserName") ); \r
-    //--\r
-\r
-    /* Sending the reply from within the request RPC handler doesn't seem to work.\r
-       So we listen for requests in a separate thread and put the requests in a\r
-       queue.  */\r
-    rpcargs.sessID  = (unsigned char*)sessID;\r
-    rpcargs.opts    = &opts;\r
-    threadStatus    = _beginthread(receiveLoop, 0, (void*)&rpcargs);\r
-\r
-    /* We handle the queue entries here.  Work loop: */\r
-    while (TRUE) {\r
-        loopCounter++;\r
-        if (worklist_isEmpty() & 1) {\r
-            SleepEx(1000, TRUE);\r
-            }\r
-        else if (TRUE) {      // Take next WorkItem from the queue:\r
-            k5_ipc_stream    buf             = NULL;\r
-            long            rpcmsg          = CCMSG_INVALID;\r
-            time_t          serverStartTime = 0xDEADDEAD;\r
-            RPC_STATUS      status          = 0;\r
-            char*           uuid            = NULL;\r
-            k5_ipc_stream    stream          = NULL;\r
-            ccs_pipe_t     pipe             = NULL;\r
-            ccs_pipe_t     pipe2            = NULL;\r
-\r
-            if (worklist_remove(&rpcmsg, &pipe, &buf, &serverStartTime)) {\r
-                uuid = ccs_win_pipe_getUuid(pipe);\r
-#if 0\r
-                cci_debug_printf("%s: processing WorkItem msg:%ld pipeUUID:<%s> pipeHandle:0x%X SST:%ld", \r
-                    __FUNCTION__, rpcmsg, uuid, ccs_win_pipe_getHandle(pipe), serverStartTime);\r
-#endif\r
-                if (serverStartTime <= getMySST()) {\r
-                    switch (rpcmsg) {\r
-                        case CCMSG_CONNECT: {\r
-                            cci_debug_printf("  Processing CONNECT");\r
-                            rpcargs.uuid    = (unsigned char*)uuid;\r
-\r
-                            // Even if a disconnect message is received before this code finishes,\r
-                            //  it won't be dequeued and processed until after this code finishes.\r
-                            //  So we can add the client after starting the connection listener.\r
-                            connectionListener((void*)&rpcargs);\r
-                            status  = rpcargs.status;\r
-\r
-                            if (!status) {\r
-                                status = ccs_server_add_client(pipe);\r
-                                }\r
-                            if (!status) {status = send_connection_reply(pipe);}\r
-                            break;\r
-                            }\r
-                        case CCMSG_DISCONNECT: {\r
-                            cci_debug_printf("  Processing DISCONNECT");\r
-                            if (!status) {\r
-                                status = ccs_server_remove_client(pipe);\r
-                                }\r
-                            break;\r
-                            }\r
-                        case CCMSG_REQUEST:\r
-                            cci_debug_printf("  Processing REQUEST");\r
-                            ccs_pipe_copy(&pipe2, pipe);\r
-                            // Dispatch message here, setting both pipes to the client UUID:\r
-                            err = ccs_server_handle_request (pipe, pipe2, buf);\r
-                            break;\r
-                        case CCMSG_PING:\r
-                            cci_debug_printf("  Processing PING");\r
-                            err = krb5int_ipc_stream_new  (&stream);\r
-                            err = krb5int_ipc_stream_write(stream, "This is a test of the emergency broadcasting system", 52);\r
-                            err = ccs_os_server_send_reply(pipe, stream);\r
-                            break;\r
-                        default:\r
-                            cci_debug_printf("Huh?  Received invalid message type %ld from UUID:<%s>", \r
-                                rpcmsg, uuid);\r
-                            break;\r
-                        }\r
-                    if (buf)        krb5int_ipc_stream_release(buf);\r
-                    /* Don't free uuid, which was allocated here.  A pointer to it is in the \r
-                       rpcargs struct which was passed to connectionListener which will be\r
-                       received by ccapi_listen when the client exits.  ccapi_listen needs \r
-                       the uuid to know which client to disconnect.\r
-                     */\r
-                    }\r
-                // Server's start time is different from what the client thinks.  \r
-                // That means the server has rebooted since the client connected.\r
-                else {      \r
-                    cci_debug_printf("Whoops!  Server has rebooted since client established connection.");\r
-                    }\r
-                }\r
-            else {cci_debug_printf("Huh?  Queue not empty but no item to remove.");}\r
-            }\r
-        }\r
-\r
-    return cci_check_error (err);\r
-    }\r
-\r
-/* ------------------------------------------------------------------------ */\r
-\r
-cc_int32 ccs_os_server_send_reply (ccs_pipe_t   in_pipe,\r
-                                   k5_ipc_stream in_reply_stream) {\r
-\r
-    /* ccs_pipe_t in_reply_pipe     is a char* reply endpoint.\r
-       k5_ipc_stream in_reply_stream is the data to be sent.\r
-     */\r
-\r
-    cc_int32    err     = 0;\r
-    char*       uuid    = ccs_win_pipe_getUuid(in_pipe);\r
-    HANDLE      h       = ccs_win_pipe_getHandle(in_pipe);\r
-\r
-    if (!err) {\r
-        err = send_init(uuid);      // Sets RPC handle to be used.\r
-        }\r
-\r
-    if (!err) {\r
-        RpcTryExcept {\r
-            long    status;\r
-            ccs_rpc_request_reply(                  // make call with user message\r
-                CCMSG_REQUEST_REPLY,                /* Message type */\r
-                (unsigned char*)&h,                 /* client's tspdata* */\r
-                (unsigned char*)uuid,\r
-                getMySST(),\r
-                krb5int_ipc_stream_size(in_reply_stream),   /* Length of buffer */\r
-                (const unsigned char*)krb5int_ipc_stream_data(in_reply_stream),   /* Data buffer */\r
-                &status );                          /* Return code */\r
-            }\r
-        RpcExcept(1) {\r
-            cci_check_error(RpcExceptionCode());\r
-            }\r
-        RpcEndExcept\r
-        }\r
-\r
-    /*  The calls to the remote procedures are complete. */\r
-    /*  Free whatever we allocated:                      */\r
-    err = RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);\r
-\r
-    return cci_check_error (err);\r
-    }\r
-\r
-\r
-/* Windows-specific routines: */\r
-\r
-void Usage(const char* argv0) {\r
-    printf("Usage:\n");\r
-    printf("%s [m maxcalls] [n mincalls] [f dontwait] [h|?]]\n", argv0);\r
-    printf("    CCAPI server process.\n");\r
-    printf("    h|? whow usage message. <\n");\r
-    }\r
-\r
-/* ------------------------------------------------------------------------ */\r
-/* The receive thread repeatedly issues RpcServerListen.\r
-   When a message arrives, it is handled in the RPC procedure.  \r
- */\r
-void    receiveLoop(void* rpcargs) {\r
-\r
-    struct RpcRcvArgs*      rcvargs     = (struct RpcRcvArgs*)rpcargs;\r
-    RPC_STATUS              status      = FALSE;\r
-    unsigned char*          pszSecurity = NULL;\r
-    LPSTR                   endpoint    = NULL;\r
-    LPSTR                   event_name  = NULL;\r
-    PSECURITY_DESCRIPTOR    psd         = NULL;\r
-    HANDLE                  hEvent      = 0;\r
-    Init::InitInfo          info;\r
-\r
-    cci_debug_printf("THREAD BEGIN: %s", __FUNCTION__);\r
-\r
-    status = Init::Info(info);\r
-\r
-    /* Build complete RPC endpoint using previous CCAPI implementation: */\r
-    if (!status) {\r
-        if (!rcvargs->opts->pszEndpoint) {\r
-            if (!status) {\r
-                status  = alloc_name(&endpoint,     "ep", isNT());\r
-                }\r
-\r
-            if (!status) {\r
-                status  = alloc_name(&event_name,   "startup", isNT());\r
-                }\r
-\r
-            if (!status) {\r
-                 hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, event_name);\r
-                // We ignore any error opening the event because we do not know who started us.\r
-                //  [Comment paraphrased from previous implementation, whence it was copied.]\r
-                }\r
-            }\r
-        else {\r
-            endpoint = rcvargs->opts->pszEndpoint;\r
-            }\r
-        }\r
-\r
-    cci_debug_printf("%s Registering endpoint %s", __FUNCTION__, endpoint);\r
-\r
-    if (!status && isNT()) {\r
-        status = alloc_own_security_descriptor_NT(&psd);\r
-        }\r
-\r
-    if (!status) {\r
-        status = RpcServerUseProtseqEp(rcvargs->protocolSequence,\r
-                                       rcvargs->opts->cMaxCalls,\r
-                                       (RPC_CSTR)endpoint,\r
-                                       rcvargs->opts->bDontProtect ? 0 : psd);  // SD\r
-        }\r
-\r
-    if (!status) {\r
-        status = RpcServerRegisterAuthInfo(0, // server principal\r
-                                           RPC_C_AUTHN_WINNT,\r
-                                           0,\r
-                                           0);\r
-        }\r
-\r
-    while (bListen && !status) {\r
-        cci_debug_printf("%s is listening ...", __FUNCTION__);\r
-\r
-        if (!info.isNT) {\r
-            status = RpcServerRegisterIf(ccs_request_ServerIfHandle,    // interface \r
-                                         NULL,                          // MgrTypeUuid\r
-                                         NULL);                         // MgrEpv; null means use default\r
-            } \r
-        else {\r
-            status = info.fRpcServerRegisterIfEx(ccs_request_ServerIfHandle,  // interface\r
-                                         NULL,                          // MgrTypeUuid\r
-                                         NULL,                          // MgrEpv; 0 means default\r
-                                         RPC_IF_ALLOW_SECURE_ONLY,\r
-                                         rcvargs->opts->cMaxCalls,\r
-                                         rcvargs->opts->bSecCallback ? \r
-                                         (RPC_IF_CALLBACK_FN*)sec_callback : 0 );\r
-            }\r
-\r
-        if (!status) {\r
-            status = RpcServerListen(rcvargs->opts->cMinCalls,\r
-                                     rcvargs->opts->cMaxCalls,\r
-                                     rcvargs->opts->fDontWait);\r
-            }\r
-\r
-        if (!status) {\r
-            if (rcvargs->opts->fDontWait) {\r
-                if (hEvent) SetEvent(hEvent);   // Ignore any error -- SetEvent is an optimization.\r
-                status = RpcMgmtWaitServerListen();  \r
-                }\r
-            }\r
-        }\r
-\r
-    if (status) {           // Cleanup in case of errors:\r
-        if (hEvent) CloseHandle(hEvent);\r
-        free_alloc_p(&event_name);\r
-        free_alloc_p(&psd);\r
-        if (endpoint && (endpoint != rcvargs->opts->pszEndpoint)) \r
-            free_alloc_p(&endpoint);\r
-        }\r
-\r
-    _endthread();\r
-    }   // End receiveLoop\r
-\r
-\r
-#if 0\r
-\r
-    return status;\r
-}\r
-#endif\r
-\r
-\r
-\r
-/* ------------------------------------------------------------------------ */\r
-/* The connection listener thread waits forever for a call to the CCAPI_CLIENT_<UUID>\r
-   endpoint, ccapi_listen function to complete.  If the call completes or gets an \r
-   RPC exception, it means the client has disappeared.\r
-\r
-   A separate connectionListener is started for each client that has connected to the server.\r
- */\r
-\r
-void    connectionListener(void* rpcargs) {\r
-\r
-    struct RpcRcvArgs*  rcvargs     = (struct RpcRcvArgs*)rpcargs;\r
-    RPC_STATUS          status      = FALSE;\r
-    char*               endpoint;\r
-    unsigned char*      pszOptions  = NULL;\r
-    unsigned char *     pszUuid     = NULL;\r
-\r
-    endpoint    = clientEndpoint((char*)rcvargs->uuid);\r
-    rpcState    = (RPC_ASYNC_STATE*)malloc(sizeof(RPC_ASYNC_STATE));\r
-    status      = RpcAsyncInitializeHandle(rpcState, sizeof(RPC_ASYNC_STATE));\r
-    cci_debug_printf("");\r
-    cci_debug_printf("%s About to LISTEN to <%s>", __FUNCTION__, endpoint);\r
-\r
-    rpcState->UserInfo                  = rcvargs->uuid;\r
-    rpcState->NotificationType          = RpcNotificationTypeApc;\r
-    rpcState->u.APC.NotificationRoutine = clientListener;\r
-    rpcState->u.APC.hThread             = 0;\r
-\r
-    /* [If in use] Free previous binding: */\r
-    if (bRpcHandleInited) {     \r
-        // Free previous binding (could have been used to call ccapi_listen \r
-        //  in a different client thread).\r
-        // Don't check result or update status.\r
-        RpcStringFree(&pszStringBinding);\r
-        RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);\r
-        bRpcHandleInited  = FALSE;\r
-        }\r
-\r
-    /* Set up binding to the client's endpoint: */\r
-    if (!status) {\r
-        status = RpcStringBindingCompose(\r
-                    pszUuid,\r
-                    pszProtocolSequence,\r
-                    pszNetworkAddress,\r
-                    (RPC_CSTR)endpoint,\r
-                    pszOptions,\r
-                    &pszStringBinding);\r
-        }\r
-\r
-    /* Set the binding handle that will be used to bind to the server. */\r
-    if (!status) {\r
-        status = RpcBindingFromStringBinding(pszStringBinding, &SERVER_REPLY_RPC_HANDLE); \r
-        }\r
-    if (!status) {bRpcHandleInited  = TRUE;}\r
-\r
-    RpcTryExcept {\r
-        cci_debug_printf("  Calling remote procedure ccapi_listen");\r
-        ccapi_listen(rpcState, SERVER_REPLY_RPC_HANDLE, CCMSG_LISTEN, &status);\r
-        /* Asynchronous call will return immediately. */\r
-        }\r
-    RpcExcept(1) {\r
-        status = cci_check_error(RpcExceptionCode());\r
-        }\r
-    RpcEndExcept\r
-    \r
-    rcvargs->status = status;\r
-    }   // End connectionListener\r
-\r
-\r
-void RPC_ENTRY clientListener(\r
-    _RPC_ASYNC_STATE* pAsync,\r
-    void* Context,\r
-    RPC_ASYNC_EVENT Event\r
-    ) {\r
-\r
-    ccs_pipe_t pipe = ccs_win_pipe_new((char*)pAsync->UserInfo, NULL);\r
-\r
-    cci_debug_printf("%s(0x%X, ...) async routine for <0x%X:%s>!", \r
-        __FUNCTION__, pAsync, pAsync->UserInfo, pAsync->UserInfo);\r
-\r
-    worklist_add(   CCMSG_DISCONNECT, \r
-                    pipe,\r
-                    NULL,               /* No payload with connect request */\r
-                    (const time_t)0 );  /* No server session number with connect request */\r
-    }\r
-\r
-\r
-void printError( TCHAR* msg ) {\r
-    DWORD eNum;\r
-    TCHAR sysMsg[256];\r
-    TCHAR* p;\r
-\r
-    eNum = GetLastError( );\r
-    FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | \r
-         FORMAT_MESSAGE_IGNORE_INSERTS,\r
-         NULL, eNum,\r
-         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),\r
-         sysMsg, 256, NULL );\r
-\r
-    // Trim the end of the line and terminate it with a null\r
-    p = sysMsg;\r
-    while( ( *p > 31 ) || ( *p == 9 ) )\r
-        ++p;\r
-    do { *p-- = 0; } while( ( p >= sysMsg ) &&\r
-                          ( ( *p == '.' ) || ( *p < 33 ) ) );\r
-\r
-    // Display the message\r
-    cci_debug_printf("%s failed with error %d (%s)", msg, eNum, sysMsg);\r
-    }\r
-\r
-\r
-RPC_STATUS send_init(char* clientUUID) {\r
-    RPC_STATUS      status;\r
-    unsigned char * pszUuid             = NULL;\r
-    unsigned char * pszOptions          = NULL;\r
\r
-    /* Use a convenience function to concatenate the elements of */\r
-    /* the string binding into the proper sequence.              */\r
-    status = RpcStringBindingCompose(pszUuid,\r
-                                     pszProtocolSequence,\r
-                                     pszNetworkAddress,\r
-                                     (unsigned char*)clientEndpoint(clientUUID),\r
-                                     pszOptions,\r
-                                     &pszStringBinding);\r
-    if (status) {return (status);}\r
-\r
-    /* Set the binding handle that will be used to bind to the RPC server [the 'client']. */\r
-    status = RpcBindingFromStringBinding(pszStringBinding, &SERVER_REPLY_RPC_HANDLE);\r
-    return (status);\r
-    }\r
-\r
-RPC_STATUS send_finish() {\r
-    RPC_STATUS  status;\r
-    /* Can't shut down client -- it runs listen function which  */\r
-    /* server uses to detect the client going away.             */              \r
-\r
-    /*  The calls to the remote procedures are complete. */\r
-    /*  Free the string and the binding handle           */\r
-    status = RpcStringFree(&pszStringBinding);  // remote calls done; unbind\r
-    if (status) {return (status);}\r
-\r
-    status = RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);  // remote calls done; unbind\r
-    \r
-    return (status);\r
-    }\r
-\r
-RPC_STATUS send_connection_reply(ccs_pipe_t in_pipe) {\r
-    char*       uuid    = ccs_win_pipe_getUuid  (in_pipe);\r
-    HANDLE      h       = ccs_win_pipe_getHandle(in_pipe);\r
-    RPC_STATUS  status  = send_init(uuid);\r
-\r
-    RpcTryExcept {\r
-        ccs_rpc_connect_reply(      // make call with user message\r
-            CCMSG_CONNECT_REPLY,    /* Message type */\r
-            (unsigned char*)&h,      /* client's tspdata* */\r
-            (unsigned char*)uuid,\r
-            getMySST(),             /* Server's session number = it's start time */\r
-            &status );              /* Return code */\r
-        }\r
-    RpcExcept(1) {\r
-        cci_check_error(RpcExceptionCode());\r
-        }\r
-    RpcEndExcept\r
-\r
-    status  = send_finish();\r
-    return (status);\r
-    }\r
-\r
-#if 0\r
-DWORD alloc_name(LPSTR* pname, LPSTR postfix) {\r
-    DWORD len = strlen(sessID) + 1 + strlen(postfix) + 1;\r
-\r
-    *pname = (LPSTR)malloc(len);\r
-    if (!*pname) return GetLastError();\r
-    _snprintf(*pname, len, "%s.%s", sessID, postfix);\r
-    return 0;\r
-    }\r
-#endif\r
-\r
-RPC_STATUS GetPeerName( RPC_BINDING_HANDLE hClient,\r
-                        LPTSTR pszClientName,\r
-                        int iMaxLen) {\r
-    RPC_STATUS Status          = RPC_S_OK;\r
-    RPC_BINDING_HANDLE hServer = NULL;\r
-    PTBYTE pszStringBinding    = NULL;\r
-    PTBYTE pszClientNetAddr    = NULL;\r
-    PTBYTE pszProtSequence     = NULL;\r
-\r
-    memset(pszClientName, 0, iMaxLen * sizeof(TCHAR));\r
-\r
-    __try {\r
-        // Create a partially bound server handle from the client handle.\r
-        Status = RpcBindingServerFromClient (hClient, &hServer);\r
-        if (Status != RPC_S_OK) __leave;\r
-\r
-        // Get the partially bound server string binding and parse it.\r
-        Status = RpcBindingToStringBinding (hServer,\r
-                                            &pszStringBinding);\r
-        if (Status != RPC_S_OK) __leave;\r
-\r
-        // String binding only contains protocol sequence and client\r
-        // address, and is not currently implemented for named pipes.\r
-        Status = RpcStringBindingParse (pszStringBinding, NULL,\r
-                                        &pszProtSequence, &pszClientNetAddr, \r
-                                        NULL, NULL);\r
-        if (Status != RPC_S_OK)\r
-            __leave;\r
-        int iLen = lstrlen(pszClientName) + 1;\r
-        if (iMaxLen < iLen)\r
-            Status = RPC_S_BUFFER_TOO_SMALL;\r
-        lstrcpyn(pszClientName, (LPCTSTR)pszClientNetAddr, iMaxLen);\r
-    }\r
-    __finally {\r
-        if (pszProtSequence)\r
-            RpcStringFree (&pszProtSequence);\r
-        \r
-        if (pszClientNetAddr)\r
-            RpcStringFree (&pszClientNetAddr);\r
-        \r
-        if (pszStringBinding)\r
-            RpcStringFree (&pszStringBinding);\r
-        \r
-        if (hServer)\r
-            RpcBindingFree (&hServer);\r
-    }\r
-    return Status;\r
-}\r
-\r
-struct client_auth_info {\r
-    RPC_AUTHZ_HANDLE authz_handle;\r
-    unsigned char* server_principal; // need to RpcFreeString this\r
-    ULONG authn_level;\r
-    ULONG authn_svc;\r
-    ULONG authz_svc;\r
-};\r
-\r
-RPC_STATUS\r
-GetClientId(\r
-    RPC_BINDING_HANDLE hClient,\r
-    char* client_id,\r
-    int max_len,\r
-    client_auth_info* info\r
-    )\r
-{\r
-    RPC_AUTHZ_HANDLE authz_handle = 0;\r
-    unsigned char* server_principal = 0;\r
-    ULONG authn_level = 0;\r
-    ULONG authn_svc = 0;\r
-    ULONG authz_svc = 0;\r
-    RPC_STATUS status = 0;\r
-\r
-    memset(client_id, 0, max_len);\r
-\r
-    if (info) {\r
-        memset(info, 0, sizeof(client_auth_info));\r
-    }\r
-\r
-    status = RpcBindingInqAuthClient(hClient, &authz_handle, \r
-                                     info ? &server_principal : 0, \r
-                                     &authn_level, &authn_svc, &authz_svc);\r
-    if (status == RPC_S_OK)\r
-    {\r
-        if (info) {\r
-            info->server_principal = server_principal;\r
-            info->authz_handle = authz_handle;\r
-            info->authn_level = authn_level;\r
-            info->authn_svc = authn_svc;\r
-            info->authz_svc = authz_svc;\r
-        }\r
-\r
-        if (authn_svc == RPC_C_AUTHN_WINNT) {\r
-            WCHAR* username = (WCHAR*)authz_handle;\r
-            int len = lstrlenW(username) + 1;\r
-            if (max_len < len)\r
-                status = RPC_S_BUFFER_TOO_SMALL;\r
-            _snprintf(client_id, max_len, "%S", username);\r
-        } else {\r
-            status = RPC_S_UNKNOWN_AUTHN_SERVICE;\r
-        }\r
-    }\r
-    return status;\r
-}\r
-\r
-char*\r
-rpc_error_to_string(\r
-    RPC_STATUS status\r
-    )\r
-{\r
-    switch(status) {\r
-    case RPC_S_OK:\r
-        return "OK";\r
-    case RPC_S_INVALID_BINDING:\r
-        return "Invalid binding";\r
-    case RPC_S_WRONG_KIND_OF_BINDING:\r
-        return "Wrong binding";\r
-    case RPC_S_BINDING_HAS_NO_AUTH:\r
-        RpcRaiseException(RPC_S_BINDING_HAS_NO_AUTH);\r
-        return "Binding has no auth";\r
-    default:\r
-        return "BUG: I am confused";\r
-    }\r
-}\r
-\r
-void\r
-print_client_info(\r
-    RPC_STATUS peer_status,\r
-    const char* peer_name,\r
-    RPC_STATUS client_status,\r
-    const char* client_id,\r
-    client_auth_info* info\r
-    )\r
-{\r
-    if (peer_status == RPC_S_OK || peer_status == RPC_S_BUFFER_TOO_SMALL) {\r
-        cci_debug_printf("%s Peer Name is \"%s\"", __FUNCTION__, peer_name);\r
-    } else {\r
-        cci_debug_printf("%s Error %u getting Peer Name (%s)",\r
-                     __FUNCTION__, peer_status, rpc_error_to_string(peer_status));\r
-    }\r
-\r
-    if (client_status == RPC_S_OK || client_status == RPC_S_BUFFER_TOO_SMALL) {\r
-        if (info) {\r
-            cci_debug_printf("%s Client Auth Info"\r
-                         "\tServer Principal:       %s\n"\r
-                         "\tAuthentication Level:   %d\n"\r
-                         "\tAuthentication Service: %d\n"\r
-                         "\tAuthorization Service:  %d\n",\r
-                         __FUNCTION__, \r
-                         info->server_principal,\r
-                         info->authn_level,\r
-                         info->authn_svc,\r
-                         info->authz_svc);\r
-        }\r
-        cci_debug_printf("%s Client ID is \"%s\"", __FUNCTION__, client_id);\r
-    } else {\r
-        cci_debug_printf("%s Error getting Client Info (%u = %s)", \r
-                     __FUNCTION__, client_status, rpc_error_to_string(client_status));\r
-    }\r
-}\r
-\r
-DWORD sid_check() {\r
-    DWORD status = 0;\r
-    HANDLE hToken_c = 0;\r
-    HANDLE hToken_s = 0;\r
-    PTOKEN_USER ptu_c = 0;\r
-    PTOKEN_USER ptu_s = 0;\r
-    DWORD len = 0;\r
-    BOOL bImpersonate = FALSE;\r
-\r
-    // Note GetUserName will fail while impersonating at identify\r
-    // level.  The workaround is to impersonate, OpenThreadToken,\r
-    // revert, call GetTokenInformation, and finally, call\r
-    // LookupAccountSid.\r
-\r
-    // XXX - Note: This workaround does not appear to work.\r
-    // OpenThreadToken fails with error 1346: "Either a requid\r
-    // impersonation level was not provided or the provided\r
-    // impersonation level is invalid".\r
-\r
-    status = RpcImpersonateClient(0);\r
-\r
-    if (!status) {\r
-        bImpersonate = TRUE;\r
-        if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken_c))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        status = RpcRevertToSelf();\r
-        }\r
-\r
-    if (!status) {\r
-        bImpersonate = FALSE;\r
-\r
-        len = 0;\r
-        GetTokenInformation(hToken_c, TokenUser, ptu_c, 0, &len);\r
-        if (len == 0) status = 1;\r
-        }\r
-\r
-    if (!status) {\r
-        if (!(ptu_c = (PTOKEN_USER)LocalAlloc(0, len)))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        if (!GetTokenInformation(hToken_c, TokenUser, ptu_c, len, &len))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken_s))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        len = 0;\r
-        GetTokenInformation(hToken_s, TokenUser, ptu_s, 0, &len);\r
-        if (len == 0) status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        if (!(ptu_s = (PTOKEN_USER)LocalAlloc(0, len)))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!status) {\r
-        if (!GetTokenInformation(hToken_s, TokenUser, ptu_s, len, &len))\r
-            status = GetLastError();\r
-        }\r
-\r
-    if (!EqualSid(ptu_s->User.Sid, ptu_c->User.Sid))\r
-        status = RPC_S_ACCESS_DENIED;\r
-\r
-/* Cleanup: */\r
-    if (!hToken_c && !bImpersonate)\r
-        cci_debug_printf("%s Cannot impersonate (%u)", __FUNCTION__, status);\r
-    else if (!hToken_c)\r
-        cci_debug_printf("%s Failed to open client token (%u)", __FUNCTION__, status);\r
-    else if (bImpersonate)\r
-        cci_debug_printf("%s Failed to revert (%u)", __FUNCTION__, status);\r
-    else if (!ptu_c)\r
-        cci_debug_printf("%s Failed to get client token user info (%u)",\r
-                     __FUNCTION__, status);\r
-    else if (!hToken_s)\r
-        cci_debug_printf("%s Failed to open server token (%u)", __FUNCTION__, status);\r
-    else if (!ptu_s)\r
-        cci_debug_printf("%s Failed to get server token user info (%u)",\r
-                     __FUNCTION__, status);\r
-    else if (status == RPC_S_ACCESS_DENIED)\r
-        cci_debug_printf("%s SID **does not** match!", __FUNCTION__);\r
-    else if (status == RPC_S_OK)\r
-        cci_debug_printf("%s SID matches!", __FUNCTION__);\r
-    else \r
-        if (status) {\r
-            cci_debug_printf("%s unrecognized error %u", __FUNCTION__, status);\r
-            abort();\r
-            }\r
-\r
-    if (bImpersonate)   RpcRevertToSelf();\r
-    if (hToken_c && hToken_c != INVALID_HANDLE_VALUE)\r
-        CloseHandle(hToken_c);\r
-    if (ptu_c)          LocalFree(ptu_c);\r
-    if (hToken_s && hToken_s != INVALID_HANDLE_VALUE)\r
-        CloseHandle(hToken_s);\r
-    if (ptu_s)          LocalFree(ptu_s);\r
-    if (status) cci_debug_printf("%s returning %u", __FUNCTION__, status);\r
-    return status;\r
-    }\r
-\r
-RPC_STATUS RPC_ENTRY sec_callback(  IN RPC_IF_ID *Interface,\r
-                                    IN void *Context) {\r
-    char peer_name[1024];\r
-    char client_name[1024];\r
-    RPC_STATUS peer_status;\r
-    RPC_STATUS client_status;\r
-\r
-    cci_debug_printf("%s", __FUNCTION__);\r
-    peer_status = GetPeerName(Context, peer_name, sizeof(peer_name));\r
-    client_status = GetClientId(Context, client_name, sizeof(client_name), 0);\r
-    print_client_info(peer_status, peer_name, client_status, client_name, 0);\r
-    DWORD sid_status = sid_check();\r
-    cci_debug_printf("%s returning (%u)", __FUNCTION__, sid_status);\r
-    return sid_status;\r
-    }\r
-\r
-\r
-\r
-/*********************************************************************/\r
-/*                 MIDL allocate and free                            */\r
-/*********************************************************************/\r
-\r
-extern "C" void  __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) {\r
-    return(malloc(len));\r
-    }\r
-\r
-extern "C" void __RPC_USER midl_user_free(void __RPC_FAR * ptr) {\r
-    free(ptr);\r
-    }\r
-\r
-/* stubs */\r
-extern "C" cc_int32\r
-ccs_os_notify_cache_collection_changed (ccs_cache_collection_t cc)\r
-{\r
-    return 0;\r
-}\r
-\r
-extern "C" cc_int32\r
-ccs_os_notify_ccache_changed (ccs_cache_collection_t cc, const char *name)\r
-{\r
-    return 0;\r
-}\r
+/*
+ * $Header$
+ *
+ * Copyright 2008 Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose.  It is provided "as is" without express
+ * or implied warranty.
+ */
+
+#include "process.h"
+#include "windows.h"
+
+extern "C" {
+#include "ccs_common.h"
+#include "ccs_os_notify.h"
+#include "ccs_os_server.h"
+#include "ccs_reply.h"
+#include "ccs_request.h"
+#include "win-utils.h"
+#include "ccutils.h"
+    }
+
+#include "WorkQueue.h"
+#include "util.h"
+#include "opts.hxx"
+#include "init.hxx"
+
+#pragma warning (disable : 4996)
+
+BOOL                bListen             = TRUE; /* Why aren't bool and true defined? */
+const char*         sessID              = NULL; /* The logon session we are running on behalf of. */
+time_t              _sst                = 0;
+unsigned char*      pszNetworkAddress   = NULL;
+unsigned char*      pszStringBinding    = NULL;
+BOOL                bRpcHandleInited    = FALSE;
+_RPC_ASYNC_STATE*    rpcState            = NULL;
+
+/* Thread procedures can take only one void* argument.  We put all the args we want
+   to pass into this struct and then pass a pointer to the struct: */
+struct RpcRcvArgs {
+    char*               networkAddress;
+    unsigned char*      protocolSequence;
+    unsigned char*      sessID;                     /* Used for this server's endpoint */
+    unsigned char*      uuid;                       /* Used for client's UUID */
+    ParseOpts::Opts*    opts;
+    RPC_STATUS          status;
+    } rpcargs = {   NULL,                       /* pszNetworkAddress    */
+                    (unsigned char*)"ncalrpc",  /* pszProtocolSequence  */
+                    NULL,                       /* sessID placeholder   */
+                    NULL,                       /* uuid   placeholder   */
+                    NULL };                     /* Opts placeholder     */
+
+/* Command line format:
+   argv[0] Program name
+   argv[1] session ID to use
+   argv[2] "D" Debug: go into infinite loop in ccs_os_server_initialize so process
+           can be attached in debugger.
+           Any other value: continue
+ */
+#define N_FIXED_ARGS 3
+#define SERVER_REPLY_RPC_HANDLE ccs_reply_IfHandle
+
+/* Forward declarations: */
+void            receiveLoop(void* rpcargs);
+void            connectionListener(void* rpcargs);
+void            Usage(const char* argv0);
+void            printError(TCHAR* msg);
+void            setMySST()      {_sst = time(&_sst);}
+time_t          getMySST()      {return _sst;}
+RPC_STATUS      send_connection_reply(ccs_pipe_t in_pipe);
+void RPC_ENTRY  clientListener( _RPC_ASYNC_STATE*,
+                                void* Context,
+                                RPC_ASYNC_EVENT Event);
+RPC_STATUS RPC_ENTRY sec_callback(  IN RPC_IF_ID *Interface,
+                                    IN void *Context);
+RPC_STATUS      send_init(char* clientUUID);
+//DWORD alloc_name(LPSTR* pname, LPSTR postfix);
+
+
+/* The layout of the rest of this module:
+
+   The four entrypoints defined in ccs_os_server.h:
+      ccs_os_server_initialize
+      cc_int32 ccs_os_server_cleanup
+      cc_int32 ccs_os_server_listen_loop
+      cc_int32 ccs_os_server_send_reply
+
+   Other routines needed by those four.
+ */
+
+/* ------------------------------------------------------------------------ */
+
+cc_int32 ccs_os_server_initialize (int argc, const char *argv[]) {
+    cc_int32        err                 = 0;
+    ParseOpts::Opts opts                = { 0 };
+    ParseOpts       PO;
+    BOOL            bAdjustedShutdown   = FALSE;
+    HMODULE         hKernel32           = GetModuleHandle("kernel32");
+
+    if (!err) {
+        sessID = argv[1];
+        setMySST();
+
+        opts.cMinCalls  = 1;
+        opts.cMaxCalls  = 20;
+        opts.fDontWait  = TRUE;
+
+#ifdef CCAPI_TEST_OPTIONS
+        PO.SetValidOpts("kemnfubc");
+#else
+        PO.SetValidOpts("kc");
+#endif
+
+        PO.Parse(opts, argc, (char**)argv);
+
+//        while(*argv[2] == 'D') {}       /* Hang here to attach process with debugger. */
+
+        if (hKernel32) {
+            typedef BOOL (WINAPI *FP_SetProcessShutdownParameters)(DWORD, DWORD);
+            FP_SetProcessShutdownParameters pSetProcessShutdownParameters =
+                (FP_SetProcessShutdownParameters)
+                GetProcAddress(hKernel32, "SetProcessShutdownParameters");
+            if (pSetProcessShutdownParameters) {
+                bAdjustedShutdown = pSetProcessShutdownParameters(100, 0);
+                }
+            }
+        cci_debug_printf("%s Shutdown Parameters",
+            bAdjustedShutdown ? "Adjusted" : "Did not adjust");
+
+        err = Init::Initialize();
+        }
+
+//    if (!err) {
+//        if (opts.bShutdown) {
+//            status = shutdown_server(opts.pszEndpoint);
+//            }
+//        }
+//    else {
+//        status = startup_server(opts);
+//        }
+
+    if (err) {
+        Init::Cleanup();
+        fprintf(    stderr, "An error occured while %s the server (%u)\n",
+                    opts.bShutdown ? "shutting down" : "starting/running",
+                    err);
+        exit(cci_check_error (err));
+        }
+
+    return cci_check_error (err);
+    }
+
+/* ------------------------------------------------------------------------ */
+
+cc_int32 ccs_os_server_cleanup (int argc, const char *argv[]) {
+    cc_int32 err = 0;
+
+    cci_debug_printf("%s for user <%s> shutting down.", argv[0], argv[1]);
+
+    return cci_check_error (err);
+    }
+
+/* ------------------------------------------------------------------------ */
+
+/* This function takes work items off the work queue and executes them.
+ * This is the one and only place where the multi-threaded Windows code
+ * calls into the single-threaded common code.
+ *
+ * The actual 'listening' for requests from clients happens after receiveloop
+ * establishes the RPC endpoint the clients will connect to and the RPC procedures
+ * put the work items into the work queue.
+ */
+cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {
+    cc_int32        err = 0;
+    uintptr_t       threadStatus;
+    unsigned int    loopCounter  = 0;
+
+    ParseOpts::Opts opts         = { 0 };
+    ParseOpts       PO;
+
+    opts.cMinCalls  = 1;
+    opts.cMaxCalls  = 20;
+    opts.fDontWait  = TRUE;
+
+#ifdef CCAPI_TEST_OPTIONS
+    PO.SetValidOpts("kemnfubc");
+#else
+    PO.SetValidOpts("kc");
+#endif
+    PO.Parse(opts, argc, (char**)argv);
+
+
+    //++ debug stuff
+    #define INFO_BUFFER_SIZE 32767
+    TCHAR  infoBuf[INFO_BUFFER_SIZE];
+    DWORD  bufCharCount = INFO_BUFFER_SIZE;
+    // Get and display the user name.
+    bufCharCount = INFO_BUFFER_SIZE;
+    if( !GetUserName( infoBuf, &bufCharCount ) )  printError( TEXT("GetUserName") );
+    //--
+
+    /* Sending the reply from within the request RPC handler doesn't seem to work.
+       So we listen for requests in a separate thread and put the requests in a
+       queue.  */
+    rpcargs.sessID  = (unsigned char*)sessID;
+    rpcargs.opts    = &opts;
+    threadStatus    = _beginthread(receiveLoop, 0, (void*)&rpcargs);
+
+    /* We handle the queue entries here.  Work loop: */
+    while (TRUE) {
+        loopCounter++;
+        if (worklist_isEmpty() & 1) {
+            SleepEx(1000, TRUE);
+            }
+        else if (TRUE) {      // Take next WorkItem from the queue:
+            k5_ipc_stream    buf             = NULL;
+            long            rpcmsg          = CCMSG_INVALID;
+            time_t          serverStartTime = 0xDEADDEAD;
+            RPC_STATUS      status          = 0;
+            char*           uuid            = NULL;
+            k5_ipc_stream    stream          = NULL;
+            ccs_pipe_t     pipe             = NULL;
+            ccs_pipe_t     pipe2            = NULL;
+
+            if (worklist_remove(&rpcmsg, &pipe, &buf, &serverStartTime)) {
+                uuid = ccs_win_pipe_getUuid(pipe);
+#if 0
+                cci_debug_printf("%s: processing WorkItem msg:%ld pipeUUID:<%s> pipeHandle:0x%X SST:%ld",
+                    __FUNCTION__, rpcmsg, uuid, ccs_win_pipe_getHandle(pipe), serverStartTime);
+#endif
+                if (serverStartTime <= getMySST()) {
+                    switch (rpcmsg) {
+                        case CCMSG_CONNECT: {
+                            cci_debug_printf("  Processing CONNECT");
+                            rpcargs.uuid    = (unsigned char*)uuid;
+
+                            // Even if a disconnect message is received before this code finishes,
+                            //  it won't be dequeued and processed until after this code finishes.
+                            //  So we can add the client after starting the connection listener.
+                            connectionListener((void*)&rpcargs);
+                            status  = rpcargs.status;
+
+                            if (!status) {
+                                status = ccs_server_add_client(pipe);
+                                }
+                            if (!status) {status = send_connection_reply(pipe);}
+                            break;
+                            }
+                        case CCMSG_DISCONNECT: {
+                            cci_debug_printf("  Processing DISCONNECT");
+                            if (!status) {
+                                status = ccs_server_remove_client(pipe);
+                                }
+                            break;
+                            }
+                        case CCMSG_REQUEST:
+                            cci_debug_printf("  Processing REQUEST");
+                            ccs_pipe_copy(&pipe2, pipe);
+                            // Dispatch message here, setting both pipes to the client UUID:
+                            err = ccs_server_handle_request (pipe, pipe2, buf);
+                            break;
+                        case CCMSG_PING:
+                            cci_debug_printf("  Processing PING");
+                            err = krb5int_ipc_stream_new  (&stream);
+                            err = krb5int_ipc_stream_write(stream, "This is a test of the emergency broadcasting system", 52);
+                            err = ccs_os_server_send_reply(pipe, stream);
+                            break;
+                        default:
+                            cci_debug_printf("Huh?  Received invalid message type %ld from UUID:<%s>",
+                                rpcmsg, uuid);
+                            break;
+                        }
+                    if (buf)        krb5int_ipc_stream_release(buf);
+                    /* Don't free uuid, which was allocated here.  A pointer to it is in the
+                       rpcargs struct which was passed to connectionListener which will be
+                       received by ccapi_listen when the client exits.  ccapi_listen needs
+                       the uuid to know which client to disconnect.
+                     */
+                    }
+                // Server's start time is different from what the client thinks.
+                // That means the server has rebooted since the client connected.
+                else {
+                    cci_debug_printf("Whoops!  Server has rebooted since client established connection.");
+                    }
+                }
+            else {cci_debug_printf("Huh?  Queue not empty but no item to remove.");}
+            }
+        }
+
+    return cci_check_error (err);
+    }
+
+/* ------------------------------------------------------------------------ */
+
+cc_int32 ccs_os_server_send_reply (ccs_pipe_t   in_pipe,
+                                   k5_ipc_stream in_reply_stream) {
+
+    /* ccs_pipe_t in_reply_pipe     is a char* reply endpoint.
+       k5_ipc_stream in_reply_stream is the data to be sent.
+     */
+
+    cc_int32    err     = 0;
+    char*       uuid    = ccs_win_pipe_getUuid(in_pipe);
+    HANDLE      h       = ccs_win_pipe_getHandle(in_pipe);
+
+    if (!err) {
+        err = send_init(uuid);      // Sets RPC handle to be used.
+        }
+
+    if (!err) {
+        RpcTryExcept {
+            long    status;
+            ccs_rpc_request_reply(                  // make call with user message
+                CCMSG_REQUEST_REPLY,                /* Message type */
+                (unsigned char*)&h,                 /* client's tspdata* */
+                (unsigned char*)uuid,
+                getMySST(),
+                krb5int_ipc_stream_size(in_reply_stream),   /* Length of buffer */
+                (const unsigned char*)krb5int_ipc_stream_data(in_reply_stream),   /* Data buffer */
+                &status );                          /* Return code */
+            }
+        RpcExcept(1) {
+            cci_check_error(RpcExceptionCode());
+            }
+        RpcEndExcept
+        }
+
+    /*  The calls to the remote procedures are complete. */
+    /*  Free whatever we allocated:                      */
+    err = RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);
+
+    return cci_check_error (err);
+    }
+
+
+/* Windows-specific routines: */
+
+void Usage(const char* argv0) {
+    printf("Usage:\n");
+    printf("%s [m maxcalls] [n mincalls] [f dontwait] [h|?]]\n", argv0);
+    printf("    CCAPI server process.\n");
+    printf("    h|? whow usage message. <\n");
+    }
+
+/* ------------------------------------------------------------------------ */
+/* The receive thread repeatedly issues RpcServerListen.
+   When a message arrives, it is handled in the RPC procedure.
+ */
+void    receiveLoop(void* rpcargs) {
+
+    struct RpcRcvArgs*      rcvargs     = (struct RpcRcvArgs*)rpcargs;
+    RPC_STATUS              status      = FALSE;
+    unsigned char*          pszSecurity = NULL;
+    LPSTR                   endpoint    = NULL;
+    LPSTR                   event_name  = NULL;
+    PSECURITY_DESCRIPTOR    psd         = NULL;
+    HANDLE                  hEvent      = 0;
+    Init::InitInfo          info;
+
+    cci_debug_printf("THREAD BEGIN: %s", __FUNCTION__);
+
+    status = Init::Info(info);
+
+    /* Build complete RPC endpoint using previous CCAPI implementation: */
+    if (!status) {
+        if (!rcvargs->opts->pszEndpoint) {
+            if (!status) {
+                status  = alloc_name(&endpoint,     "ep", isNT());
+                }
+
+            if (!status) {
+                status  = alloc_name(&event_name,   "startup", isNT());
+                }
+
+            if (!status) {
+                 hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, event_name);
+                // We ignore any error opening the event because we do not know who started us.
+                //  [Comment paraphrased from previous implementation, whence it was copied.]
+                }
+            }
+        else {
+            endpoint = rcvargs->opts->pszEndpoint;
+            }
+        }
+
+    cci_debug_printf("%s Registering endpoint %s", __FUNCTION__, endpoint);
+
+    if (!status && isNT()) {
+        status = alloc_own_security_descriptor_NT(&psd);
+        }
+
+    if (!status) {
+        status = RpcServerUseProtseqEp(rcvargs->protocolSequence,
+                                       rcvargs->opts->cMaxCalls,
+                                       (RPC_CSTR)endpoint,
+                                       rcvargs->opts->bDontProtect ? 0 : psd);  // SD
+        }
+
+    if (!status) {
+        status = RpcServerRegisterAuthInfo(0, // server principal
+                                           RPC_C_AUTHN_WINNT,
+                                           0,
+                                           0);
+        }
+
+    while (bListen && !status) {
+        cci_debug_printf("%s is listening ...", __FUNCTION__);
+
+        if (!info.isNT) {
+            status = RpcServerRegisterIf(ccs_request_ServerIfHandle,    // interface
+                                         NULL,                          // MgrTypeUuid
+                                         NULL);                         // MgrEpv; null means use default
+            }
+        else {
+            status = info.fRpcServerRegisterIfEx(ccs_request_ServerIfHandle,  // interface
+                                         NULL,                          // MgrTypeUuid
+                                         NULL,                          // MgrEpv; 0 means default
+                                         RPC_IF_ALLOW_SECURE_ONLY,
+                                         rcvargs->opts->cMaxCalls,
+                                         rcvargs->opts->bSecCallback ?
+                                         (RPC_IF_CALLBACK_FN*)sec_callback : 0 );
+            }
+
+        if (!status) {
+            status = RpcServerListen(rcvargs->opts->cMinCalls,
+                                     rcvargs->opts->cMaxCalls,
+                                     rcvargs->opts->fDontWait);
+            }
+
+        if (!status) {
+            if (rcvargs->opts->fDontWait) {
+                if (hEvent) SetEvent(hEvent);   // Ignore any error -- SetEvent is an optimization.
+                status = RpcMgmtWaitServerListen();
+                }
+            }
+        }
+
+    if (status) {           // Cleanup in case of errors:
+        if (hEvent) CloseHandle(hEvent);
+        free_alloc_p(&event_name);
+        free_alloc_p(&psd);
+        if (endpoint && (endpoint != rcvargs->opts->pszEndpoint))
+            free_alloc_p(&endpoint);
+        }
+
+    _endthread();
+    }   // End receiveLoop
+
+
+#if 0
+
+    return status;
+}
+#endif
+
+
+
+/* ------------------------------------------------------------------------ */
+/* The connection listener thread waits forever for a call to the CCAPI_CLIENT_<UUID>
+   endpoint, ccapi_listen function to complete.  If the call completes or gets an
+   RPC exception, it means the client has disappeared.
+
+   A separate connectionListener is started for each client that has connected to the server.
+ */
+
+void    connectionListener(void* rpcargs) {
+
+    struct RpcRcvArgs*  rcvargs     = (struct RpcRcvArgs*)rpcargs;
+    RPC_STATUS          status      = FALSE;
+    char*               endpoint;
+    unsigned char*      pszOptions  = NULL;
+    unsigned char *     pszUuid     = NULL;
+
+    endpoint    = clientEndpoint((char*)rcvargs->uuid);
+    rpcState    = (RPC_ASYNC_STATE*)malloc(sizeof(RPC_ASYNC_STATE));
+    status      = RpcAsyncInitializeHandle(rpcState, sizeof(RPC_ASYNC_STATE));
+    cci_debug_printf("");
+    cci_debug_printf("%s About to LISTEN to <%s>", __FUNCTION__, endpoint);
+
+    rpcState->UserInfo                  = rcvargs->uuid;
+    rpcState->NotificationType          = RpcNotificationTypeApc;
+    rpcState->u.APC.NotificationRoutine = clientListener;
+    rpcState->u.APC.hThread             = 0;
+
+    /* [If in use] Free previous binding: */
+    if (bRpcHandleInited) {
+        // Free previous binding (could have been used to call ccapi_listen
+        //  in a different client thread).
+        // Don't check result or update status.
+        RpcStringFree(&pszStringBinding);
+        RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);
+        bRpcHandleInited  = FALSE;
+        }
+
+    /* Set up binding to the client's endpoint: */
+    if (!status) {
+        status = RpcStringBindingCompose(
+                    pszUuid,
+                    pszProtocolSequence,
+                    pszNetworkAddress,
+                    (RPC_CSTR)endpoint,
+                    pszOptions,
+                    &pszStringBinding);
+        }
+
+    /* Set the binding handle that will be used to bind to the server. */
+    if (!status) {
+        status = RpcBindingFromStringBinding(pszStringBinding, &SERVER_REPLY_RPC_HANDLE);
+        }
+    if (!status) {bRpcHandleInited  = TRUE;}
+
+    RpcTryExcept {
+        cci_debug_printf("  Calling remote procedure ccapi_listen");
+        ccapi_listen(rpcState, SERVER_REPLY_RPC_HANDLE, CCMSG_LISTEN, &status);
+        /* Asynchronous call will return immediately. */
+        }
+    RpcExcept(1) {
+        status = cci_check_error(RpcExceptionCode());
+        }
+    RpcEndExcept
+
+    rcvargs->status = status;
+    }   // End connectionListener
+
+
+void RPC_ENTRY clientListener(
+    _RPC_ASYNC_STATE* pAsync,
+    void* Context,
+    RPC_ASYNC_EVENT Event
+    ) {
+
+    ccs_pipe_t pipe = ccs_win_pipe_new((char*)pAsync->UserInfo, NULL);
+
+    cci_debug_printf("%s(0x%X, ...) async routine for <0x%X:%s>!",
+        __FUNCTION__, pAsync, pAsync->UserInfo, pAsync->UserInfo);
+
+    worklist_add(   CCMSG_DISCONNECT,
+                    pipe,
+                    NULL,               /* No payload with connect request */
+                    (const time_t)0 );  /* No server session number with connect request */
+    }
+
+
+void printError( TCHAR* msg ) {
+    DWORD eNum;
+    TCHAR sysMsg[256];
+    TCHAR* p;
+
+    eNum = GetLastError( );
+    FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM |
+         FORMAT_MESSAGE_IGNORE_INSERTS,
+         NULL, eNum,
+         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+         sysMsg, 256, NULL );
+
+    // Trim the end of the line and terminate it with a null
+    p = sysMsg;
+    while( ( *p > 31 ) || ( *p == 9 ) )
+        ++p;
+    do { *p-- = 0; } while( ( p >= sysMsg ) &&
+                          ( ( *p == '.' ) || ( *p < 33 ) ) );
+
+    // Display the message
+    cci_debug_printf("%s failed with error %d (%s)", msg, eNum, sysMsg);
+    }
+
+
+RPC_STATUS send_init(char* clientUUID) {
+    RPC_STATUS      status;
+    unsigned char * pszUuid             = NULL;
+    unsigned char * pszOptions          = NULL;
+
+    /* Use a convenience function to concatenate the elements of */
+    /* the string binding into the proper sequence.              */
+    status = RpcStringBindingCompose(pszUuid,
+                                     pszProtocolSequence,
+                                     pszNetworkAddress,
+                                     (unsigned char*)clientEndpoint(clientUUID),
+                                     pszOptions,
+                                     &pszStringBinding);
+    if (status) {return (status);}
+
+    /* Set the binding handle that will be used to bind to the RPC server [the 'client']. */
+    status = RpcBindingFromStringBinding(pszStringBinding, &SERVER_REPLY_RPC_HANDLE);
+    return (status);
+    }
+
+RPC_STATUS send_finish() {
+    RPC_STATUS  status;
+    /* Can't shut down client -- it runs listen function which  */
+    /* server uses to detect the client going away.             */
+
+    /*  The calls to the remote procedures are complete. */
+    /*  Free the string and the binding handle           */
+    status = RpcStringFree(&pszStringBinding);  // remote calls done; unbind
+    if (status) {return (status);}
+
+    status = RpcBindingFree(&SERVER_REPLY_RPC_HANDLE);  // remote calls done; unbind
+
+    return (status);
+    }
+
+RPC_STATUS send_connection_reply(ccs_pipe_t in_pipe) {
+    char*       uuid    = ccs_win_pipe_getUuid  (in_pipe);
+    HANDLE      h       = ccs_win_pipe_getHandle(in_pipe);
+    RPC_STATUS  status  = send_init(uuid);
+
+    RpcTryExcept {
+        ccs_rpc_connect_reply(      // make call with user message
+            CCMSG_CONNECT_REPLY,    /* Message type */
+            (unsigned char*)&h,      /* client's tspdata* */
+            (unsigned char*)uuid,
+            getMySST(),             /* Server's session number = it's start time */
+            &status );              /* Return code */
+        }
+    RpcExcept(1) {
+        cci_check_error(RpcExceptionCode());
+        }
+    RpcEndExcept
+
+    status  = send_finish();
+    return (status);
+    }
+
+#if 0
+DWORD alloc_name(LPSTR* pname, LPSTR postfix) {
+    DWORD len = strlen(sessID) + 1 + strlen(postfix) + 1;
+
+    *pname = (LPSTR)malloc(len);
+    if (!*pname) return GetLastError();
+    _snprintf(*pname, len, "%s.%s", sessID, postfix);
+    return 0;
+    }
+#endif
+
+RPC_STATUS GetPeerName( RPC_BINDING_HANDLE hClient,
+                        LPTSTR pszClientName,
+                        int iMaxLen) {
+    RPC_STATUS Status          = RPC_S_OK;
+    RPC_BINDING_HANDLE hServer = NULL;
+    PTBYTE pszStringBinding    = NULL;
+    PTBYTE pszClientNetAddr    = NULL;
+    PTBYTE pszProtSequence     = NULL;
+
+    memset(pszClientName, 0, iMaxLen * sizeof(TCHAR));
+
+    __try {
+        // Create a partially bound server handle from the client handle.
+        Status = RpcBindingServerFromClient (hClient, &hServer);
+        if (Status != RPC_S_OK) __leave;
+
+        // Get the partially bound server string binding and parse it.
+        Status = RpcBindingToStringBinding (hServer,
+                                            &pszStringBinding);
+        if (Status != RPC_S_OK) __leave;
+
+        // String binding only contains protocol sequence and client
+        // address, and is not currently implemented for named pipes.
+        Status = RpcStringBindingParse (pszStringBinding, NULL,
+                                        &pszProtSequence, &pszClientNetAddr,
+                                        NULL, NULL);
+        if (Status != RPC_S_OK)
+            __leave;
+        int iLen = lstrlen(pszClientName) + 1;
+        if (iMaxLen < iLen)
+            Status = RPC_S_BUFFER_TOO_SMALL;
+        lstrcpyn(pszClientName, (LPCTSTR)pszClientNetAddr, iMaxLen);
+    }
+    __finally {
+        if (pszProtSequence)
+            RpcStringFree (&pszProtSequence);
+
+        if (pszClientNetAddr)
+            RpcStringFree (&pszClientNetAddr);
+
+        if (pszStringBinding)
+            RpcStringFree (&pszStringBinding);
+
+        if (hServer)
+            RpcBindingFree (&hServer);
+    }
+    return Status;
+}
+
+struct client_auth_info {
+    RPC_AUTHZ_HANDLE authz_handle;
+    unsigned char* server_principal; // need to RpcFreeString this
+    ULONG authn_level;
+    ULONG authn_svc;
+    ULONG authz_svc;
+};
+
+RPC_STATUS
+GetClientId(
+    RPC_BINDING_HANDLE hClient,
+    char* client_id,
+    int max_len,
+    client_auth_info* info
+    )
+{
+    RPC_AUTHZ_HANDLE authz_handle = 0;
+    unsigned char* server_principal = 0;
+    ULONG authn_level = 0;
+    ULONG authn_svc = 0;
+    ULONG authz_svc = 0;
+    RPC_STATUS status = 0;
+
+    memset(client_id, 0, max_len);
+
+    if (info) {
+        memset(info, 0, sizeof(client_auth_info));
+    }
+
+    status = RpcBindingInqAuthClient(hClient, &authz_handle,
+                                     info ? &server_principal : 0,
+                                     &authn_level, &authn_svc, &authz_svc);
+    if (status == RPC_S_OK)
+    {
+        if (info) {
+            info->server_principal = server_principal;
+            info->authz_handle = authz_handle;
+            info->authn_level = authn_level;
+            info->authn_svc = authn_svc;
+            info->authz_svc = authz_svc;
+        }
+
+        if (authn_svc == RPC_C_AUTHN_WINNT) {
+            WCHAR* username = (WCHAR*)authz_handle;
+            int len = lstrlenW(username) + 1;
+            if (max_len < len)
+                status = RPC_S_BUFFER_TOO_SMALL;
+            _snprintf(client_id, max_len, "%S", username);
+        } else {
+            status = RPC_S_UNKNOWN_AUTHN_SERVICE;
+        }
+    }
+    return status;
+}
+
+char*
+rpc_error_to_string(
+    RPC_STATUS status
+    )
+{
+    switch(status) {
+    case RPC_S_OK:
+        return "OK";
+    case RPC_S_INVALID_BINDING:
+        return "Invalid binding";
+    case RPC_S_WRONG_KIND_OF_BINDING:
+        return "Wrong binding";
+    case RPC_S_BINDING_HAS_NO_AUTH:
+        RpcRaiseException(RPC_S_BINDING_HAS_NO_AUTH);
+        return "Binding has no auth";
+    default:
+        return "BUG: I am confused";
+    }
+}
+
+void
+print_client_info(
+    RPC_STATUS peer_status,
+    const char* peer_name,
+    RPC_STATUS client_status,
+    const char* client_id,
+    client_auth_info* info
+    )
+{
+    if (peer_status == RPC_S_OK || peer_status == RPC_S_BUFFER_TOO_SMALL) {
+        cci_debug_printf("%s Peer Name is \"%s\"", __FUNCTION__, peer_name);
+    } else {
+        cci_debug_printf("%s Error %u getting Peer Name (%s)",
+                     __FUNCTION__, peer_status, rpc_error_to_string(peer_status));
+    }
+
+    if (client_status == RPC_S_OK || client_status == RPC_S_BUFFER_TOO_SMALL) {
+        if (info) {
+            cci_debug_printf("%s Client Auth Info"
+                         "\tServer Principal:       %s\n"
+                         "\tAuthentication Level:   %d\n"
+                         "\tAuthentication Service: %d\n"
+                         "\tAuthorization Service:  %d\n",
+                         __FUNCTION__,
+                         info->server_principal,
+                         info->authn_level,
+                         info->authn_svc,
+                         info->authz_svc);
+        }
+        cci_debug_printf("%s Client ID is \"%s\"", __FUNCTION__, client_id);
+    } else {
+        cci_debug_printf("%s Error getting Client Info (%u = %s)",
+                     __FUNCTION__, client_status, rpc_error_to_string(client_status));
+    }
+}
+
+DWORD sid_check() {
+    DWORD status = 0;
+    HANDLE hToken_c = 0;
+    HANDLE hToken_s = 0;
+    PTOKEN_USER ptu_c = 0;
+    PTOKEN_USER ptu_s = 0;
+    DWORD len = 0;
+    BOOL bImpersonate = FALSE;
+
+    // Note GetUserName will fail while impersonating at identify
+    // level.  The workaround is to impersonate, OpenThreadToken,
+    // revert, call GetTokenInformation, and finally, call
+    // LookupAccountSid.
+
+    // XXX - Note: This workaround does not appear to work.
+    // OpenThreadToken fails with error 1346: "Either a requid
+    // impersonation level was not provided or the provided
+    // impersonation level is invalid".
+
+    status = RpcImpersonateClient(0);
+
+    if (!status) {
+        bImpersonate = TRUE;
+        if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken_c))
+            status = GetLastError();
+        }
+
+    if (!status) {
+        status = RpcRevertToSelf();
+        }
+
+    if (!status) {
+        bImpersonate = FALSE;
+
+        len = 0;
+        GetTokenInformation(hToken_c, TokenUser, ptu_c, 0, &len);
+        if (len == 0) status = 1;
+        }
+
+    if (!status) {
+        if (!(ptu_c = (PTOKEN_USER)LocalAlloc(0, len)))
+            status = GetLastError();
+        }
+
+    if (!status) {
+        if (!GetTokenInformation(hToken_c, TokenUser, ptu_c, len, &len))
+            status = GetLastError();
+        }
+
+    if (!status) {
+        if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken_s))
+            status = GetLastError();
+        }
+
+    if (!status) {
+        len = 0;
+        GetTokenInformation(hToken_s, TokenUser, ptu_s, 0, &len);
+        if (len == 0) status = GetLastError();
+        }
+
+    if (!status) {
+        if (!(ptu_s = (PTOKEN_USER)LocalAlloc(0, len)))
+            status = GetLastError();
+        }
+
+    if (!status) {
+        if (!GetTokenInformation(hToken_s, TokenUser, ptu_s, len, &len))
+            status = GetLastError();
+        }
+
+    if (!EqualSid(ptu_s->User.Sid, ptu_c->User.Sid))
+        status = RPC_S_ACCESS_DENIED;
+
+/* Cleanup: */
+    if (!hToken_c && !bImpersonate)
+        cci_debug_printf("%s Cannot impersonate (%u)", __FUNCTION__, status);
+    else if (!hToken_c)
+        cci_debug_printf("%s Failed to open client token (%u)", __FUNCTION__, status);
+    else if (bImpersonate)
+        cci_debug_printf("%s Failed to revert (%u)", __FUNCTION__, status);
+    else if (!ptu_c)
+        cci_debug_printf("%s Failed to get client token user info (%u)",
+                     __FUNCTION__, status);
+    else if (!hToken_s)
+        cci_debug_printf("%s Failed to open server token (%u)", __FUNCTION__, status);
+    else if (!ptu_s)
+        cci_debug_printf("%s Failed to get server token user info (%u)",
+                     __FUNCTION__, status);
+    else if (status == RPC_S_ACCESS_DENIED)
+        cci_debug_printf("%s SID **does not** match!", __FUNCTION__);
+    else if (status == RPC_S_OK)
+        cci_debug_printf("%s SID matches!", __FUNCTION__);
+    else
+        if (status) {
+            cci_debug_printf("%s unrecognized error %u", __FUNCTION__, status);
+            abort();
+            }
+
+    if (bImpersonate)   RpcRevertToSelf();
+    if (hToken_c && hToken_c != INVALID_HANDLE_VALUE)
+        CloseHandle(hToken_c);
+    if (ptu_c)          LocalFree(ptu_c);
+    if (hToken_s && hToken_s != INVALID_HANDLE_VALUE)
+        CloseHandle(hToken_s);
+    if (ptu_s)          LocalFree(ptu_s);
+    if (status) cci_debug_printf("%s returning %u", __FUNCTION__, status);
+    return status;
+    }
+
+RPC_STATUS RPC_ENTRY sec_callback(  IN RPC_IF_ID *Interface,
+                                    IN void *Context) {
+    char peer_name[1024];
+    char client_name[1024];
+    RPC_STATUS peer_status;
+    RPC_STATUS client_status;
+
+    cci_debug_printf("%s", __FUNCTION__);
+    peer_status = GetPeerName(Context, peer_name, sizeof(peer_name));
+    client_status = GetClientId(Context, client_name, sizeof(client_name), 0);
+    print_client_info(peer_status, peer_name, client_status, client_name, 0);
+    DWORD sid_status = sid_check();
+    cci_debug_printf("%s returning (%u)", __FUNCTION__, sid_status);
+    return sid_status;
+    }
+
+
+
+/*********************************************************************/
+/*                 MIDL allocate and free                            */
+/*********************************************************************/
+
+extern "C" void  __RPC_FAR * __RPC_USER midl_user_allocate(size_t len) {
+    return(malloc(len));
+    }
+
+extern "C" void __RPC_USER midl_user_free(void __RPC_FAR * ptr) {
+    free(ptr);
+    }
+
+/* stubs */
+extern "C" cc_int32
+ccs_os_notify_cache_collection_changed (ccs_cache_collection_t cc)
+{
+    return 0;
+}
+
+extern "C" cc_int32
+ccs_os_notify_ccache_changed (ccs_cache_collection_t cc, const char *name)
+{
+    return 0;
+}
index 175e06bf042c4f9fa7c92d8179f9a332fac0966b..bf950b6a7f490701c07b44d3ed4ee4d88d0aa49d 100644 (file)
@@ -6,7 +6,7 @@ CCAPI=$(BUILDTOP)$(S)CCAPI
 KFWINC= /I$(BUILDTOP)\..\..\krbcc\include
 !endif
 
-# Because all the sources are in ., 
+# Because all the sources are in .,
 #  the only includes we need are to directories outside of ccapi.
 LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$(S)krb5 $(KFWINC) \
     -I$(BUILDTOP)$(S)util$(S)et /I. -I$(CCAPI)$(S)COMMON -I$(CCAPI)$(S)LIB
@@ -21,7 +21,6 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
 ##DOS##       ccs_reply.h \
 ##DOS##       ccs_request.h \
 ##DOS##       ccs_request_c.c \
-##DOS##       cci_stream.h \
 ##DOS##       cci_types.h \
 ##DOS##       win-utils.h
 
@@ -29,6 +28,7 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
 ##DOS##       ccapi_ccache_iterator.c \
 ##DOS##       ccapi_context.c \
 ##DOS##       ccapi_context_change_time.c \
+##DOS##       ccapi_err.c \
 ##DOS##       ccapi_ipc.c \
 ##DOS##       ccapi_credentials.c \
 ##DOS##       ccapi_credentials_iterator.c \
@@ -37,8 +37,7 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
 
 ##DOS##COMSRC=cci_cred_union.c \
 ##DOS##       cci_identifier.c \
-##DOS##       cci_message.c \
-##DOS##       cci_stream.c
+##DOS##       cci_message.c
 
 ##DOS##COWSRC=cci_os_identifier.c
 
@@ -65,6 +64,7 @@ PINGOBJS =  $(OUTPRE)ccapi_ccache.$(OBJEXT) \
             $(OUTPRE)ccapi_ccache_iterator.$(OBJEXT) \
             $(OUTPRE)ccapi_context.$(OBJEXT) \
             $(OUTPRE)ccapi_context_change_time.$(OBJEXT) \
+            $(OUTPRE)ccapi_err.$(OBJEXT) \
             $(OUTPRE)ccapi_ipc.$(OBJEXT) \
             $(OUTPRE)ccapi_credentials.$(OBJEXT) \
             $(OUTPRE)ccapi_credentials_iterator.$(OBJEXT) \
@@ -74,7 +74,6 @@ PINGOBJS =  $(OUTPRE)ccapi_ccache.$(OBJEXT) \
             $(OUTPRE)cci_identifier.$(OBJEXT) \
             $(OUTPRE)cci_os_identifier.$(OBJEXT) \
             $(OUTPRE)cci_message.$(OBJEXT) \
-            $(OUTPRE)cci_stream.$(OBJEXT) \
             $(OUTPRE)ccs_request_c.$(OBJEXT) \
             $(OUTPRE)pingtest.$(OBJEXT) \
             $(OBJECTS)
@@ -86,7 +85,7 @@ TEST_NAMES =    test_cc_ccache_iterator_next \
                 test_constants \
                 test_cc_initialize \
                 test_cc_credentials_iterator_next
-                
+
 MORE_TESTS =    test_cc_context_release \
                 test_cc_context_get_change_time \
                 test_cc_context_get_default_ccache_name \
@@ -136,7 +135,7 @@ MORE_TESTS =    test_cc_context_release \
 ##### Linker
 LINK   = link
 LIBS    = -lkrb5
-##DOS##LIBS = advapi32.lib rpcrt4.lib user32.lib ws2_32.lib ccapi.lib
+##DOS##LIBS = $(CLIB) $(SLIB) advapi32.lib rpcrt4.lib user32.lib ws2_32.lib ccapi.lib
 LFLAGS = /nologo $(LOPTS)
 
 all-mac::     setup-test-dir pingtest simple_lock_test build-base build-tests link-tests copy-script success-message
@@ -149,14 +148,14 @@ build-base: $(PINGOBJS)
 # compile each test
 build-tests: $(TEST_NAMES)
     @echo build-tests complete.
-    
-$(TEST_NAMES): 
-    @echo DBG: $@    
+
+$(TEST_NAMES):
+    @echo DBG: $@
     $(CC) $(ALL_CFLAGS) -Fe$(TESTDIR)$(S)$@.exe -Fd$(OBJDIR)$(S)$@.obj $@.c $(OBJECTS) $(LIBS)
 # Clean .obj from .:
     $(RM) $@.$(OBJEXT)
 ##-- These two rules build each element of the list.
-    
+
 # Make a build directory
 setup-test-dir:
        @echo "Removing old destination directory... $(DSTDIR)"
@@ -164,13 +163,13 @@ setup-test-dir:
        mkdir -p "$(TESTDIR)"
        if [ -d "$(OBJDIR)" ]; then chmod -R u+w "$(OBJDIR)" && rm -rf "$(OBJDIR)"; fi
        mkdir -p "$(OBJDIR)"
-       
+
 ## The same trick as used in TEST_NAMES to run an action on each element ofthe list WINH:
 setup-windows: $(WINH) $(LIBSRC) $(COMSRC) $(COWSRC)
        if NOT exist $(TESTDIR) mkdir $(TESTDIR)
        if NOT exist $(OBJDIR)  mkdir $(OBJDIR)
        set LINK = link
-    
+
 # This rule assumes that nmake in ..\lib\win has already run.
 #   That is how ..\Makefile.in is set up.
 $(WINH):
@@ -187,8 +186,8 @@ $(COWSRC):
 
 # This rule assumes that nmake in ..\lib\win\ has already run.
 $(OUTPRE)pingtest.exe: $(OBJECTS) $(PINGOBJS)
-# There doesn't appear to be any way to examine a variable and return a value 
-#  indicating whether a string is present in it.  We use a perl script to 
+# There doesn't appear to be any way to examine a variable and return a value
+#  indicating whether a string is present in it.  We use a perl script to
 #  check the LIB variable.  If the path to ccapi.lib isn't present, the script
 #  deletes a.tmp and the following nmake actions correct LIB.
        echo %%PATH%% > a.tmp
@@ -197,8 +196,8 @@ $(OUTPRE)pingtest.exe: $(OBJECTS) $(PINGOBJS)
         @echo Adding ..\lib\win\srctmp to LIB
         set LIB=%%LIB%%;..\lib\win\srctmp
         )
-    $(LINK) $(linkdebug) /map:$(@B)1.map -out:$(*B)1.exe $(conflags) $(PINGOBJS) $(LIBS) 
-       $(LINK) $(LFLAGS)    /map:$(@B)2.map /out:$(*B)2.exe $(conflags) $(PINGOBJS) $(LIBS) $(conlibsdll) 
+    $(LINK) $(linkdebug) /map:$(@B)1.map -out:$(*B)1.exe $(conflags) $(PINGOBJS) $(LIBS)
+       $(LINK) $(LFLAGS)    /map:$(@B)2.map /out:$(*B)2.exe $(conflags) $(PINGOBJS) $(LIBS) $(conlibsdll)
 
 link-tests: $(TEST_NAMES)
 
@@ -212,10 +211,7 @@ simple_lock_test:
        $(CC) -o $(TESTDIR)/simple_lock_test simple_lock_test.c $(LIBS)
 
 copy-script:
-    echo Copy script ...
-    cd
-    dir ccapi_test
-       cp $(SCRIPT_NAME) $(DSTDIR)$(S)$(SCRIPT_NAME)
+       $(CP) $(SCRIPT_NAME) $(DSTDIR)$(S)$(SCRIPT_NAME)
 
 success-message:
        @echo
index d64db2e4b650c32ee533c32c9c5e9fd3a49dbf32..d44839f71aca45641c50860b995dc9d7e55118c6 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "cci_debugging.h"
 #include "CredentialsCache.h"
-#include "cci_stream.h"
 #include "win-utils.h"
 
 #include "ccs_request.h"
@@ -18,9 +17,9 @@
 
 extern cc_int32 cci_os_ipc_thread_init (void);
 extern cc_int32 cci_os_ipc_msg( cc_int32        in_launch_server,
-                                cci_stream_t    in_request_stream,
+                                k5_ipc_stream   in_request_stream,
                                 cc_int32        in_msg,
-                                cci_stream_t*   out_reply_stream);
+                                k5_ipc_stream*  out_reply_stream);
 
 static DWORD    dwTlsIndex;
 
@@ -68,8 +67,8 @@ RPC_STATUS send_test(char* endpoint) {
 int main(   int argc, char *argv[]) {
     cc_int32        err             = 0;
     cc_context_t    context         = NULL;
-    cci_stream_t    send_stream     = NULL;
-    cci_stream_t    reply_stream    = NULL;
+    k5_ipc_stream   send_stream     = NULL;
+    k5_ipc_stream   reply_stream    = NULL;
     char*           message         = "Hello, RPC!";
 
 
@@ -85,8 +84,9 @@ int main(   int argc, char *argv[]) {
         err = cci_os_ipc_thread_init();
         }
     if (!err) {
-        err = cci_stream_new  (&send_stream);
-        err = cci_stream_write(send_stream, message, 1+strlen(message));
+        err = krb5int_ipc_stream_new  (&send_stream);
+        err = krb5int_ipc_stream_write(send_stream, message,
+                                      1+strlen(message));
         }
 
     if (!err) {
index 26641e8d1f9b76cf7ecdb1a93633b5323b838538..d8746cb41a5caecee0330a942131330734adbfab 100644 (file)
@@ -650,6 +650,7 @@ k5_kinit(opts, k5)
 
     if ((opts->action == INIT_KT) && opts->keytab_name)
     {
+#ifndef _WIN32
         if (strncmp(opts->keytab_name, "KDB:", 3) == 0) {
             code = kinit_kdb_init(&k5->ctx,
                                   krb5_princ_realm(k5->ctx, k5->me)->data);
@@ -660,6 +661,7 @@ k5_kinit(opts, k5)
                 goto cleanup;
             }
         }
+#endif
 
         code = krb5_kt_resolve(k5->ctx, opts->keytab_name, &keytab);
         if (code != 0) {
index f8d3cd87ac7f2d80ec8e60cfa4a790f55b20be67..304d69db45c4f1522529ae94180223e1d895c951 100644 (file)
@@ -184,7 +184,11 @@ main(argc, argv)
     }
 
     if (print_version) {
+#ifdef _WIN32                   /* No access to autoconf vars; fix somehow. */
+        printf("Kerberos for Windows\n");
+#else
         printf("%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
+#endif
         exit(0);
     }
 
index 8efa54913f18f03f210d8d1718ae1f4db3e3fd0d..de08645550a51b43aee74f226a6bd25aa33f0883 100644 (file)
@@ -411,6 +411,10 @@ TCL_RPATH  = @TCL_RPATH@
 TCL_MAYBE_RPATH = @TCL_MAYBE_RPATH@
 TCL_INCLUDES   = @TCL_INCLUDES@
 
+# Crypto and PRNG back-end selections
+CRYPTO_IMPL    = @CRYPTO_IMPL@
+PRNG_ALG       = @PRNG_ALG@
+
 # error table rules
 #
 ### /* these are invoked as $(...) foo.et, which works, but could be better */
index 52f0e5b475fa327dfe76d9eb896ff9f152540ad4..a71d88da3ec64d514f5749d68fe1bdef8c0baabc 100644 (file)
@@ -228,6 +228,9 @@ MFLAGS=$(MAKEFLAGS)
 MAKE=-$(MAKE)
 !endif
 
+CRYPTO_IMPL    = builtin
+PRNG_ALG       = yarrow
+
 CFLAGS = $(CCOPTS)
 ALL_CFLAGS = $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(CPPFLAGS) $(CFLAGS)
 
index a0d7c1728549de7e2f4cb932155f97d6d2402baf..9a81d3bbccc17c7a70494f683c393729facd1533 100644 (file)
@@ -2347,10 +2347,10 @@ typedef struct _krb5int_access {
     /* Used for encrypted challenge fast factor*/
     krb5_error_code (*encode_enc_data)(const krb5_enc_data *, krb5_data **);
     krb5_error_code (*decode_enc_data)(const krb5_data *, krb5_enc_data **);
-    void (*free_enc_data)(krb5_context, krb5_enc_data *);
+    void (KRB5_CALLCONV *free_enc_data)(krb5_context, krb5_enc_data *);
     krb5_error_code (*encode_enc_ts)(const krb5_pa_enc_ts *, krb5_data **);
     krb5_error_code (*decode_enc_ts)(const krb5_data *, krb5_pa_enc_ts **);
-    void (*free_enc_ts)(krb5_context, krb5_pa_enc_ts *);
+    void (KRB5_CALLCONV *free_enc_ts)(krb5_context, krb5_pa_enc_ts *);
     krb5_error_code
     (*encrypt_helper)(krb5_context, const krb5_keyblock *, krb5_keyusage,
                       const krb5_data *, krb5_enc_data *);
@@ -2668,7 +2668,7 @@ void krb5int_dbgref_dump_principal(char *, krb5_principal);
 #endif
 
 /* Common hostname-parsing code. */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code
 krb5int_clean_hostname(krb5_context, const char *, char *, size_t);
 
 krb5_error_code
index 85f7a376f6df34d7c93c69d7fdba73daeac6891d..84ffe7976c1285587d394115f353172b3941ab78 100644 (file)
@@ -195,10 +195,10 @@ typedef _W64 int         ssize_t;
  * Functions with slightly different names on the PC
  */
 #ifndef strcasecmp
-#define strcasecmp   stricmp
+#define strcasecmp   _stricmp
 #endif
 #ifndef strncasecmp
-#define strncasecmp  strnicmp
+#define strncasecmp  _strnicmp
 #endif
 
 /* VS2005 has deprecated strdup */
@@ -206,6 +206,9 @@ typedef _W64 int         ssize_t;
 #define strdup _strdup
 #endif
 
+/* Windows has its own name for reentrant strtok. */
+#define strtok_r strtok_s
+
 HINSTANCE get_lib_instance(void);
 
 #define GETSOCKNAME_ARG2_TYPE   struct sockaddr
index 55e9b0f37d6182d9babbe50ed2a191b697c601fd..07954f89b96243e124b60c4cb69bfb95f34027bd 100644 (file)
@@ -35,10 +35,8 @@ clean-windows::
 ##WIN32##CLIBS = $(BUILDTOP)\util\et\$(OUTPRE)comerr.lib
 ##WIN32##PLIBS = $(BUILDTOP)\util\profile\$(OUTPRE)profile.lib
 ##WIN32##KLIBS = krb5\$(OUTPRE)krb5.lib crypto\$(OUTPRE)crypto.lib \
-##WIN32##      $(BUILDTOP)\util\profile\$(OUTPRE)profile.lib \
-##WIN32##      des425\$(OUTPRE)des425.lib
+##WIN32##      $(BUILDTOP)\util\profile\$(OUTPRE)profile.lib
 ##WIN32##GLIBS = gssapi\$(OUTPRE)gssapi.lib
-##WIN32##K4LIBS = krb4\$(OUTPRE)krb4.lib
 
 
 ##WIN32##SDEF = k5sprt32.def
@@ -46,7 +44,6 @@ clean-windows::
 ##WIN32##PDEF = xpprof32.def
 ##WIN32##KDEF = krb5_32.def
 ##WIN32##GDEF = gssapi32.def
-##WIN32##K4DEF = krb4_32.def
 
 
 
@@ -60,7 +57,6 @@ clean-windows::
 
 ##WIN32##S_GLUE=$(OUTPRE)support_glue.obj
 ##WIN32##K5_GLUE=$(OUTPRE)k5_glue.obj
-##WIN32##K4_GLUE=$(OUTPRE)k4_glue.obj
 ##WIN32##GSS_GLUE=$(OUTPRE)gss_glue.obj
 ##WIN32##COMERR_GLUE=$(OUTPRE)comerr_glue.obj
 ##WIN32##PROF_GLUE=$(OUTPRE)prof_glue.obj
@@ -70,7 +66,6 @@ clean-windows::
 ##WIN32##PGLUE=$(PROF_GLUE)
 ##WIN32##KGLUE=$(K5_GLUE)
 ##WIN32##GGLUE=$(GSS_GLUE)
-##WIN32##K4GLUE=$(K4_GLUE)
 
 ##WIN32##RCFLAGS=$(CPPFLAGS) -I$(top_srcdir) -D_WIN32 -DRES_ONLY
 
@@ -79,7 +74,6 @@ clean-windows::
 ##WIN32##PRES=$(PLIB:.lib=.res)
 ##WIN32##KRES=$(KLIB:.lib=.res)
 ##WIN32##GRES=$(GLIB:.lib=.res)
-##WIN32##K4RES=$(K4LIB:.lib=.res)
 
 ##WIN32##$(SRES): $(VERSIONRC)
 ##WIN32##      $(RC) $(RCFLAGS) -DSUPPORT_LIB -fo $@ -r $**
@@ -89,8 +83,6 @@ clean-windows::
 ##WIN32##      $(RC) $(RCFLAGS) -DPROF_LIB -fo $@ -r $**
 ##WIN32##$(KRES): $(KRB5RC)
 ##WIN32##      $(RC) $(RCFLAGS) -DKRB5_LIB -fo $@ -r $**
-##WIN32##$(K4RES): $(VERSIONRC)
-##WIN32##      $(RC) $(RCFLAGS) -DKRB4_LIB -fo $@ -r $**
 ##WIN32##$(GRES): $(VERSIONRC)
 ##WIN32##      $(RC) $(RCFLAGS) -DGSSAPI_LIB -fo $@ -r $**
 ##WIN32##$(KRB5RC): $(VERSIONRC)
@@ -98,7 +90,7 @@ clean-windows::
 ##WIN32##$(SLIB): $(SDEF) $(SLIBS) $(SGLUE) $(SRES)
 ##WIN32##      link $(WINDLLFLAGS) -def:$(SDEF) -out:$*.dll \
 ##WIN32##        $(SLIBS) $(SGLUE) $(SRES) $(WINLIBS) $(SCLIB)
-##WIN32##        $(_VC_MANIFEST_EMBED_DLL)
+##WIN32##      $(_VC_MANIFEST_EMBED_DLL)
 ##WIN32##$(SDEF): ..\util\support\libkrb5support.exports
 ##WIN32##      echo EXPORTS > $(SDEF).new
 ##WIN32##      type ..\util\support\libkrb5support.exports >> $(SDEF).new
@@ -125,15 +117,8 @@ clean-windows::
 ##WIN32##        $(GLIBS) $(GGLUE) $(GRES) $(KLIB) $(CLIB) $(SLIB) $(WINLIBS) $(SCLIB)
 ##WIN32##              $(_VC_MANIFEST_EMBED_DLL)
 
-##WIN32##$(K4LIB): $(K4DEF) $(K4LIBS) $(K4GLUE) $(K4RES) $(KLIB) $(CLIB) $(PLIB)
-##WIN32##      link $(WINDLLFLAGS) -def:$(K4DEF) -out:$*.dll \
-##WIN32##        $(K4LIBS) $(K4GLUE) $(K4RES) $(KLIB) $(CLIB) $(PLIB) $(WINLIBS) $(SCLIB)
-##WIN32##      $(_VC_MANIFEST_EMBED_DLL)
-
 ##WIN32##$(K5_GLUE): win_glue.c
 ##WIN32##      $(CC) $(ALL_CFLAGS) $(MITFLAGS) /c /DKRB5=1 /Fo$@ $**
-##WIN32##$(K4_GLUE): win_glue.c
-##WIN32##      $(CC) $(ALL_CFLAGS) /c /DKRB4=1 /Fo$@ $**
 ##WIN32##$(GSS_GLUE): win_glue.c
 ##WIN32##      $(CC) $(ALL_CFLAGS) /c /DGSSAPI=1 /Fo$@ $**
 ##WIN32##$(COMERR_GLUE): win_glue.c
@@ -145,7 +130,6 @@ clean-windows::
 
 ##WIN32### Build Convenience
 ##WIN32##comerr.lib: $(CLIB)
-##WIN32##krb4.lib:   $(K4LIB)
 ##WIN32##krb5.lib:   $(KLIB)
 ##WIN32##gssapi.lib: $(GLIB)
 ##WIN32##profile.lib: $(PLIB)
@@ -157,12 +141,6 @@ clean-windows::
 ##WIN32##      @echo Making in lib\krb5
 ##WIN32##      cd ..\krb5
 ##WIN32##      $(MAKE) -$(MFLAGS)
-##WIN32##      @echo Making in lib\des425
-##WIN32##      cd ..\des425
-##WIN32##      $(MAKE) -$(MFLAGS) 
-##WIN32##      @echo Making in lib\krb4
-##WIN32##      cd ..\krb4
-##WIN32##      $(MAKE) -$(MFLAGS) 
 ##WIN32##      @echo Making in lib\gssapi
 ##WIN32##      cd ..\gssapi
 ##WIN32##      $(MAKE) -$(MFLAGS) 
@@ -170,7 +148,7 @@ clean-windows::
 ##WIN32##      cd ..
 
 ##WIN32##all-windows:: lib-windows
-##WIN32##lib-windows:: krb5.lib gssapi.lib krb4.lib 
+##WIN32##lib-windows:: krb5.lib gssapi.lib
 
 ##WIN32##clean-windows::
 ##WIN32##      @echo Making clean in lib\crypto
@@ -179,12 +157,6 @@ clean-windows::
 ##WIN32##      @echo Making clean in lib\krb5
 ##WIN32##      cd ..\krb5
 ##WIN32##      $(MAKE) -$(MFLAGS) clean
-##WIN32##      @echo Making clean in lib\des425
-##WIN32##      cd ..\des425
-##WIN32##      $(MAKE) -$(MFLAGS) clean
-##WIN32##      @echo Making clean in lib\krb4
-##WIN32##      cd ..\krb4
-##WIN32##      $(MAKE) -$(MFLAGS) clean
 ##WIN32##      @echo Making clean in lib\gssapi
 ##WIN32##      cd ..\gssapi
 ##WIN32##      $(MAKE) -$(MFLAGS) clean
index a1d0eb747b72cb0669bd8a01235f6489027636d8..12098d60caf0749d5ef695d6b7f3703bd1ece769 100644 (file)
@@ -1,6 +1,6 @@
 mydir=lib/crypto
 BUILDTOP=$(REL)..$(S)..
-SUBDIRS= krb @CRYPTO_IMPL@ crypto_tests
+SUBDIRS= krb $(CRYPTO_IMPL) crypto_tests
 
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
@@ -19,32 +19,32 @@ LIBFINIFUNC=cryptoint_cleanup_library
 RELDIR=crypto
 
 STOBJLISTS=krb/crc32/OBJS.ST krb/dk/OBJS.ST                            \
-       @CRYPTO_IMPL@/enc_provider/OBJS.ST                              \
-       @CRYPTO_IMPL@/hash_provider/OBJS.ST                             \
+       $(CRYPTO_IMPL)/enc_provider/OBJS.ST                             \
+       $(CRYPTO_IMPL)/hash_provider/OBJS.ST                            \
        krb/checksum/OBJS.ST krb/prf/OBJS.ST krb/rand2key/OBJS.ST       \
        krb/old/OBJS.ST krb/raw/OBJS.ST krb/prng/OBJS.ST                \
-       krb/prng/@PRNG_ALG@/OBJS.ST                                     \
-       @CRYPTO_IMPL@/md4/OBJS.ST @CRYPTO_IMPL@/md5/OBJS.ST             \
-       @CRYPTO_IMPL@/sha1/OBJS.ST                                      \
-       @CRYPTO_IMPL@/sha2/OBJS.ST                                      \
+       krb/prng/$(PRNG_ALG)/OBJS.ST                                    \
+       $(CRYPTO_IMPL)/md4/OBJS.ST $(CRYPTO_IMPL)/md5/OBJS.ST           \
+       $(CRYPTO_IMPL)/sha1/OBJS.ST                                     \
+       $(CRYPTO_IMPL)/sha2/OBJS.ST                                     \
        krb/arcfour/OBJS.ST                                             \
-       @CRYPTO_IMPL@/aes/OBJS.ST @CRYPTO_IMPL@/des/OBJS.ST             \
-       @CRYPTO_IMPL@/camellia/OBJS.ST krb/OBJS.ST                      \
-       @CRYPTO_IMPL@/OBJS.ST
+       $(CRYPTO_IMPL)/aes/OBJS.ST $(CRYPTO_IMPL)/des/OBJS.ST           \
+       $(CRYPTO_IMPL)/camellia/OBJS.ST krb/OBJS.ST                     \
+       $(CRYPTO_IMPL)/OBJS.ST
 
 SUBDIROBJLISTS=krb/crc32/OBJS.ST krb/dk/OBJS.ST                                \
-       @CRYPTO_IMPL@/enc_provider/OBJS.ST                              \
-       @CRYPTO_IMPL@/hash_provider/OBJS.ST                             \
+       $(CRYPTO_IMPL)/enc_provider/OBJS.ST                             \
+       $(CRYPTO_IMPL)/hash_provider/OBJS.ST                            \
        krb/checksum/OBJS.ST krb/prf/OBJS.ST krb/rand2key/OBJS.ST       \
        krb/old/OBJS.ST krb/raw/OBJS.ST krb/prng/OBJS.ST                \
-       krb/prng/@PRNG_ALG@/OBJS.ST                                     \
-       @CRYPTO_IMPL@/md4/OBJS.ST @CRYPTO_IMPL@/md5/OBJS.ST             \
-       @CRYPTO_IMPL@/sha1/OBJS.ST                                      \
-       @CRYPTO_IMPL@/sha2/OBJS.ST                                      \
+       krb/prng/$(PRNG_ALG)/OBJS.ST                                    \
+       $(CRYPTO_IMPL)/md4/OBJS.ST $(CRYPTO_IMPL)/md5/OBJS.ST           \
+       $(CRYPTO_IMPL)/sha1/OBJS.ST                                     \
+       $(CRYPTO_IMPL)/sha2/OBJS.ST                                     \
        krb/arcfour/OBJS.ST                                             \
-       @CRYPTO_IMPL@/aes/OBJS.ST @CRYPTO_IMPL@/des/OBJS.ST             \
-       @CRYPTO_IMPL@/camellia/OBJS.ST krb/OBJS.ST                      \
-       @CRYPTO_IMPL@/OBJS.ST
+       $(CRYPTO_IMPL)/aes/OBJS.ST $(CRYPTO_IMPL)/des/OBJS.ST           \
+       $(CRYPTO_IMPL)/camellia/OBJS.ST krb/OBJS.ST                     \
+       $(CRYPTO_IMPL)/OBJS.ST
 
 # No dependencies.  Record places to find this shared object if the target
 # link editor and loader support it.
@@ -58,7 +58,9 @@ SHLIB_LDFLAGS= $(LDFLAGS) @SHLIB_RPATH_DIRS@
 SHLIB_LIBDIRS= @SHLIB_LIBDIRS@
 SHLIB_RDIRS=$(KRB5_LIBDIR)
 
-##DOS##LIBOBJS = $(OBJS)
+##DOS##LIBNAME=$(OUTPRE)crypto.lib
+##DOS##OBJFILEDEP=$(OUTPRE)crc32.lst $(OUTPRE)rand2key.lst $(OUTPRE)yarrow.lst $(OUTPRE)prng.lst $(OUTPRE)prf.lst $(OUTPRE)checksum.lst $(OUTPRE)krb.lst $(OUTPRE)old.lst $(OUTPRE)raw.lst $(OUTPRE)arcfour.lst $(OUTPRE)dk.lst $(OUTPRE)aes.lst $(OUTPRE)enc_provider.lst $(OUTPRE)des.lst $(OUTPRE)md5.lst $(OUTPRE)camellia.lst $(OUTPRE)md4.lst $(OUTPRE)hash_provider.lst $(OUTPRE)sha2.lst $(OUTPRE)sha1.lst $(OUTPRE)builtin.lst
+##DOS##OBJFILELIST=@$(OUTPRE)crc32.lst @$(OUTPRE)rand2key.lst @$(OUTPRE)yarrow.lst @$(OUTPRE)prng.lst @$(OUTPRE)prf.lst @$(OUTPRE)checksum.lst @$(OUTPRE)krb.lst @$(OUTPRE)old.lst @$(OUTPRE)raw.lst @$(OUTPRE)arcfour.lst @$(OUTPRE)dk.lst @$(OUTPRE)aes.lst @$(OUTPRE)enc_provider.lst @$(OUTPRE)des.lst @$(OUTPRE)md5.lst @$(OUTPRE)camellia.lst @$(OUTPRE)md4.lst @$(OUTPRE)hash_provider.lst @$(OUTPRE)sha2.lst @$(OUTPRE)sha1.lst @$(OUTPRE)builtin.lst
 
 all-unix:: all-liblinks
 install-unix:: install-libs
@@ -76,8 +78,8 @@ all-windows::
        cd krb
        @echo Making in crypto\krb
        $(MAKE) -$(MFLAGS)
-       cd ..\@CRYPTO_IMPL@
-       @echo Making in crypto\@CRYPTO_IMPL@
+       cd ..\$(CRYPTO_IMPL)
+       @echo Making in crypto\$(CRYPTO_IMPL)
        $(MAKE) -$(MFLAGS)
        cd ..\crypto_tests
        @echo Making in crypto\crypto_tests
@@ -88,8 +90,8 @@ clean-windows::
        cd krb
        @echo Making in clean crypto\krb
        $(MAKE) -$(MFLAGS) clean
-       cd ..\@CRYPTO_IMPL@
-       @echo Making clean in crypto\@CRYPTO_IMPL@
+       cd ..\$(CRYPTO_IMPL)
+       @echo Making clean in crypto\$(CRYPTO_IMPL)
        $(MAKE) -$(MFLAGS) clean
        cd ..\crypto_tests
        @echo Making clean in crypto\crypto_tests
index 240d2895b3a02ffdd9899ef5cab34c383e393874..603c57cd07d065df56b97fc4d191b48492ed3930 100644 (file)
@@ -20,11 +20,9 @@ DEFS=
 EXTRADEPSRCS= $(srcdir)/t_cf2.c 
 
 
-##DOSBUILDTOP = ..\..\..
-##DOSLIBNAME=$(OUTPRE)crypto.lib
-##DOSOBJFILE=$(OUTPRE)crypto.lst
-##DOSOBJFILELIST=@$(OUTPRE)crypto.lst @$(OUTPRE)des.lst @$(OUTPRE)md4.lst @$(OUTPRE)md5.lst @$(OUTPRE)sha1.lst @$(OUTPRE)crc32.lst @$(OUTPRE)dk.lst @$(OUTPRE)old.lst @$(OUTPRE)raw.lst @$(OUTPRE)enc_prov.lst @$(OUTPRE)hash_pro.lst @$(OUTPRE)kh_pro.lst @$(OUTPRE)yarrow.lst @$(OUTPRE)aes.lst $(OUTPRE)camellia.lst
-##DOSOBJFILEDEP =$(OUTPRE)crypto.lst $(OUTPRE)des.lst $(OUTPRE)md4.lst $(OUTPRE)md5.lst $(OUTPRE)sha1.lst $(OUTPRE)crc32.lst $(OUTPRE)dk.lst $(OUTPRE)old.lst $(OUTPRE)raw.lst $(OUTPRE)enc_prov.lst $(OUTPRE)hash_pro.lst $(OUTPRE)kh_pro.lst $(OUTPRE)aes.lst $(OUTPRE)camellia.lst
+##DOS##BUILDTOP = ..\..\..
+##DOS##PREFIXDIR = builtin
+##DOS##OBJFILE = ..\$(OUTPRE)builtin.lst
 
 STLIBOBJS=\
        hmac.o  \
@@ -78,91 +76,97 @@ clean::
 
 
 all-windows::
-       cd ..\des
-       @echo Making in crypto\des
+       cd des
+       @echo Making in crypto\builtin\des
        $(MAKE) -$(MFLAGS)
        cd ..\md4
-       @echo Making in crypto\md4
+       @echo Making in crypto\builtin\md4
        $(MAKE) -$(MFLAGS)
        cd ..\md5
-       @echo Making in crypto\md5
+       @echo Making in crypto\builtin\md5
        $(MAKE) -$(MFLAGS)
        cd ..\sha1
-       @echo Making in crypto\sha1
+       @echo Making in crypto\builtin\sha1
        $(MAKE) -$(MFLAGS)
-       cd ..\sh2a
-       @echo Making in crypto\sha2
+       cd ..\sha2
+       @echo Making in crypto\builtin\sha2
        $(MAKE) -$(MFLAGS)
        cd ..\hash_provider
-       @echo Making in crypto\hash_provider
+       @echo Making in crypto\builtin\hash_provider
        $(MAKE) -$(MFLAGS)
        cd ..\enc_provider
-       @echo Making in crypto\enc_provider
+       @echo Making in crypto\builtin\enc_provider
        $(MAKE) -$(MFLAGS)
        cd ..\aes
-       @echo Making in crypto\aes
+       @echo Making in crypto\builtin\aes
        $(MAKE) -$(MFLAGS)
        cd ..\camellia
-       @echo Making in crypto\camellia
+       @echo Making in crypto\builtin\camellia
        $(MAKE) -$(MFLAGS)
        cd ..
+       @echo Making in crypto\builtin
 
 clean-windows::
-       cd ..\des
-       @echo Making clean in crypto\des
+       cd des
+       @echo Making clean in crypto\builtin\des
        $(MAKE) -$(MFLAGS) clean
        cd ..\md4
-       @echo Making clean in crypto\md4
+       @echo Making clean in crypto\builtin\md4
        $(MAKE) -$(MFLAGS) clean
        cd ..\md5
-       @echo Making clean in crypto\md5
+       @echo Making clean in crypto\builtin\md5
        $(MAKE) -$(MFLAGS) clean
        cd ..\sha1
-       @echo Making clean in crypto\sha1
+       @echo Making clean in crypto\builtin\sha1
        $(MAKE) -$(MFLAGS) clean
        cd ..\sha2
-       @echo Making clean in crypto\sha2
+       @echo Making clean in crypto\builtin\sha2
        $(MAKE) -$(MFLAGS) clean
        cd ..\hash_provider
-       @echo Making clean in crypto\hash_provider
+       @echo Making clean in crypto\builtin\hash_provider
        $(MAKE) -$(MFLAGS) clean
        cd ..\enc_provider
-       @echo Making clean in crypto\enc_provider
+       @echo Making clean in crypto\builtin\enc_provider
        $(MAKE) -$(MFLAGS) clean
        cd ..\aes
-       @echo Making clean in crypto\aes
+       @echo Making clean in crypto\builtin\aes
        $(MAKE) -$(MFLAGS) clean
        cd ..\camellia
-       @echo Making clean in crypto\camellia
+       @echo Making clean in crypto\builtin\camellia
        $(MAKE) -$(MFLAGS) clean
        cd ..
+       @echo Making clean in crypto\builtin
 
 check-windows::
-       cd ..\des
-       @echo Making check in crypto\des
+       cd des
+       @echo Making check in crypto\builtin\des
        $(MAKE) -$(MFLAGS) check
        cd ..\md4
-       @echo Making check in crypto\md4
+       @echo Making check in crypto\builtin\md4
        $(MAKE) -$(MFLAGS) check
        cd ..\md5
-       @echo Making check in crypto\md5
+       @echo Making check in crypto\builtin\md5
        $(MAKE) -$(MFLAGS) check
        cd ..\sha1
-       @echo Making check in crypto\sha1
+       @echo Making check in crypto\builtin\sha1
+       $(MAKE) -$(MFLAGS) check
+       cd ..\sha2
+       @echo Making check in crypto\builtin\sha2
        $(MAKE) -$(MFLAGS) check
        cd ..\hash_provider
-       @echo Making check in crypto\hash_provider
+       @echo Making check in crypto\builtin\hash_provider
        $(MAKE) -$(MFLAGS) check
        cd ..\enc_provider
-       @echo Making check in crypto\enc_provider
+       @echo Making check in crypto\builtin\enc_provider
        $(MAKE) -$(MFLAGS) check
        cd ..\aes
-       @echo Making check in crypto\aes
+       @echo Making check in crypto\builtin\aes
        $(MAKE) -$(MFLAGS) check
        cd ..\camellia
-       @echo Making check in crypto\camellia
+       @echo Making check in crypto\builtin\camellia
        $(MAKE) -$(MFLAGS) check
        cd ..
+       @echo Making check in crypto\builtin
 
 
 @lib_frag@
index 260cc97cc39e664b94cb744884d6e017e4c0aee3..64f73a379b635ef363139c234cdf893c6d374e1d 100644 (file)
@@ -4,8 +4,8 @@ LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk  -I$(srcdir)/../../../..
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=aes
-##DOS##OBJFILE=..\$(OUTPRE)aes.lst
+##DOS##PREFIXDIR = builtin\aes
+##DOS##OBJFILE = ..\..\$(OUTPRE)aes.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index d848defd844f66f77d6752e2c616a92b835844f5..2ad3e73f66bce0525df3f62e4478500874cda31e 100644 (file)
@@ -7,8 +7,8 @@ LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk \
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=camellia
-##DOS##OBJFILE=..\$(OUTPRE)camellia.lst
+##DOS##PREFIXDIR = builtin\camellia
+##DOS##OBJFILE = ..\..\$(OUTPRE)camellia.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 325fdc262962015e524c4f0de17878b27ec8def4..5001d48bfc1c4ca172b208c5af2b499d9247f1d8 100644 (file)
@@ -4,8 +4,8 @@ LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. -I$(srcdir)/../../krb
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=des
-##DOS##OBJFILE=..\$(OUTPRE)des.lst
+##DOS##PREFIXDIR = builtin\des
+##DOS##OBJFILE = ..\..\$(OUTPRE)des.lst
 
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
index aadec6e6a818007b9502045e9aa60577454bf536..80bfc60bd313fe6312e18cebfbb3c7e74333f419 100644 (file)
@@ -10,8 +10,8 @@ LOCALINCLUDES = -I$(srcdir)/../des    \
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=enc_provider
-##DOS##OBJFILE=..\$(OUTPRE)enc_prov.lst
+##DOS##PREFIXDIR = builtin\enc_provider
+##DOS##OBJFILE = ..\..\$(OUTPRE)enc_provider.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 566f2d78fb2862b99d8f39a8ed3cb32756094bda..337a3104d34eb8a66eb72b86f38bed75e3aa3f1e 100644 (file)
@@ -358,9 +358,11 @@ krb5int_camellia_cbc_mac(krb5_key key, const krb5_crypto_iov *data,
 }
 
 const struct krb5_enc_provider krb5int_enc_camellia128 = {
+    0
 };
 
 const struct krb5_enc_provider krb5int_enc_camellia256 = {
+    0
 };
 
 #endif /* CAMELLIA */
index 36ec412c5fc3d2fe36a0994643f57ba228ad58a7..e91901ee5b85704cded609b680f394475f117f4d 100644 (file)
@@ -5,8 +5,8 @@ LOCALINCLUDES = -I$(srcdir)/../../krb/crc32 -I$(srcdir)/../md4 \
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=hash_provider
-##DOS##OBJFILE=..\$(OUTPRE)hash_pro.lst
+##DOS##PREFIXDIR = builtin\hash_provider
+##DOS##OBJFILE = ..\..\$(OUTPRE)hash_provider.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 561927a1e01862eca5a838bbd9b34d32a8df7a02..00ec64315ab84bc890a9f2a7c73399579a424004 100644 (file)
@@ -4,8 +4,8 @@ LOCALINCLUDES = -I$(srcdir)
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=md4
-##DOS##OBJFILE=..\$(OUTPRE)md4.lst
+##DOS##PREFIXDIR = builtin\md4
+##DOS##OBJFILE = ..\..\$(OUTPRE)md4.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 6a1f52fa6c0d9a982d02341fad6af52d3e27871e..840bb62b949fd3eb560b45d65458586c11dba96f 100644 (file)
@@ -3,8 +3,8 @@ BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=md5
-##DOS##OBJFILE=..\$(OUTPRE)md5.lst
+##DOS##PREFIXDIR = builtin\md5
+##DOS##OBJFILE = ..\..\$(OUTPRE)md5.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index ec51713a194470d26be3de11addc02dc75d53a46..719f633702a5e78098cf08468c9d1089ac15fa44 100644 (file)
@@ -3,8 +3,8 @@ BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=sha1
-##DOS##OBJFILE=..\$(OUTPRE)sha1.lst
+##DOS##PREFIXDIR = builtin\sha1
+##DOS##OBJFILE = ..\..\$(OUTPRE)sha1.lst
 
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
index 535d7eeb8584fb1b7bc2b91d702b7a38907c9563..3b854ec29ed11a65f50a506faeb6b9060376f4cf 100644 (file)
@@ -3,8 +3,8 @@ BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=sha2
-##DOS##OBJFILE=..\$(OUTPRE)sha2.lst
+##DOS##PREFIXDIR = builtin\sha2
+##DOS##OBJFILE = ..\..\$(OUTPRE)sha2.lst
 
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
index 06b1745e9227a9b8c8dbd895f0ff8d043f72a93b..17e1683d618164b7f008ecb1bed7056db115c7e0 100644 (file)
@@ -1,15 +1,16 @@
 mydir=lib/crypto/crypto_tests
 BUILDTOP=$(REL)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/../krb -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider           \
-       -I$(srcdir)/../@CRYPTO_IMPL@/hash_provider -I$(srcdir)/../krb/keyhash_provider  \
-       -I$(srcdir)/../krb/dk -I$(srcdir)/../@CRYPTO_IMPL@/                     \
-       -I$(srcdir)/../krb/prng         \
-       -I$(srcdir)/../krb/prng/@PRNG_ALG@      \
-       -I$(srcdir)/../krb/crc32 -I$(srcdir)/../krb/old -I$(srcdir)/../krb/raw  \
-       -I$(srcdir)/../@CRYPTO_IMPL@/aes -I$(srcdir)/../@CRYPTO_IMPL@/des       \
-       -I$(srcdir)/../@CRYPTO_IMPL@/arcfour -I$(srcdir)/../@CRYPTO_IMPL@/sha1  \
-       -I$(srcdir)/../@CRYPTO_IMPL@/md5 -I$(srcdir)/../@CRYPTO_IMPL@/md4 \
-       -I$(srcdir)/../@CRYPTO_IMPL@/camellia
+LOCALINCLUDES = -I$(srcdir)/../krb -I$(srcdir)/../$(CRYPTO_IMPL)/enc_provider \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/hash_provider \
+       -I$(srcdir)/../krb/keyhash_provider -I$(srcdir)/../krb/dk \
+       -I$(srcdir)/../$(CRYPTO_IMPL) -I$(srcdir)/../krb/prng \
+       -I$(srcdir)/../krb/prng/$(PRNG_ALG) -I$(srcdir)/../krb/crc32 \
+       -I$(srcdir)/../krb/old -I$(srcdir)/../krb/raw \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/aes -I$(srcdir)/../$(CRYPTO_IMPL)/des \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/arcfour \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/sha1 \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/md5 -I$(srcdir)/../$(CRYPTO_IMPL)/md4 \
+       -I$(srcdir)/../$(CRYPTO_IMPL)/camellia
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
@@ -39,13 +40,7 @@ EXTRADEPSRCS=\
        $(srcdir)/t_fork.c      \
        $(srcdir)/ytest.c       
 
-##DOSBUILDTOP = ..\..\..
-##DOSLIBNAME=$(OUTPRE)crypto.lib
-##DOSOBJFILE=$(OUTPRE)crypto.lst
-##DOSOBJFILELIST=@$(OUTPRE)crypto.lst @$(OUTPRE)des.lst @$(OUTPRE)md4.lst @$(OUTPRE)md5.lst @$(OUTPRE)sha1.lst @$(OUTPRE)arcfour.lst @$(OUTPRE)crc32.lst @$(OUTPRE)dk.lst @$(OUTPRE)old.lst @$(OUTPRE)raw.lst @$(OUTPRE)enc_prov.lst @$(OUTPRE)hash_pro.lst @$(OUTPRE)kh_pro.lst @$(OUTPRE)yarrow.lst @$(OUTPRE)aes.lst
-##DOSOBJFILEDEP =$(OUTPRE)crypto.lst $(OUTPRE)des.lst $(OUTPRE)md4.lst $(OUTPRE)md5.lst $(OUTPRE)sha1.lst $(OUTPRE)arcfour.lst $(OUTPRE)crc32.lst $(OUTPRE)dk.lst $(OUTPRE)old.lst $(OUTPRE)raw.lst $(OUTPRE)enc_prov.lst $(OUTPRE)hash_pro.lst $(OUTPRE)kh_pro.lst $(OUTPRE)aes.lst
-
-##DOS##LIBOBJS = $(OBJS)
+##DOS##BUILDTOP = ..\..\..
 
 # NOTE: The t_cksum known checksum values are primarily for regression
 # testing.  They are not derived a priori, but are known to produce
@@ -63,7 +58,7 @@ check-unix:: t_nfold t_encrypt t_decrypt t_prf t_prng t_cmac t_hmac \
        $(RUN_SETUP) $(VALGRIND) ./t_encrypt
        $(RUN_SETUP) $(VALGRIND) ./t_decrypt
        $(RUN_SETUP) $(VALGRIND) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output
-       if [ @PRNG_ALG@ = yarrow ]; then \
+       if [ $(PRNG_ALG) = yarrow ]; then \
                diff t_prng.output $(srcdir)/t_prng.expected; \
        fi
        $(RUN_SETUP) $(VALGRIND) ./t_cmac
index 94b06c4eeb95ee0dd3f698b50e4c2c1b988f085a..7536bf80beb10b5875b6163d32954a3904493db4 100644 (file)
@@ -2,25 +2,25 @@ mydir=lib/crypto/krb
 BUILDTOP=$(REL)..$(S)..$(S)..
 SUBDIRS= arcfour checksum crc32 dk \
        prf rand2key old raw prng 
-LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/../@CRYPTO_IMPL@/enc_provider -I$(srcdir)/dk   \
-               -I$(srcdir)/../@CRYPTO_IMPL@/hash_provider                              \
-               -I$(srcdir)/prf -I$(srcdir)/rand2key                                    \
+LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/../$(CRYPTO_IMPL)/enc_provider \
+               -I$(srcdir)/dk -I$(srcdir)/../$(CRYPTO_IMPL)/hash_provider \
+               -I$(srcdir)/prf -I$(srcdir)/rand2key \
                -I$(srcdir)/old -I$(srcdir)/raw \
-               -I$(srcdir)/prng                \
-               -I$(srcdir)/prng/@PRNG_ALG@             \
-               -I$(srcdir)/../@CRYPTO_IMPL@/ -I$(srcdir)/../@CRYPTO_IMPL@/des          \
-               -I$(srcdir)/../@CRYPTO_IMPL@/aes -I$(srcdir)/arcfour    \
-               -I$(srcdir)/../@CRYPTO_IMPL@/camellia \
-               -I$(srcdir)/../@CRYPTO_IMPL@/sha1 -I$(srcdir)/../@CRYPTO_IMPL@
+               -I$(srcdir)/prng \
+               -I$(srcdir)/prng/$(PRNG_ALG) \
+               -I$(srcdir)/../$(CRYPTO_IMPL) \
+               -I$(srcdir)/../$(CRYPTO_IMPL)/des \
+               -I$(srcdir)/../$(CRYPTO_IMPL)/aes -I$(srcdir)/arcfour   \
+               -I$(srcdir)/../$(CRYPTO_IMPL)/camellia \
+               -I$(srcdir)/../$(CRYPTO_IMPL)/sha1 \
+               -I$(srcdir)/../$(CRYPTO_IMPL)
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
 
-##DOSBUILDTOP = ..\..\..
-##DOSLIBNAME=$(OUTPRE)crypto.lib
-##DOSOBJFILE=$(OUTPRE)crypto.lst
-##DOSOBJFILELIST=@$(OUTPRE)crypto.lst @$(OUTPRE)des.lst @$(OUTPRE)md4.lst @$(OUTPRE)md5.lst @$(OUTPRE)sha1.lst @$(OUTPRE)arcfour.lst @$(OUTPRE)crc32.lst @$(OUTPRE)dk.lst @$(OUTPRE)old.lst @$(OUTPRE)raw.lst @$(OUTPRE)enc_prov.lst @$(OUTPRE)hash_pro.lst @$(OUTPRE)cksum.lst @$(OUTPRE)yarrow.lst @$(OUTPRE)aes.lst
-##DOSOBJFILEDEP =$(OUTPRE)crypto.lst $(OUTPRE)des.lst $(OUTPRE)md4.lst $(OUTPRE)md5.lst $(OUTPRE)sha1.lst $(OUTPRE)arcfour.lst $(OUTPRE)crc32.lst $(OUTPRE)dk.lst $(OUTPRE)old.lst $(OUTPRE)raw.lst $(OUTPRE)enc_prov.lst $(OUTPRE)hash_pro.lst $(OUTPRE)cksum.lst $(OUTPRE)aes.lst
+##DOS##BUILDTOP = ..\..\..
+##DOS##PREFIXDIR = krb
+##DOS##OBJFILE = ..\$(OUTPRE)krb.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
@@ -67,7 +67,7 @@ STLIBOBJS=\
 OBJS=\
        $(OUTPRE)aead.$(OBJEXT)                 \
        $(OUTPRE)block_size.$(OBJEXT)           \
-       $(OUTPRE)cf2$(OBJEXT)                   \
+       $(OUTPRE)cf2.$(OBJEXT)                  \
        $(OUTPRE)checksum_length.$(OBJEXT)      \
        $(OUTPRE)cksumtype_to_string.$(OBJEXT)  \
        $(OUTPRE)cksumtypes.$(OBJEXT)           \
@@ -83,7 +83,7 @@ OBJS=\
        $(OUTPRE)encrypt_length.$(OBJEXT)       \
        $(OUTPRE)enctype_util.$(OBJEXT) \
        $(OUTPRE)etypes.$(OBJEXT)               \
-       $(OUTPRE)key.$(OBJECT)                  \
+       $(OUTPRE)key.$(OBJEXT)                  \
        $(OUTPRE)keyblocks.$(OBJEXT)            \
        $(OUTPRE)keyed_cksum.$(OBJEXT)          \
        $(OUTPRE)keyed_checksum_types.$(OBJEXT) \
@@ -98,6 +98,7 @@ OBJS=\
        $(OUTPRE)random_to_key.$(OBJEXT)        \
        $(OUTPRE)state.$(OBJEXT)                \
        $(OUTPRE)string_to_cksumtype.$(OBJEXT)  \
+       $(OUTPRE)string_to_key.$(OBJEXT)        \
        $(OUTPRE)valid_cksumtype.$(OBJEXT)      \
        $(OUTPRE)verify_checksum.$(OBJEXT)      \
        $(OUTPRE)verify_checksum_iov.$(OBJEXT)
@@ -143,11 +144,11 @@ SRCS=\
 
 STOBJLISTS=arcfour/OBJS.ST checksum/OBJS.ST crc32/OBJS.ST      \
        dk/OBJS.ST prf/OBJS.ST rand2key/OBJS.ST                 \
-       old/OBJS.ST raw/OBJS.ST  prng/@PRNG_ALG@/OBJS.ST prng/OBJS.ST OBJS.ST
+       old/OBJS.ST raw/OBJS.ST  prng/$(PRNG_ALG)/OBJS.ST prng/OBJS.ST OBJS.ST
 
 SUBDIROBJLISTS=arcfour/OBJS.ST checksum/OBJS.ST crc32/OBJS.ST  \
        dk/OBJS.ST prf/OBJS.ST rand2key/OBJS.ST                 \
-       old/OBJS.ST raw/OBJS.ST  prng/@PRNG_ALG@/OBJS.ST prng/OBJS.ST  
+       old/OBJS.ST raw/OBJS.ST  prng/$(PRNG_ALG)/OBJS.ST prng/OBJS.ST  
 
 ##DOS##LIBOBJS = $(OBJS)
 
@@ -160,93 +161,96 @@ clean-unix:: clean-libobjs
 
 all-windows::
        cd arcfour
-       @echo Making in crypto\arcfour
+       @echo Making in crypto\krb\arcfour
        $(MAKE) -$(MFLAGS)
        cd ..\crc32
-       @echo Making in crypto\crc32
+       @echo Making in crypto\krb\crc32
        $(MAKE) -$(MFLAGS)
        cd ..\checksum
-       @echo Making in crypto\checksum
+       @echo Making in crypto\krb\checksum
        $(MAKE) -$(MFLAGS)
        cd ..\dk
-       @echo Making in crypto\dk
+       @echo Making in crypto\krb\dk
        $(MAKE) -$(MFLAGS)
        cd ..\prf
-       @echo Making in crypto\prf
+       @echo Making in crypto\krb\prf
        $(MAKE) -$(MFLAGS)
        cd ..\rand2key
-       @echo Making in crypto\rand2key
+       @echo Making in crypto\krb\rand2key
        $(MAKE) -$(MFLAGS)
        cd ..\old
-       @echo Making in crypto\old
+       @echo Making in crypto\krb\old
        $(MAKE) -$(MFLAGS)
        cd ..\raw
-       @echo Making in crypto\raw
+       @echo Making in crypto\krb\raw
        $(MAKE) -$(MFLAGS)
        cd ..\prng
-       @echo Making in crypto\prng
+       @echo Making in crypto\krb\prng
        $(MAKE) -$(MFLAGS)
        cd ..
+       @echo Making in crypto\krb
 
 clean-windows::
        cd arcfour
-       @echo Making in clean crypto\arcfour
+       @echo Making in clean crypto\krb\arcfour
        $(MAKE) -$(MFLAGS) clean
        cd ..\crc32
-       @echo Making in clean crypto\crc32
+       @echo Making in clean crypto\krb\crc32
        $(MAKE) -$(MFLAGS) clean
        cd ..\checksum
-       @echo Making clean in crypto\checksum
+       @echo Making clean in crypto\krb\checksum
        $(MAKE) -$(MFLAGS) clean
        cd ..\dk
-       @echo Making clean in crypto\dk
+       @echo Making clean in crypto\krb\dk
        $(MAKE) -$(MFLAGS) clean
        cd ..\prf
-       @echo Making clean in crypto\prf
+       @echo Making clean in crypto\krb\prf
        $(MAKE) -$(MFLAGS) clean
        cd ..\rand2key
-       @echo Making clean in crypto\rand2key
+       @echo Making clean in crypto\krb\rand2key
        $(MAKE) -$(MFLAGS) clean
        cd ..\old
-       @echo Making clean in crypto\old
+       @echo Making clean in crypto\krb\old
        $(MAKE) -$(MFLAGS) clean
        cd ..\raw
-       @echo Making clean in crypto\raw
+       @echo Making clean in crypto\krb\raw
        $(MAKE) -$(MFLAGS) clean
        cd ..\prng
-       @echo Making clean in crypto\prng
+       @echo Making clean in crypto\krb\prng
        $(MAKE) -$(MFLAGS) clean
        cd ..
+       @echo Making clean in crypto\krb
 
 check-windows::
        cd arcfour
-       @echo Making in check crypto\arcfour
+       @echo Making in check crypto\krb\arcfour
        $(MAKE) -$(MFLAGS) check
        cd ..\crc32
-       @echo Making in check crypto\crc32
+       @echo Making in check crypto\krb\crc32
        $(MAKE) -$(MFLAGS) check
        cd ..\checksum
-       @echo Making check in crypto\checksum
+       @echo Making check in crypto\krb\checksum
        $(MAKE) -$(MFLAGS) check
        cd ..\dk
-       @echo Making check in crypto\dk
+       @echo Making check in crypto\krb\dk
        $(MAKE) -$(MFLAGS) check
        cd ..\prf
-       @echo Making check in crypto\prf
+       @echo Making check in crypto\krb\prf
        $(MAKE) -$(MFLAGS) check
        cd ..\rand2key
-       @echo Making check in crypto\rand2key
+       @echo Making check in crypto\krb\rand2key
        $(MAKE) -$(MFLAGS) check
        cd ..\old
-       @echo Making check in crypto\old
+       @echo Making check in crypto\krb\old
        $(MAKE) -$(MFLAGS) check
        cd ..\raw
-       @echo Making check in crypto\raw
+       @echo Making check in crypto\krb\raw
        $(MAKE) -$(MFLAGS) check
        cd ..\prng
-       @echo Making check in crypto\prng
+       @echo Making check in crypto\krb\prng
        $(MAKE) -$(MFLAGS) check
        cd ..
+       @echo Making check in crypto\krb
 
 
 @lib_frag@
index bd234faffb43db938469e4204e7c9c9383bda75b..f3f0a9bb02c3846f27d2dc2f2b0f1e2c02f85806 100644 (file)
@@ -1,12 +1,12 @@
 mydir=lib/crypto/krb/arcfour
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../@CRYPTO_IMPL@ \
-       -I$(srcdir)/../../@CRYPTO_IMPL@/md4
+LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../$(CRYPTO_IMPL) \
+       -I$(srcdir)/../../$(CRYPTO_IMPL)/md4
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=arcfour
-##DOS##OBJFILE=..\$(OUTPRE)arcfour.lst
+##DOS##PREFIXDIR = krb\arcfour
+##DOS##OBJFILE = ..\..\$(OUTPRE)arcfour.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 826afd189d760b7dee5ccc3b36f424922fc1d95e..65a8cbcf4d8eacebec33cff825df5450dfb8af02 100644 (file)
@@ -4,15 +4,15 @@ LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../arcfour
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=checksum
-##DOS##OBJFILE=..\$(OUTPRE)cksum.lst
+##DOS##PREFIXDIR = krb\checksum
+##DOS##OBJFILE = ..\..\$(OUTPRE)checksum.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
 STLIBOBJS= cbc.o cmac.o confounder.o hmac_md5.o unkeyed.o
 
-OBJS=  $(OUTPRE)cbc.$(OBJEXT) $(OUTPRE)cmac.$(OBJECT) \
+OBJS=  $(OUTPRE)cbc.$(OBJEXT) $(OUTPRE)cmac.$(OBJEXT) \
        $(OUTPRE)confounder.$(OBJEXT) $(OUTPRE)hmac_md5.$(OBJEXT) \
        $(OUTPRE)unkeyed.$(OBJEXT)
 
index b34f3aa720f7be49768cd70ae359c5345ab1dd3c..d46c739626e4ddf98c6b6fc42169c0f8c9ed743d 100644 (file)
@@ -3,8 +3,8 @@ BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=crc32
-##DOS##OBJFILE=..\$(OUTPRE)crc32.lst
+##DOS##PREFIXDIR = krb\crc32
+##DOS##OBJFILE = ..\..\$(OUTPRE)crc32.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index cd804bc6d97822817b37cacd77c42b29377a254f..0a710110c1a6de0b967be46ffcccbd02f7e23676 100644 (file)
@@ -1,11 +1,11 @@
 mydir=lib/crypto/krb/dk
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/..  -I$(srcdir)/../../@CRYPTO_IMPL@
+LOCALINCLUDES = -I$(srcdir)/..  -I$(srcdir)/../../$(CRYPTO_IMPL)
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=dk
-##DOS##OBJFILE=..\$(OUTPRE)dk.lst
+##DOS##PREFIXDIR = krb\dk
+##DOS##OBJFILE = ..\..\$(OUTPRE)dk.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index cc3c7f602b2e78fea725588815de3c363e828f72..0f21070cf5fa2709d424e2cf10c0e65075516964 100644 (file)
@@ -1,11 +1,11 @@
 mydir=lib/crypto/krb/old
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/../../@CRYPTO_IMPL@/des -I$(srcdir)/.. -I$(srcdir)
+LOCALINCLUDES = -I$(srcdir)/../../$(CRYPTO_IMPL)/des -I$(srcdir)/.. -I$(srcdir)
 DEFS=
 
-##DOS##BUILDTOP = ..\..\..
-##DOS##PREFIXDIR=old
-##DOS##OBJFILE=..\$(OUTPRE)old.lst
+##DOS##BUILDTOP = ..\..\..\..
+##DOS##PREFIXDIR = krb\old
+##DOS##OBJFILE = ..\..\$(OUTPRE)old.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index a0e1ad6b10c061f4e5f5614901a630d60796cdca..c2f412d8eafbe683966e3e6d9ee466319dd2e261 100644 (file)
@@ -2,14 +2,14 @@ mydir=lib/crypto/krb/prf
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/..             \
                -I$(srcdir)/../dk                       \
-               -I$(srcdir)/../../@CRYPTO_IMPL@         \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/md5     \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/sha1 
+               -I$(srcdir)/../../$(CRYPTO_IMPL)        \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/md5    \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/sha1 
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=prf
-##DOS##OBJFILE=..\$(OUTPRE)prf.lst
+##DOS##PREFIXDIR = krb\prf
+##DOS##OBJFILE = ..\..\$(OUTPRE)prf.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 76a9388b86d78d8f8bc98ade1412f61c19c695cf..cef3710cfc6350ebb199271cd2c9755d172c5726 100644 (file)
@@ -1,16 +1,19 @@
 mydir=lib/crypto/krb/prng
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-SUBDIRS= @PRNG_ALG@
-LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/../../@CRYPTO_IMPL@/enc_provider \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/hash_provider                           \
-               -I$(srcdir)/@PRNG_ALG@                  \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/                \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/aes     \
-               -I$(srcdir)/../../@CRYPTO_IMPL@/sha1 -I$(srcdir)/../../@CRYPTO_IMPL@/sha2
+SUBDIRS= $(PRNG_ALG)
+LOCALINCLUDES = -I$(srcdir) -I$(srcdir)/../../$(CRYPTO_IMPL)/enc_provider \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/hash_provider                          \
+               -I$(srcdir)/$(PRNG_ALG)                         \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/               \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/aes    \
+               -I$(srcdir)/../../$(CRYPTO_IMPL)/sha1 -I$(srcdir)/../../$(CRYPTO_IMPL)/sha2
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
 
+##DOS##BUILDTOP = ..\..\..\..
+##DOS##PREFIXDIR = krb\prng
+##DOS##OBJFILE = ..\..\$(OUTPRE)prng.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
@@ -24,9 +27,11 @@ OBJS=\
 SRCS=\
        $(srcdir)/prng.c
 
-STOBJLISTS= OBJS.ST  @PRNG_ALG@/OBJS.ST 
+##DOS##LIBOBJS = $(OBJS)
 
-SUBDIROBJLISTS=  @PRNG_ALG@/OBJS.ST 
+STOBJLISTS= OBJS.ST  $(PRNG_ALG)/OBJS.ST 
+
+SUBDIROBJLISTS=  $(PRNG_ALG)/OBJS.ST 
 
 
 all-unix:: all-libobjs
@@ -36,6 +41,27 @@ depend:: $(SRCS)
 
 clean-unix:: clean-libobjs
 
+all-windows::
+       cd yarrow
+       @echo Making in crypto\krb\prng\yarrow
+       $(MAKE) -$(MFLAGS)
+       cd ..
+       @echo Making in crypto\krb\prng
+
+clean-windows::
+       cd yarrow
+       @echo Making clean in crypto\krb\prng\yarrow
+       $(MAKE) -$(MFLAGS) clean
+       cd ..
+       @echo Making clean in crypto\krb\prng
+
+check-windows::
+       cd yarrow
+       @echo Making check in crypto\krb\prng\yarrow
+       $(MAKE) -$(MFLAGS) check
+       cd ..
+       @echo Making check in crypto\krb\prng
+
 @lib_frag@
 @libobj_frag@
 
index fd66e08c33144c247466c45a360420056a288984..367eb017424e95d2b1ca411a526c2495009fc60f 100644 (file)
@@ -1,10 +1,10 @@
 mydir=lib/crypto/krb/prng/fortuna
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@              \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@/sha2         \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@/aes  \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@/enc_provider
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)             \
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)/sha2        \
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)/aes         \
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)/enc_provider
 DEFS=
 RUN_SETUP = @KRB5_RUN_ENV@
 PROG_LIBPATH=-L$(TOPLIBD)
index 04fbd1957a962f9f456c9039ac4e87767a766a51..d6d29b932978295f200ce055477c6552bcb6e446 100644 (file)
@@ -2,7 +2,7 @@ mydir=lib/crypto/krb/prng/nss
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S)..
 CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@
 LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@ $(CRYPTO_IMPL_CFLAGS)
+               -I$(srcdir)/../../../$(CRYPTO_IMPL) $(CRYPTO_IMPL_CFLAGS)
 DEFS=
 
 PROG_LIBPATH=-L$(TOPLIBD)
index 40dd85aa037ea1d765b8ef31fe7b1d0c5f4ec22b..93d6bc44c0ac61509b5365df9c4ee4f1649cc013 100644 (file)
@@ -1,14 +1,14 @@
 mydir=lib/crypto/krb/prng/yarrow
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S)..
 LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@              \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@/sha1         \
-               -I$(srcdir)/../../../@CRYPTO_IMPL@/enc_provider
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)             \
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)/sha1        \
+               -I$(srcdir)/../../../$(CRYPTO_IMPL)/enc_provider
 DEFS=
 
-##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=yarrow
-##DOS##OBJFILE=..\$(OUTPRE)yarrow.lst
+##DOS##BUILDTOP = ..\..\..\..\..
+##DOS##PREFIXDIR = krb\prng\yarrow
+##DOS##OBJFILE = ..\..\..\$(OUTPRE)yarrow.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index adde89b94ec3242e1dffb0e6bc6b9412d08ef9a4..f6975d7d9ee3befb1b90940bc49c8ea3137b144e 100644 (file)
@@ -1,11 +1,11 @@
 mydir=lib/crypto/krb/rand2key
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/. -I$(srcdir)/../../@CRYPTO_IMPL@/des
+LOCALINCLUDES = -I$(srcdir)/. -I$(srcdir)/../../$(CRYPTO_IMPL)/des
 DEFS=
 
 ##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR=rand2key
-##DOS##OBJFILE=..\$(OUTPRE)rand2key.lst
+##DOS##PREFIXDIR = krb\rand2key
+##DOS##OBJFILE= ..\..\$(OUTPRE)rand2key.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index 147b1d52e67584f052be563598d93cab403384c8..a9c3b09d83690313cf72fb10815f230fdaa64d96 100644 (file)
@@ -1,11 +1,11 @@
 mydir=lib/crypto/krb/raw
 BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../@CRYPTO_IMPL@
+LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../$(CRYPTO_IMPL)
 DEFS=
 
-##DOS##BUILDTOP = ..\..\..
-##DOS##PREFIXDIR=raw
-##DOS##OBJFILE=..\$(OUTPRE)raw.lst
+##DOS##BUILDTOP = ..\..\..\..
+##DOS##PREFIXDIR = krb\raw
+##DOS##OBJFILE = ..\..\$(OUTPRE)raw.lst
 
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
index e4a0d58d07e8c4551b0ded0dd99e62882059d9f8..65482c915e061109ede5d30b35c26fbcd5bcc60c 100644 (file)
@@ -45,7 +45,7 @@ include_xom=@include_xom@
 ##DOS##include_stdint=rem
 ##DOS##include_inttypes=rem
 ##DOS##include_xom=rem
-gssapi.h: gssapi.hin $(BUILDTOP)/include/autoconf.h
+gssapi.h: gssapi.hin
        @echo "Creating gssapi.h" ; \
        h=gss$$$$; $(RM) $$h; \
        (echo "/* This is the gssapi.h prologue. */"; \
index efc68073da094d8b696ab3c33472304885ccaeb3..fbb7a48a1949b870958029111142cda4abc84673 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 #include "gssapiP_krb5.h"
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_copy_ccache(OM_uint32 *minor_status,
                         gss_cred_id_t *cred_handle,
                         const gss_OID desired_object,
index 07f0c97279fd6a934b9c67cb40d9df2d346c526f..636fc04db44c6952b03606cfacca63e8e9a56b4d 100644 (file)
@@ -27,7 +27,7 @@
  * $Id$
  */
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_get_tkt_flags(OM_uint32 *minor_status,
                           const gss_ctx_id_t context_handle,
                           const gss_OID desired_object,
index 1cb1c10625fbb9f47eac3b2bdcd2147290678256..a0e60be5e631fcf9b0b556be0fbde0cddea9c109 100644 (file)
@@ -1003,7 +1003,7 @@ kg_compose_deleg_cred(OM_uint32 *minor_status,
 #define GSS_KRB5_GET_TKT_FLAGS_OID_LENGTH 11
 #define GSS_KRB5_GET_TKT_FLAGS_OID "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x05\x01"
 
-OM_uint32 KRB5_CALLCONV gss_krb5int_get_tkt_flags
+OM_uint32 gss_krb5int_get_tkt_flags
 (OM_uint32 *minor_status,
  const gss_ctx_id_t context_handle,
  const gss_OID desired_object,
@@ -1012,7 +1012,7 @@ OM_uint32 KRB5_CALLCONV gss_krb5int_get_tkt_flags
 #define GSS_KRB5_COPY_CCACHE_OID_LENGTH 11
 #define GSS_KRB5_COPY_CCACHE_OID "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x05\x02"
 
-OM_uint32 KRB5_CALLCONV gss_krb5int_copy_ccache
+OM_uint32 gss_krb5int_copy_ccache
 (OM_uint32 *minor_status,
  gss_cred_id_t *cred_handle,
  const gss_OID desired_oid,
@@ -1026,11 +1026,9 @@ struct krb5_gss_ccache_name_req {
     const char **out_name;
 };
 
-OM_uint32 KRB5_CALLCONV gss_krb5int_ccache_name
- (OM_uint32 *minor_status,
-  const gss_OID,
-  const gss_OID,
-  const gss_buffer_t);
+OM_uint32
+gss_krb5int_ccache_name(OM_uint32 *minor_status, const gss_OID, const gss_OID,
+                        const gss_buffer_t);
 
 #define GSS_KRB5_INQ_SSPI_SESSION_KEY_OID_LENGTH 11
 #define GSS_KRB5_INQ_SSPI_SESSION_KEY_OID "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x05\x05"
@@ -1046,7 +1044,7 @@ struct krb5_gss_set_allowable_enctypes_req {
     krb5_enctype *ktypes;
 };
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_set_allowable_enctypes(OM_uint32 *minor_status,
                                    gss_cred_id_t *cred,
                                    const gss_OID desired_oid,
@@ -1118,7 +1116,7 @@ struct krb5_gss_import_cred_req {
     krb5_keytab keytab;
 };
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_import_cred(OM_uint32 *minor_status,
                         gss_cred_id_t *cred,
                         const gss_OID desired_oid,
index 25534e56b616a7ff90246a921e32fb86589468f3..50d4e36dda5e699c231e937f3b0a144eddb7db6e 100644 (file)
@@ -590,10 +590,12 @@ static struct {
         {GSS_KRB5_FREE_LUCID_SEC_CONTEXT_OID_LENGTH, GSS_KRB5_FREE_LUCID_SEC_CONTEXT_OID},
         gss_krb5int_free_lucid_sec_context
     },
+#ifndef _WIN32
     {
         {GSS_KRB5_USE_KDC_CONTEXT_OID_LENGTH, GSS_KRB5_USE_KDC_CONTEXT_OID},
         krb5int_gss_use_kdc_context
     },
+#endif
 };
 
 static OM_uint32
index eb9dd83ca1605fc64baeb83d0f765506a83d23f7..bc3b7c7f921fa63e22ffae61b217cb5d6da22ed7 100644 (file)
@@ -298,6 +298,7 @@ krb5_gss_register_acceptor_identity(const char *keytab)
     return major_status;
 }
 
+#ifndef _WIN32
 krb5_error_code
 krb5_gss_use_kdc_context(void)
 {
@@ -327,6 +328,7 @@ krb5_gss_use_kdc_context(void)
 
     return ret;
 }
+#endif
 
 /*
  * This API should go away and be replaced with an accessor
index b1454cf71dd1cb17ada7de443879b094f14810e6..6fe069bdad7c24f4531edec387cb7b2c70c56e2e 100644 (file)
@@ -60,10 +60,10 @@ make_external_lucid_ctx_v1(
  * Exported routines
  */
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_export_lucid_sec_context(
     OM_uint32           *minor_status,
-    gss_ctx_id_t        context_handle,
+    const gss_ctx_id_t  context_handle,
     const gss_OID       desired_object,
     gss_buffer_set_t    *data_set)
 {
index de1c5a4db0a1cd39f509b9181cb8b8ec5eac51bf..0daf8b1356929fcaffbce4939dc7a74812e822be 100644 (file)
@@ -59,7 +59,7 @@
 #endif
 #include "gssapi_krb5.h"
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_set_allowable_enctypes(OM_uint32 *minor_status,
                                    gss_cred_id_t *cred_handle,
                                    const gss_OID desired_oid,
index 7d52608df4916d399798a9f17b26d5bcb45c92ad..4b6c89065f32fbfe748294e12ab073c43a24d4d0 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include "gssapiP_krb5.h"
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gss_krb5int_ccache_name(OM_uint32 *minor_status,
                         const gss_OID desired_mech,
                         const gss_OID desired_object,
index d23f32664d568c27dccaa176485172ddb6052e04..5f863e38b7877138a776b6969fa3b35a6361bc00 100644 (file)
@@ -91,7 +91,8 @@ testMechAttrsKnown(gss_const_OID_set critical,
     return 1;
 }
 
-OM_uint32 gss_indicate_mechs_by_attrs(
+OM_uint32 KRB5_CALLCONV
+gss_indicate_mechs_by_attrs(
       OM_uint32         *minor,
       gss_const_OID_set  desired_mech_attrs,
       gss_const_OID_set  except_mech_attrs,
@@ -154,7 +155,8 @@ cleanup:
     return status;
 }
 
-OM_uint32 gss_inquire_attrs_for_mech(
+OM_uint32 KRB5_CALLCONV
+gss_inquire_attrs_for_mech(
       OM_uint32         *minor,
       gss_const_OID      mech_oid,
       gss_OID_set       *mech_attrs,
@@ -213,7 +215,8 @@ OM_uint32 gss_inquire_attrs_for_mech(
     return GSS_S_COMPLETE;
 }
 
-OM_uint32 gss_display_mech_attr(
+OM_uint32 KRB5_CALLCONV
+gss_display_mech_attr(
       OM_uint32         *minor,
       gss_const_OID      mech_attr,
       gss_buffer_t       name,
index a68aca9edce4ddf451ff6e84cf5f1dd6ba51cb76..f87febfb233d98ebf03b803c5adbd9f217dbc3ea 100644 (file)
@@ -100,7 +100,7 @@ gss_str_to_oid(minor_status, oid_str, oid)
     return status;
 }
 
-OM_uint32 KRB5_CALLCONV
+OM_uint32
 gssint_copy_oid_set(
     OM_uint32 *minor_status,
     const gss_OID_set_desc * const oidset,
index 3b286ecd4edc175d21e87b0d98da4d2ac3237a02..f7de1d613a9d374074f3107edbcd429014b6f7b0 100644 (file)
@@ -53,14 +53,15 @@ val_store_cred_args(
 }
 
 
-OM_uint32 gss_store_cred(minor_status,
-                       input_cred_handle,
-                       cred_usage,
-                       desired_mech,
-                       overwrite_cred,
-                       default_cred,
-                       elements_stored,
-                       cred_usage_stored)
+OM_uint32 KRB5_CALLCONV
+gss_store_cred(minor_status,
+              input_cred_handle,
+              cred_usage,
+              desired_mech,
+              overwrite_cred,
+              default_cred,
+              elements_stored,
+              cred_usage_stored)
 
 OM_uint32              *minor_status;
 gss_cred_id_t           input_cred_handle;
index 63d89c771700fbbf6defed0e405be778d3dfc13f..3524ceae4840e2d77453d14bc677a4801023bf99 100644 (file)
@@ -727,18 +727,6 @@ gssint_userok(
        int *                   /* user_ok */
 );
 
-OM_uint32
-gss_store_cred(
-       OM_uint32 *,            /* minor_status */
-       const gss_cred_id_t,    /* input_cred_handle */
-       gss_cred_usage_t,       /* cred_usage */
-       const gss_OID,          /* desired_mech */
-       OM_uint32,              /* overwrite_cred */
-       OM_uint32,              /* default_cred */
-       gss_OID_set *,          /* elements_stored */
-       gss_cred_usage_t *      /* cred_usage_stored */
-);
-
 int
 gssint_get_der_length(
        unsigned char **,       /* buf */
index 50f05678d62a4db74c29451276cf893d00235460..3c2edbbdde6a8611f1b4b138392baf0023c8db5f 100644 (file)
@@ -13,7 +13,6 @@ extern "C" {
 #endif
 
 #include <gssapi/gssapi.h>
-#include <syslog.h>
 
 #define        SEC_CONTEXT_TOKEN 1
 #define        SPNEGO_SIZE_OF_INT 4
index 519050a14203bd7cd025622814c625903e257117..78471466964f2d67c8091987c4f4d9402edbf121 100644 (file)
@@ -61,8 +61,6 @@
  */
 /* #pragma ident       "@(#)spnego_mech.c      1.7     04/09/28 SMI" */
 
-#include       <sys/param.h>
-#include       <unistd.h>
 #include       <assert.h>
 #include       <stdio.h>
 #include       <stdlib.h>
@@ -2417,7 +2415,7 @@ spnego_gss_complete_auth_token(
 OM_uint32
 spnego_gss_acquire_cred_impersonate_name(OM_uint32 *minor_status,
                                         const gss_cred_id_t impersonator_cred_handle,
-                                        gss_name_t desired_name,
+                                        const gss_name_t desired_name,
                                         OM_uint32 time_req,
                                         gss_OID_set desired_mechs,
                                         gss_cred_usage_t cred_usage,
index fa36f51ed8473fc2e5e60c82eb55002010cdcff3..96dbae42163008b3c56065f07d330cba63d779f9 100644 (file)
@@ -97,3 +97,74 @@ EXPORTS
         gss_mech_set_krb5_both                 @43     DATA
        GSS_KRB5_NT_PRINCIPAL_NAME      @8      DATA
        gss_mech_krb5_wrong             @41     DATA    
+
+; Added in krb5 1.7-1.9
+       gss_acquire_cred_impersonate_name
+       gss_acquire_cred_with_password
+       gss_add_buffer_set_member
+       gss_add_cred_impersonate_name
+       gss_complete_auth_token
+       gss_create_empty_buffer_set
+       gss_delete_name_attribute
+       gss_display_mech_attr
+       gss_display_name_ext
+       gss_export_name_composite
+       gss_get_name_attribute
+       gss_indicate_mechs_by_attrs
+       gss_inquire_attrs_for_mech
+       gss_inquire_cred_by_oid
+       gss_inquire_mech_for_saslname
+       gss_inquire_name
+       gss_inquire_saslname_for_mech
+       gss_inquire_sec_context_by_oid
+       gsskrb5_extract_authtime_from_sec_context
+       gsskrb5_extract_authz_data_from_sec_context
+       gss_krb5_import_cred
+       gss_krb5_set_cred_rcache
+       gss_map_name_to_any
+       gss_pseudo_random
+       gss_release_any_name_mapping
+       gss_release_buffer_set
+       gss_release_iov_buffer
+       gss_set_cred_option
+       gss_set_name_attribute
+       gss_set_neg_mechs
+       gss_set_sec_context_option
+       gss_store_cred
+       gss_unwrap_aead
+       gss_unwrap_iov
+       gss_wrap_aead
+       gss_wrap_iov
+       gss_wrap_iov_length
+
+       GSS_C_INQ_SSPI_SESSION_KEY              DATA
+       GSS_C_MA_AUTH_INIT                      DATA
+       GSS_C_MA_AUTH_INIT_ANON                 DATA
+       GSS_C_MA_AUTH_INIT_INIT                 DATA
+       GSS_C_MA_AUTH_TARG                      DATA
+       GSS_C_MA_AUTH_TARG_ANON                 DATA
+       GSS_C_MA_AUTH_TARG_INIT                 DATA
+       GSS_C_MA_CBINDINGS                      DATA
+       GSS_C_MA_COMPRESS                       DATA
+       GSS_C_MA_CONF_PROT                      DATA
+       GSS_C_MA_CTX_TRANS                      DATA
+       GSS_C_MA_DELEG_CRED                     DATA
+       GSS_C_MA_DEPRECATED                     DATA
+       GSS_C_MA_INTEG_PROT                     DATA
+       GSS_C_MA_ITOK_FRAMED                    DATA
+       GSS_C_MA_MECH_COMPOSITE                 DATA
+       GSS_C_MA_MECH_CONCRETE                  DATA
+       GSS_C_MA_MECH_GLUE                      DATA
+       GSS_C_MA_MECH_NEGO                      DATA
+       GSS_C_MA_MECH_PSEUDO                    DATA
+       GSS_C_MA_MIC                            DATA
+       GSS_C_MA_NOT_DFLT_MECH                  DATA
+       GSS_C_MA_NOT_MECH                       DATA
+       GSS_C_MA_OOS_DET                        DATA
+       GSS_C_MA_PFS                            DATA
+       GSS_C_MA_PROT_READY                     DATA
+       GSS_C_MA_REPLAY_DET                     DATA
+       GSS_C_MA_WRAP                           DATA
+       gss_mech_iakerb                         DATA
+       gss_nt_exported_name                    DATA
+       gss_nt_service_name_v2                  DATA
index 7aeb6bfe585191d6ea3c80c5373ef561459e4578..af5c659286e248cc8c104bf1602bd55a01fc9e2e 100644 (file)
@@ -1242,7 +1242,7 @@ krb5_error_code decode_krb5_iakerb_finished
     cleanup(free);
 }
 
-krb5_error_code
+krb5_error_code KRB5_CALLCONV
 krb5int_get_authdata_containee_types(krb5_context context,
                                      const krb5_authdata *authdata,
                                      unsigned int *num,
index 8c6677e2549d2545b5e7881171f6610c3ed03fb0..677a1971ee16bb9ae7bb38a235baf8e88866f6f5 100644 (file)
@@ -159,7 +159,7 @@ krb5_ktfileint_find_slot(krb5_context, krb5_keytab, krb5_int32 *,
  * initialized with file keytab routines.
  */
 
-static krb5_error_code
+static krb5_error_code KRB5_CALLCONV
 krb5_ktfile_resolve(krb5_context context, const char *name,
                     krb5_keytab *id_out)
 {
index 0737a2e533236da12e40c65ea5a012093e67e415..d4db454d4babe9e322ade898c4f14700e08b64ee 100644 (file)
@@ -115,6 +115,7 @@ STLIBOBJS= \
 OBJS=  $(OUTPRE)addr_comp.$(OBJEXT)    \
        $(OUTPRE)addr_order.$(OBJEXT)   \
        $(OUTPRE)addr_srch.$(OBJEXT)    \
+       $(OUTPRE)allow_weak.$(OBJEXT)   \
        $(OUTPRE)appdefault.$(OBJEXT)   \
        $(OUTPRE)auth_con.$(OBJEXT)     \
        $(OUTPRE)authdata.$(OBJEXT)     \
index 5efb371050fcc0f1a467caa5fc82c09225d67b56..65c87667d73921ac292f3087070112ae7108d7a2 100644 (file)
@@ -601,7 +601,7 @@ krb5_auth_con_get_subkey_enctype(krb5_context context,
     return 0;
 }
 
-krb5_error_code KRB5_CALLCONV
+krb5_error_code
 krb5_auth_con_get_authdata_context(krb5_context context,
                                    krb5_auth_context auth_context,
                                    krb5_authdata_context *ad_context)
@@ -610,7 +610,7 @@ krb5_auth_con_get_authdata_context(krb5_context context,
     return 0;
 }
 
-krb5_error_code KRB5_CALLCONV
+krb5_error_code
 krb5_auth_con_set_authdata_context(krb5_context context,
                                    krb5_auth_context auth_context,
                                    krb5_authdata_context ad_context)
index ac28598603c1e4a48a4ce4abfa68f7a40e201ce4..8fb22c6ed188e57b660ea59cade6bf841c864135 100644 (file)
@@ -1143,7 +1143,7 @@ krb5_tkt_creds_free(krb5_context context, krb5_tkt_creds_context ctx)
     free(ctx);
 }
 
-krb5_error_code
+krb5_error_code KRB5_CALLCONV
 krb5_tkt_creds_get(krb5_context context, krb5_tkt_creds_context ctx)
 {
     krb5_error_code code;
index 6a8cdd5225d7ade0af1b5737a44e584ef2b0db90..476a513bbd0f061270575790d26017ee019dc844 100644 (file)
@@ -808,7 +808,8 @@ krb5_free_etype_list(krb5_context context,
         free(etypes);
     }
 }
-void krb5_free_fast_req(krb5_context context, krb5_fast_req *val)
+void KRB5_CALLCONV
+krb5_free_fast_req(krb5_context context, krb5_fast_req *val)
 {
     if (val == NULL)
         return;
@@ -816,7 +817,8 @@ void krb5_free_fast_req(krb5_context context, krb5_fast_req *val)
     free(val);
 }
 
-void krb5_free_fast_armor(krb5_context context, krb5_fast_armor *val)
+void KRB5_CALLCONV
+krb5_free_fast_armor(krb5_context context, krb5_fast_armor *val)
 {
     if (val == NULL)
         return;
@@ -824,7 +826,8 @@ void krb5_free_fast_armor(krb5_context context, krb5_fast_armor *val)
     free(val);
 }
 
-void krb5_free_fast_response(krb5_context context, krb5_fast_response *val)
+void KRB5_CALLCONV
+krb5_free_fast_response(krb5_context context, krb5_fast_response *val)
 {
     if (!val)
         return;
@@ -834,8 +837,8 @@ void krb5_free_fast_response(krb5_context context, krb5_fast_response *val)
     free(val);
 }
 
-void krb5_free_fast_finished
-(krb5_context context, krb5_fast_finished *val)
+void KRB5_CALLCONV
+krb5_free_fast_finished(krb5_context context, krb5_fast_finished *val)
 {
     if (!val)
         return;
@@ -844,7 +847,8 @@ void krb5_free_fast_finished
     free(val);
 }
 
-void krb5_free_typed_data(krb5_context context, krb5_typed_data **in)
+void
+krb5_free_typed_data(krb5_context context, krb5_typed_data **in)
 {
     int i = 0;
     if (in == NULL) return;
@@ -857,8 +861,8 @@ void krb5_free_typed_data(krb5_context context, krb5_typed_data **in)
     free(in);
 }
 
-void krb5_free_fast_armored_req(krb5_context context,
-                                krb5_fast_armored_req *val)
+void KRB5_CALLCONV
+krb5_free_fast_armored_req(krb5_context context, krb5_fast_armored_req *val)
 {
     if (val == NULL)
         return;
index 96a022f4df1e5b4a861961093d3165617598acf6..5c4e21d6a00a7f9f978764ff8415ce15fd641ebc 100644 (file)
@@ -371,7 +371,7 @@ krb5_get_fallback_host_realm(krb5_context context,
  * Common code for krb5_get_host_realm and krb5_get_fallback_host_realm
  * to do basic sanity checks on supplied hostname.
  */
-krb5_error_code KRB5_CALLCONV
+krb5_error_code
 krb5int_clean_hostname(krb5_context context,
                        const char *host, char *local_host, size_t lhsize)
 {
index 569c9ff170c5aa02acd191bfed8c395c61a33eb3..a7e236e25a83f13fe74c409726ac8a20ac5bd2fa 100644 (file)
@@ -12,7 +12,6 @@
 ; PRIVATE   - Private entrypoint.  It should not be called by anything other
 ;             than gssapi32.dll or krb4_32.dll.
 ; GSSAPI    - Private entrypoint used by gssapi32.dll.
-; KRB4      - Private entrypoint used by krb4_32.dll.
 ; KRB5_CALLCONV_WRONG - entrypoint that should have used KRB5_CALLCONV, but
 ;                       did not due to developer error
 
@@ -258,17 +257,6 @@ EXPORTS
        krb5int_accessor                        @267    ; INTERNAL (to end all internals)
 
 
-; Temporary exports (DO NOT USE)
-; DO NOT USE -- Currently required for krb4_32.dll
-;      des_ecb_encrypt                         @3      ; PRIVATE KRB4
-;      des_new_random_key                      @6      ; PRIVATE KRB4
-;      des_key_sched                           @5      ; PRIVATE KRB4
-;      des_pcbc_encrypt                        @7      ; PRIVATE KRB4
-;      des_quad_cksum                          @8      ; PRIVATE KRB4
-;      des_string_to_key                       @9      ; PRIVATE KRB4
-;      des_init_random_number_generator        @4      ; PRIVATE KRB4
-;      afs_string_to_key                       @1      ; PRIVATE KRB4
-
 ; DO NOT USE -- Currently required to implement gssapi32.dll
        decode_krb5_ap_req                      @2      ; PRIVATE GSSAPI k5-int.h KRB5_CALLCONV_WRONG
        krb5_externalize_opaque                 @114    ; PRIVATE GSSAPI k5-int.h
@@ -300,7 +288,7 @@ EXPORTS
        krb5_free_error_message                 @134
        krb5_clear_error_message                @94
 
-; new in 1.7
+; new in 1.7-1.9
        krb5_rd_rep_dce
        krb5_mk_rep_dce
        krb5_c_padding_length
@@ -309,3 +297,111 @@ EXPORTS
        krb5_c_decrypt_iov
        krb5_c_make_checksum_iov
        krb5_c_verify_checksum_iov
+       krb5_allow_weak_crypto
+       krb5_anonymous_principal
+       krb5_anonymous_realm
+       krb5_auth_con_getkey_k
+       krb5_auth_con_getrecvsubkey_k
+       krb5_auth_con_getsendsubkey_k
+       krb5_auth_con_setrecvsubkey_k
+       krb5_auth_con_setsendsubkey_k
+       krb5_build_principal_alloc_va
+       krb5_c_crypto_length_iov
+       krb5_c_free_state
+       krb5_c_fx_cf2_simple
+       krb5_c_init_state
+       krb5_c_keylengths
+       krb5_c_random_add_entropy
+       krb5_c_random_os_entropy
+       krb5_c_random_to_key
+       krb5_cc_dup
+       krb5_cc_get_config
+       krb5_cc_set_config
+       krb5_copy_error_message
+       krb5_decode_authdata_container
+       krb5_encode_authdata_container
+       krb5_enctype_to_name
+       krb5_get_fallback_host_realm
+       krb5_get_init_creds_opt_get_fast_flags
+       krb5_get_init_creds_opt_set_anonymous
+       krb5_get_init_creds_opt_set_canonicalize
+       krb5_get_init_creds_opt_set_expire_callback
+       krb5_get_init_creds_opt_set_fast_ccache
+       krb5_get_init_creds_opt_set_fast_ccache_name
+       krb5_get_init_creds_opt_set_fast_flags
+       krb5_get_init_creds_opt_set_out_ccache
+       krb5_init_creds_free
+       krb5_init_creds_get
+       krb5_init_creds_get_creds
+       krb5_init_creds_get_error
+       krb5_init_creds_get_times
+       krb5_init_creds_init
+       krb5_init_creds_set_keytab
+       krb5_init_creds_set_password
+       krb5_init_creds_set_service
+       krb5_init_creds_step
+       krb5_is_config_principal
+       krb5_k_create_key
+       krb5_k_decrypt
+       krb5_k_decrypt_iov
+       krb5_k_encrypt
+       krb5_k_encrypt_iov
+       krb5_k_free_key
+       krb5_k_key_enctype
+       krb5_k_key_keyblock
+       krb5_k_make_checksum
+       krb5_k_make_checksum_iov
+       krb5_k_prf
+       krb5_k_reference_key
+       krb5_k_verify_checksum
+       krb5_k_verify_checksum_iov
+       krb5_make_authdata_kdc_issued
+       krb5_merge_authdata
+       krb5_pac_add_buffer
+       krb5_pac_free
+       krb5_pac_get_buffer
+       krb5_pac_get_types
+       krb5_pac_init
+       krb5_pac_parse
+       krb5_pac_verify
+       krb5_parse_name_flags
+       krb5_principal_compare_any_realm
+       krb5_principal_compare_flags
+       krb5_tkt_creds_free
+       krb5_tkt_creds_get
+       krb5_tkt_creds_get_creds
+       krb5_tkt_creds_get_times
+       krb5_tkt_creds_init
+       krb5_tkt_creds_step
+       krb5_unparse_name_flags
+       krb5_unparse_name_flags_ext
+       krb5_verify_authdata_kdc_issued
+
+; More internal symbols used by gssapi
+       decode_krb5_error                               ; PRIVATE GSSAPI
+       decode_krb5_iakerb_finished                     ; PRIVATE GSSAPI
+       decode_krb5_iakerb_header                       ; PRIVATE GSSAPI
+       encode_krb5_iakerb_finished                     ; PRIVATE GSSAPI
+       encode_krb5_iakerb_header                       ; PRIVATE GSSAPI
+       encode_krb5_ticket                              ; PRIVATE GSSAPI
+       krb5_auth_con_get_authdata_context              ; PRIVATE GSSAPI
+       krb5_auth_con_set_authdata_context              ; PRIVATE GSSAPI
+       krb5_authdata_context_copy                      ; PRIVATE GSSAPI
+       krb5_authdata_context_free                      ; PRIVATE GSSAPI
+       krb5_authdata_context_init                      ; PRIVATE GSSAPI
+       krb5_authdata_delete_attribute                  ; PRIVATE GSSAPI
+       krb5_authdata_export_attributes                 ; PRIVATE GSSAPI
+       krb5_authdata_export_authdata                   ; PRIVATE GSSAPI
+       krb5_authdata_export_internal                   ; PRIVATE GSSAPI
+       krb5_authdata_free_internal                     ; PRIVATE GSSAPI
+       krb5_authdata_get_attribute                     ; PRIVATE GSSAPI
+       krb5_authdata_get_attribute_types               ; PRIVATE GSSAPI
+       krb5_authdata_import_attributes                 ; PRIVATE GSSAPI
+       krb5_authdata_set_attribute                     ; PRIVATE GSSAPI
+       krb5_free_iakerb_finished                       ; PRIVATE GSSAPI
+       krb5_free_iakerb_header                         ; PRIVATE GSSAPI
+       krb5_get_credentials_for_user                   ; PRIVATE GSSAPI
+       krb5_get_credentials_for_proxy                  ; PRIVATE GSSAPI
+       krb5_sendto_kdc                                 ; PRIVATE GSSAPI
+       krb5int_copy_data_contents_add0                 ; PRIVATE GSSAPI
+       krb5int_free_data_list                          ; PRIVATE GSSAPI
index b18178e1c7a4eb66d89302af2a480e26ba70cc96..3d6dd7206f9c4b559b8165d0468fa04348123fbf 100644 (file)
@@ -1,12 +1,5 @@
-#ifdef KRB4
-#include <kerberosIV/krb.h>
-#endif
 #include "k5-int.h"
 
-#ifdef KRB4
-#include <kerberosIV/krb_err.h>
-#include <kerberosIV/kadm_err.h>
-#endif
 #ifdef KRB5
 #include "krb5_err.h"
 #include "kv5m_err.h"
@@ -374,24 +367,13 @@ control(int mode)
        profile_library_finalizer();
        break;
     }
-#elif defined KRB4
-    switch (mode){
-    case DLL_STARTUP:
-      add_error_table(&et_krb_error_table);
-      add_error_table(&et_kadm_error_table);
-      break;
-    case DLL_SHUTDOWN:
-      remove_error_table(&et_krb_error_table);
-      remove_error_table(&et_kadm_error_table);
-      break;
-    }
 #elif defined GSSAPI
     switch (mode) {
     case DLL_STARTUP:
-       gssint_lib_init__auxinit();
+       gssint_mechglue_init__auxinit();
        break;
     case DLL_SHUTDOWN:
-       gssint_lib_fini();
+       gssint_mechglue_fini();
        break;
     }
 #elif defined COMERR
index 33a1321b76d78b04dc0f18c6a08b62987eaa1393..b857d435ceb5ecc8a9bca7b4ab662923a54beef2 100644 (file)
@@ -105,8 +105,12 @@ $(OUTPRE)test_profile.exe:
        $(CC) $(CFLAGS2) -o test_profile.exe test_profile.c prof_init.c \
                prof_file.c prof_parse.c prof_tree.c /link /stack:16384
 
+##DOS##!if 0
 profile.h: prof_err.h profile.hin
        cat $(srcdir)/profile.hin prof_err.h > $@
+##DOS##!endif
+##DOS##profile.h: prof_err.h profile.hin
+##DOS##        copy /b profile.hin+prof_err.h $@
 
 prof_err.h: $(srcdir)/prof_err.et
 
index 85bd91227beabaa62e4e6263b375ad759f2ee486..8fab90b2905107f0cbd2c6518a57c712dcea4b8a 100644 (file)
@@ -9,7 +9,9 @@
 #endif
 #include <errno.h>
 #include <ctype.h>
+#ifndef _WIN32
 #include <dirent.h>
+#endif
 
 #define SECTION_SEP_CHAR '/'
 
@@ -239,6 +241,42 @@ static int valid_name(const char *filename)
  */
 static errcode_t parse_include_dir(char *dirname, struct parse_state *state)
 {
+#ifdef _WIN32
+    char *wildcard = NULL, *pathname;
+    WIN32_FIND_DATA ffd;
+    HANDLE handle;
+    errcode_t retval = 0;
+
+    if (asprintf(&wildcard, "%s\\*", dirname) < 0)
+        return ENOMEM;
+
+    handle = FindFirstFile(wildcard, &ffd);
+    if (handle == INVALID_HANDLE_VALUE) {
+        retval = PROF_FAIL_INCLUDE_DIR;
+        goto cleanup;
+    }
+
+    do {
+        if (!valid_name(ffd.cFileName))
+            continue;
+        if (asprintf(&pathname, "%s\\%s", dirname, ffd.cFileName) < 0) {
+            retval = ENOMEM;
+            break;
+        }
+        retval = parse_include_file(pathname, state);
+        free(pathname);
+        if (retval)
+            break;
+    } while (FindNextFile(handle, &ffd) != 0);
+
+    FindClose(handle);
+
+cleanup:
+    free(wildcard);
+    return retval;
+
+#else /* not _WIN32 */
+
     DIR     *dir;
     char    *pathname;
     errcode_t retval = 0;
@@ -261,6 +299,7 @@ static errcode_t parse_include_dir(char *dirname, struct parse_state *state)
     }
     closedir(dir);
     return retval;
+#endif /* not _WIN32 */
 }
 
 static errcode_t parse_line(char *line, struct parse_state *state)
index f1a46c0df29a052ce9e5fc53247512b98fbb6ea0..6447cf4c60259eabc80a17cea9370c833bea0cac 100644 (file)
@@ -4,19 +4,15 @@ NO_OUTPRE=1
 #
 # Makefile that recurses into cns subdirectory.
 #
-all-windows:: ntsecapitest
+all-windows::
        @echo Making in windows\lib
        cd lib
        $(MAKE) -$(MFLAGS)
        @echo Making in windows\cns
        cd ..\cns
        $(MAKE) -$(MFLAGS)
-       @echo Making in windows\wintel
-       cd ..\wintel
-       $(MAKE) -$(MFLAGS)
-       @echo Making in windows\gss
+       @echo Making in windows\gss
        cd ..\gss
-       cd
        $(MAKE) -$(MFLAGS)
        @echo Making in windows\gina
        cd ..\gina
@@ -28,22 +24,16 @@ all-windows:: ntsecapitest
         @echo Making in windows\kfwlogon
         cd ..\kfwlogon
         $(MAKE) -$(MFLAGS) 
-        @echo Making in windows\identity 
-        cd ..\identity 
-        $(MAKE) -$(MFLAGS) 
 !endif 
        cd ..
 
-clean-windows:: clean-ntsecapitest
+clean-windows::
        @echo Making clean in windows\lib
        cd lib
        $(MAKE) -$(MFLAGS) clean
        @echo Making clean in windows\cns
        cd ..\cns
        $(MAKE) -$(MFLAGS) clean
-       @echo Making clean in windows\wintel
-       cd ..\wintel
-       $(MAKE) -$(MFLAGS) clean
        @echo Making clean in windows\gss
        cd ..\gss
        $(MAKE) -$(MFLAGS) clean
@@ -57,20 +47,5 @@ clean-windows:: clean-ntsecapitest
         @echo Making clean in windows\kfwlogon
         cd ..\kfwlogon
         $(MAKE) -$(MFLAGS) clean 
-        @echo Making clean in windows\identity 
-        cd ..\identity 
-        $(MAKE) -$(MFLAGS) clean 
 !endif 
        cd ..
-
-# If ntsecapi.h contains the string that indicates it came from the Vista SDK,
-#  then ntsecapitest.i will be left behind.  If the string is not present,
-#  ntsecapitest.i will be deleted. 
-ntsecapitest:: ntsecapitest.i
-    ntsecapitest.pl
-
-clean-ntsecapitest::
-    $(RM) ntsecapitest.i
-
-{}.c{}.i:
-    @$(C_RULE) -P
index 0276b4350afd3060d72921f18cd181bdde30285a..47261f74673e9416c9b0dc98043e2fc86b6c6718 100644 (file)
@@ -1,14 +1,15 @@
               Building & Running Kerberos 5 on Windows
               ----------------------------------------
 
-Kerberos 5 builds on Windows with MSVC++ 6.0, MSVS.NET, and 
-MSVS.NET 2003.  You will need the XP SP2 Platform SDK or 
-later; this SDK is required to define getaddrinfo.  It may or 
-may not build with other compilers or make utilities.
+This file documents how to build the standalone source distribution of
+Kerberos 5 on Windows.  The MIT Kerberos for Windows distribution
+contains additional components not present in the Kerberos 5 source
+code.
 
-These build instructions assume that you have the standalone source
-distribution of Kerberos 5 rather than the MIT Kerberos for Windows
-distribution (which includes a working Kerberos 4).
+To build Kerberos 5 on Windows, you will need the Windows SDK (XP SP2
+or later) and a version of Perl installed in the command-line path.
+Current versions of the Windows SDK require the .NET framework to be
+installed.
 
 There are two methods for building a Windows version of Kerberos 5.
 The traditional method involves starting on a Unix machine and
@@ -16,24 +17,21 @@ creating a distribution that can be built on Windows.  The second
 method works from the sources that come from the Unix distribution if
 you have certain Unix-type utilities (see below).
 
+After the Windows SDK is installed, you should be able to invoke an
+SDK command prompt via the start menu (All Programs -> Microsoft
+Windows SDK vX.Y -> Windows SDK X.Y Command Prompt).  Within this
+window, you can change the build target using the setenv command; run
+"setenv /?" or see the Windows SDK documentation for details.  At the
+current time, Kerberos 5 can only be built for the x64 target if the
+host platform is also 64-bit, because it compiles and runs programs
+during the build.
+
 IMPORTANT NOTE: By default, the sources are built with debug
 information and linked against the debug version of the Microsoft C
 Runtime library, which is not found on most Windows systems unless
 they have development tools.  To build a release version, you need to
 define NODEBUG either in the environment or the nmake command-line.
 
-To configuring the build environment execute first the compiler
-batch file, vcvars32.bat or vsvars32.bat, followed by the SDK
-batch file, setenv.bat.  For example, 
-
-  "c:\program files\microsoft visual studio .net 2003\common7\tools\vsvars32.bat"
-  "c:\program files\microsoft sdk\setenv.bat" /2000 /RETAIL
-
-or 
-
-  "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat"
-  "c:\program files\microsoft sdk\setenv.bat" /2000 /DEBUG
-  
 DNS Support: To support DNS lookups, you will need to define
 KRB5_DNS_LOOKUP, KRB5_DNS_LOOKUP_KDC, or KRB5_DNS_LOOKUP_REALMS.  When 
 any of the KRB5_DNS_LOOKUP definitions are used, the default build will use
@@ -98,9 +96,11 @@ Running Kerberos 5 Apps:
 
 Make sure you have a valid krb5.ini file.  That will look just like a
 Unix krb5.conf file.  You can place this file in the same directory as
-your krb5_32.dll or in your Windows directory.  You should then be
-able to run the applications that are built.  Note that Kerberos 5
-will not look for the krb5.ini file in your path.
+your krb5_32.dll (this will be the bin subdirectory of your install
+directory, if you did not move the binaries) or in your Windows
+directory (typically "C:\Windows").  You should then be able to run
+the applications that are built.  Note that Kerberos 5 will not look
+for the krb5.ini file in your path.
 
 
 krb5.ini File:
@@ -290,14 +290,6 @@ with the Platform SDK/Samples/Security/SSPI/GSS/ samples which Microsoft has bee
 shipping as of January 2004.  Revised versions of these samples are available upon 
 request to krbdev@mit.edu.  
 
-Kerberos 4 Library Support:
----------------------------
-
-The krb4_32.dll that is built (but not installed) is not supported.
-If you need Kerberos 4, you can use the krbv4w32.dll that MIT
-distributes as part of the MIT Kerberos for Windows distribution.
-
-
 More Information:
 ----------------
 
index c1e33d28f05a8323a29ca8d90f72a54294a09cf3..24c32a035d53d79ef945670a573d6c8b4d147c9f 100644 (file)
@@ -687,11 +687,6 @@ sub main {
     system("rm -rf $out/a.tmp");                ## Clean up junk.
     system("rm -rf $out/ziptemp");              ## Clean up junk.
 
-    print "Now check for ntsecapitest.i.\n";
-    $dir    = "$wd\\athena\\auth\\krb5\\src\\windows";
-    chdir($dir)                                 or die "Fatal -- Couldn't cd to $dir";
-    print "Info -- chdir to ".`cd`."\n"         if ($verbose);
-
 # End logging:
     if ($odr->{logfile}->{def})   {$l->stop;}
 
diff --git a/src/windows/ntsecapitest.c b/src/windows/ntsecapitest.c
deleted file mode 100644 (file)
index 459e5db..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Simple program to show what is in ntsecapi.h.\r
-   Compile -P to generate preprocessor output.\r
- */\r
-\r
-#include "ntsecapi.h"\r
-\r
-#ifdef TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS\r
-VISTA_SDK_VERSION\r
-#else\r
-NT_SDK_VERSION\r
-#endif\r
diff --git a/src/windows/ntsecapitest.pl b/src/windows/ntsecapitest.pl
deleted file mode 100644 (file)
index c5306ea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!perl -w\r
-\r
-$filename = "ntsecapitest.i";\r
-$string = "VISTA_SDK_VERSION";\r
-\r
-if (system("grep $string $filename")) {\r
-    print "$string not found; deleting $filename.\n";\r
-    system("rm $filename");\r
-    }\r
-\r
-exit(0);
\ No newline at end of file