From ad888de48a064e11f4b88640ac27d4bd166f69dc Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 3 Dec 2010 00:05:44 +0000 Subject: [PATCH] pull up r24469, r24530, r24533, r24534, r24535, r24537 from trunk ------------------------------------------------------------------------ r24537 | ghudson | 2010-11-30 12:46:10 -0500 (Tue, 30 Nov 2010) | 5 lines ticket: 6826 Install gssapi_ext.h on Windows. Include gssapi_ext.h in the header files considered by def-check.pl in verify-calling-conventions-gssapi. ------------------------------------------------------------------------ r24535 | ghudson | 2010-11-26 11:37:14 -0500 (Fri, 26 Nov 2010) | 5 lines ticket: 6826 Supply static ordinals for new symbols in gssapi32.def and krb5_32.def, for consistency with KFW 3.x. ------------------------------------------------------------------------ r24534 | ghudson | 2010-11-25 15:34:06 -0500 (Thu, 25 Nov 2010) | 5 lines ticket: 6826 Fix how gssapi.h is rebuilt on Windows; accidentally omitted from r24533. ------------------------------------------------------------------------ r24533 | ghudson | 2010-11-25 15:28:30 -0500 (Thu, 25 Nov 2010) | 29 lines ticket: 6826 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. ------------------------------------------------------------------------ r24530 | ghudson | 2010-11-23 13:50:12 -0500 (Tue, 23 Nov 2010) | 3 lines Set svn:eol-style on some Windows files and remove the CRs from their repository representations. ------------------------------------------------------------------------ r24469 | ghudson | 2010-10-21 20:01:56 -0400 (Thu, 21 Oct 2010) | 3 lines Make it possible to override CRYPTO_IMPL_CFLAGS and CRYPTO_IMPL_LIBS at make time. ticket: 6826 version_fixed: 1.9 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@24553 dc483132-0cff-0310-8789-dd5450dbe970 --- src/Makefile.in | 226 +- src/appl/Makefile.in | 3 +- src/appl/gss-sample/Makefile.in | 2 +- src/appl/sample/Makefile.in | 2 +- src/appl/sample/sclient/Makefile.in | 2 +- src/appl/sample/sserver/Makefile.in | 2 +- src/appl/simple/Makefile.in | 2 +- src/appl/simple/client/Makefile.in | 2 +- src/appl/simple/server/Makefile.in | 2 +- src/appl/user_user/Makefile.in | 2 +- src/ccapi/Makefile.in | 30 +- src/ccapi/common/Makefile.in | 2 +- src/ccapi/common/unix/Makefile.in | 2 +- src/ccapi/lib/Makefile.in | 2 +- src/ccapi/lib/ccapi_context.c | 1 - src/ccapi/lib/ccapi_ipc.c | 7 - src/ccapi/lib/ccapi_ipc.h | 1 - src/ccapi/lib/ccapi_os_ipc.h | 1 - src/ccapi/lib/mac/ccapi_os_ipc.c | 8 - src/ccapi/lib/unix/Makefile.in | 2 +- src/ccapi/lib/win/Makefile.in | 238 +- src/ccapi/lib/win/WINCCAPI.sln | 40 +- src/ccapi/lib/win/WINCCAPI.vcproj | 222 +- src/ccapi/lib/win/ccapi_os_ipc.cxx | 7 - src/ccapi/lib/win/debug.exports | 23 +- src/ccapi/server/Makefile.in | 2 +- src/ccapi/server/unix/Makefile.in | 2 +- src/ccapi/server/win/Makefile.in | 218 +- src/ccapi/server/win/Server.sln | 40 +- src/ccapi/server/win/Server.vcproj | 454 ++-- src/ccapi/server/win/WorkItem.cpp | 252 +-- src/ccapi/server/win/WorkQueue.cpp | 121 +- src/ccapi/server/win/ccs_os_server.cpp | 1926 ++++++++--------- src/ccapi/test/Makefile.in | 38 +- src/ccapi/test/pingtest.c | 14 +- src/clients/Makefile.in | 48 +- src/clients/kdestroy/Makefile.in | 2 +- src/clients/kinit/Makefile.in | 2 +- src/clients/kinit/kinit.c | 2 + src/clients/klist/Makefile.in | 2 +- src/clients/klist/klist.c | 4 + src/clients/kpasswd/Makefile.in | 2 +- src/clients/ksu/Makefile.in | 2 +- src/clients/kvno/Makefile.in | 2 +- src/config/pre.in | 4 + src/config/win-post.in | 44 +- src/config/win-pre.in | 3 + src/include/Makefile.in | 5 +- src/include/k5-int.h | 6 +- src/include/win-mac.h | 7 +- src/kadmin/cli/Makefile.in | 2 +- src/kadmin/dbutil/Makefile.in | 2 +- src/kadmin/ktutil/Makefile.in | 2 +- src/kadmin/server/Makefile.in | 2 +- src/kadmin/testing/Makefile.in | 2 +- src/kadmin/testing/scripts/Makefile.in | 2 +- src/kadmin/testing/util/Makefile.in | 2 +- src/lib/Makefile.in | 63 +- src/lib/apputils/Makefile.in | 2 +- src/lib/crypto/Makefile.in | 72 +- src/lib/crypto/builtin/Makefile.in | 101 +- src/lib/crypto/builtin/aes/Makefile.in | 6 +- src/lib/crypto/builtin/camellia/Makefile.in | 6 +- src/lib/crypto/builtin/des/Makefile.in | 6 +- .../crypto/builtin/enc_provider/Makefile.in | 6 +- .../crypto/builtin/enc_provider/camellia.c | 2 + .../crypto/builtin/hash_provider/Makefile.in | 6 +- src/lib/crypto/builtin/md4/Makefile.in | 6 +- src/lib/crypto/builtin/md5/Makefile.in | 6 +- src/lib/crypto/builtin/sha1/Makefile.in | 6 +- src/lib/crypto/builtin/sha2/Makefile.in | 6 +- src/lib/crypto/crypto_tests/Makefile.in | 33 +- src/lib/crypto/krb/Makefile.in | 133 +- src/lib/crypto/krb/arcfour/Makefile.in | 10 +- src/lib/crypto/krb/checksum/Makefile.in | 8 +- src/lib/crypto/krb/crc32/Makefile.in | 6 +- src/lib/crypto/krb/dk/Makefile.in | 8 +- src/lib/crypto/krb/old/Makefile.in | 10 +- src/lib/crypto/krb/prf/Makefile.in | 12 +- src/lib/crypto/krb/prng/Makefile.in | 25 +- src/lib/crypto/krb/prng/fortuna/Makefile.in | 10 +- src/lib/crypto/krb/prng/nss/Makefile.in | 5 +- src/lib/crypto/krb/prng/yarrow/Makefile.in | 14 +- src/lib/crypto/krb/rand2key/Makefile.in | 8 +- src/lib/crypto/krb/raw/Makefile.in | 10 +- src/lib/crypto/nss/Makefile.in | 104 +- src/lib/crypto/nss/aes/Makefile.in | 13 +- src/lib/crypto/nss/camellia/Makefile.in | 13 +- src/lib/crypto/nss/des/Makefile.in | 18 +- src/lib/crypto/nss/enc_provider/Makefile.in | 11 +- src/lib/crypto/nss/hash_provider/Makefile.in | 11 +- src/lib/crypto/nss/md4/Makefile.in | 15 +- src/lib/crypto/nss/md5/Makefile.in | 17 +- src/lib/crypto/nss/sha1/Makefile.in | 13 +- src/lib/crypto/nss/sha2/Makefile.in | 13 +- src/lib/crypto/openssl/Makefile.in | 89 +- src/lib/crypto/openssl/aes/Makefile.in | 14 +- src/lib/crypto/openssl/camellia/Makefile.in | 13 +- src/lib/crypto/openssl/des/Makefile.in | 14 +- .../crypto/openssl/enc_provider/Makefile.in | 9 +- .../crypto/openssl/hash_provider/Makefile.in | 8 +- src/lib/crypto/openssl/md4/Makefile.in | 15 +- src/lib/crypto/openssl/md5/Makefile.in | 14 +- src/lib/crypto/openssl/sha1/Makefile.in | 10 +- src/lib/crypto/openssl/sha2/Makefile.in | 10 +- src/lib/gssapi/Makefile.in | 36 +- src/lib/gssapi/generic/Makefile.in | 8 +- src/lib/gssapi/krb5/Makefile.in | 5 +- src/lib/gssapi/krb5/copy_ccache.c | 2 +- src/lib/gssapi/krb5/get_tkt_flags.c | 2 +- src/lib/gssapi/krb5/gssapiP_krb5.h | 16 +- src/lib/gssapi/krb5/gssapi_krb5.c | 2 + src/lib/gssapi/krb5/krb5_gss_glue.c | 2 + src/lib/gssapi/krb5/lucid_context.c | 4 +- src/lib/gssapi/krb5/set_allowable_enctypes.c | 2 +- src/lib/gssapi/krb5/set_ccache.c | 2 +- src/lib/gssapi/mechglue/Makefile.in | 2 +- src/lib/gssapi/mechglue/g_mechattr.c | 9 +- src/lib/gssapi/mechglue/g_oid_ops.c | 2 +- src/lib/gssapi/mechglue/g_store_cred.c | 17 +- src/lib/gssapi/mechglue/mglueP.h | 12 - src/lib/gssapi/spnego/Makefile.in | 2 +- src/lib/gssapi/spnego/gssapiP_spnego.h | 1 - src/lib/gssapi/spnego/spnego_mech.c | 4 +- src/lib/gssapi32.def | 71 + src/lib/kadm5/Makefile.in | 2 +- src/lib/kadm5/clnt/Makefile.in | 2 +- src/lib/kadm5/srv/Makefile.in | 2 +- src/lib/kadm5/unit-test/Makefile.in | 2 +- src/lib/kdb/Makefile.in | 2 +- src/lib/krb5/Makefile.in | 64 +- src/lib/krb5/asn.1/Makefile.in | 2 +- src/lib/krb5/asn.1/krb5_decode.c | 2 +- src/lib/krb5/ccache/Makefile.in | 2 +- src/lib/krb5/ccache/ccapi/Makefile.in | 2 +- src/lib/krb5/error_tables/Makefile.in | 2 +- src/lib/krb5/keytab/Makefile.in | 2 +- src/lib/krb5/krb/Makefile.in | 3 +- src/lib/krb5/krb/auth_con.c | 4 +- src/lib/krb5/krb/get_creds.c | 2 +- src/lib/krb5/krb/kfree.c | 20 +- src/lib/krb5/os/Makefile.in | 2 +- src/lib/krb5/os/hst_realm.c | 2 +- src/lib/krb5/rcache/Makefile.in | 2 +- src/lib/krb5/unicode/Makefile.in | 2 +- src/lib/krb5_32.def | 138 +- src/lib/rpc/Makefile.in | 2 +- src/lib/rpc/unit-test/Makefile.in | 2 +- src/lib/win_glue.c | 22 +- src/plugins/authdata/greet/Makefile.in | 2 +- src/plugins/authdata/greet_client/Makefile.in | 2 +- src/plugins/authdata/greet_server/Makefile.in | 2 +- src/plugins/kadm5_hook/test/Makefile.in | 2 +- src/plugins/kdb/db2/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/btree/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/db/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/hash/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/mpool/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/recno/Makefile.in | 2 +- src/plugins/kdb/db2/libdb2/test/Makefile.in | 2 +- src/plugins/kdb/hdb/Makefile.in | 2 +- src/plugins/kdb/ldap/Makefile.in | 2 +- src/plugins/kdb/ldap/ldap_util/Makefile.in | 2 +- src/plugins/kdb/ldap/libkdb_ldap/Makefile.in | 2 +- src/plugins/locate/python/Makefile.in | 2 +- src/plugins/preauth/cksum_body/Makefile.in | 2 +- .../preauth/encrypted_challenge/Makefile.in | 2 +- src/plugins/preauth/pkinit/Makefile.in | 2 +- src/plugins/preauth/securid_sam2/Makefile.in | 2 +- src/plugins/preauth/wpse/Makefile.in | 2 +- src/tests/asn.1/Makefile.in | 2 +- src/tests/create/Makefile.in | 2 +- src/tests/dejagnu/Makefile.in | 2 +- src/tests/gss-threads/Makefile.in | 2 +- src/tests/gssapi/Makefile.in | 2 +- src/tests/hammer/Makefile.in | 2 +- src/tests/misc/Makefile.in | 2 +- src/tests/mkeystash_compat/Makefile.in | 2 +- src/tests/resolve/Makefile.in | 2 +- src/tests/shlib/Makefile.in | 2 +- src/tests/threads/Makefile.in | 2 +- src/tests/verify/Makefile.in | 2 +- src/util/Makefile.in | 34 +- src/util/collected-client-lib/Makefile.in | 2 +- src/util/et/Makefile.in | 2 +- src/util/profile/Makefile.in | 6 +- src/util/profile/prof_parse.c | 39 + src/util/send-pr/Makefile.in | 2 +- src/util/ss/Makefile.in | 2 +- src/util/support/Makefile.in | 2 +- src/windows/Makefile.in | 78 +- src/windows/README | 52 +- src/windows/build/bkw.pl | 5 - src/windows/ntsecapitest.c | 11 - src/windows/ntsecapitest.pl | 11 - 196 files changed, 2560 insertions(+), 3299 deletions(-) delete mode 100644 src/windows/ntsecapitest.c delete mode 100644 src/windows/ntsecapitest.pl diff --git a/src/Makefile.in b/src/Makefile.in index 16d04e65c..4ff1299be 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -16,6 +16,7 @@ SUBDIRS=util include lib \ plugins/preauth/encrypted_challenge \ kdc kadmin slave clients appl tests \ config-files gen-manpages +WINSUBDIRS=include util lib ccapi windows clients appl BUILDTOP=$(REL). LOCALINCLUDES = -I$(srcdir) PROG_LIBPATH=-L$(TOPLIBD) @@ -45,34 +46,6 @@ config.status: $(top_srcdir)/config/shlib.conf ##DOS##!endif all-windows:: maybe-awk Makefile-windows - @echo Making autoconf.h in include - cd include - $(MAKE) -$(MFLAGS) autoconf.h - @echo Making in util - cd ..\util - $(MAKE) -$(MFLAGS) - @echo Making in include - cd ..\include - $(MAKE) -$(MFLAGS) - @echo Making in lib - cd ..\lib - $(MAKE) -$(MFLAGS) - @echo Making in ccapi - cd ..\ccapi - $(MAKE) -$(MFLAGS) - @echo Making in windows - cd ..\windows - $(MAKE) -$(MFLAGS) - @echo Making in clients - cd ..\clients - $(MAKE) -$(MFLAGS) - @echo Making in appl\gss-sample - cd ..\appl\gss-sample - $(MAKE) -$(MFLAGS) - @echo Making in appl\gssftp\ftp - cd ..\..\appl\gssftp\ftp - $(MAKE) -$(MFLAGS) - cd ..\..\.. world:: date @@ -185,8 +158,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 +168,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 +206,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 +242,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\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_IMPL@\Makefile: lib\crypto\@CRYPTO_IMPL@\Makefile.in $(MKFDEP) +##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 > $@ @@ -358,29 +346,6 @@ WINMAKEFILES=Makefile \ ##DOS## $(WCONFIG) config < $@.in > $@ clean-windows:: Makefile-windows - @echo Making clean in util - cd util - $(MAKE) -$(MFLAGS) clean - @echo Making clean in include - cd ..\include - $(MAKE) -$(MFLAGS) clean - @echo Making clean in lib - cd ..\lib - $(MAKE) -$(MFLAGS) clean - @echo Making clean in windows - cd ..\windows - $(MAKE) -$(MFLAGS) clean - @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 - $(MAKE) -$(MFLAGS) clean - cd ..\..\.. - @echo Making clean in root # # Renames DOS 8.3 filenames back to their proper, longer names. @@ -393,41 +358,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 +423,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 +516,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 +551,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 +563,30 @@ 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 include\gssapi\gssapi_ext.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 \ diff --git a/src/appl/Makefile.in b/src/appl/Makefile.in index 57eafd2e3..32fe175c3 100644 --- a/src/appl/Makefile.in +++ b/src/appl/Makefile.in @@ -2,5 +2,4 @@ mydir=appl BUILDTOP=$(REL).. SUBDIRS= sample simple user_user gss-sample - - +WINSUBDIRS= gss-sample diff --git a/src/appl/gss-sample/Makefile.in b/src/appl/gss-sample/Makefile.in index 301f05cc9..87931b94d 100644 --- a/src/appl/gss-sample/Makefile.in +++ b/src/appl/gss-sample/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/gss-sample +mydir=appl$(S)gss-sample BUILDTOP=$(REL)..$(S).. DEFINES = -DUSE_AUTOCONF_H -DGSSAPI_V2 PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/appl/sample/Makefile.in b/src/appl/sample/Makefile.in index dde058f55..63ac42e47 100644 --- a/src/appl/sample/Makefile.in +++ b/src/appl/sample/Makefile.in @@ -1,3 +1,3 @@ -mydir=appl/sample +mydir=appl$(S)sample SUBDIRS = sclient sserver BUILDTOP=$(REL)..$(S).. diff --git a/src/appl/sample/sclient/Makefile.in b/src/appl/sample/sclient/Makefile.in index 481d81e85..59d897446 100644 --- a/src/appl/sample/sclient/Makefile.in +++ b/src/appl/sample/sclient/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/sample/sclient +mydir=appl$(S)sample$(S)sclient BUILDTOP=$(REL)..$(S)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/appl/sample/sserver/Makefile.in b/src/appl/sample/sserver/Makefile.in index 01265331b..096dc7a63 100644 --- a/src/appl/sample/sserver/Makefile.in +++ b/src/appl/sample/sserver/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/sample/sserver +mydir=appl$(S)sample$(S)sserver BUILDTOP=$(REL)..$(S)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/appl/simple/Makefile.in b/src/appl/simple/Makefile.in index 7681efb68..a6056167f 100644 --- a/src/appl/simple/Makefile.in +++ b/src/appl/simple/Makefile.in @@ -1,3 +1,3 @@ -mydir=appl/simple +mydir=appl$(S)simple SUBDIRS = client server BUILDTOP=$(REL)..$(S).. diff --git a/src/appl/simple/client/Makefile.in b/src/appl/simple/client/Makefile.in index 3e53f5e13..c357c1253 100644 --- a/src/appl/simple/client/Makefile.in +++ b/src/appl/simple/client/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/simple/client +mydir=appl$(S)simple$(S)client BUILDTOP=$(REL)..$(S)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/appl/simple/server/Makefile.in b/src/appl/simple/server/Makefile.in index ef64bed6d..1795bc896 100644 --- a/src/appl/simple/server/Makefile.in +++ b/src/appl/simple/server/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/simple/server +mydir=appl$(S)simple$(S)server BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES= -I.. -I$(srcdir)/.. diff --git a/src/appl/user_user/Makefile.in b/src/appl/user_user/Makefile.in index 0d45a1864..381ece63c 100644 --- a/src/appl/user_user/Makefile.in +++ b/src/appl/user_user/Makefile.in @@ -1,4 +1,4 @@ -mydir=appl/user_user +mydir=appl$(S)user_user BUILDTOP=$(REL)..$(S).. DEFINES = -DDEBUG PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/ccapi/Makefile.in b/src/ccapi/Makefile.in index 43d5fc081..3f80d87e1 100644 --- a/src/ccapi/Makefile.in +++ b/src/ccapi/Makefile.in @@ -2,32 +2,4 @@ mydir=ccapi BUILDTOP=$(REL).. SUBDIRS= lib server test - -all-windows:: - @echo Making in ccapi\lib\win - cd lib\win - cd - $(MAKE) -$(MFLAGS) - @echo Making in ccapi\server\win - cd ..\..\server\win - cd - $(MAKE) -$(MFLAGS) - @echo Making in ccapi\test - cd ..\..\test - cd - $(MAKE) -$(MFLAGS) - -clean-windows:: - @echo Making clean in ccapi\lib\win - cd lib\win - cd - $(MAKE) -$(MFLAGS) clean - @echo Making clean in ccapi\server\win - cd ..\..\server\win - cd - $(MAKE) -$(MFLAGS) clean - @echo Making clean in ccapi\test - cd ..\..\test - cd - $(MAKE) -$(MFLAGS) clean - +WINSUBDIRS= lib\win server\win test diff --git a/src/ccapi/common/Makefile.in b/src/ccapi/common/Makefile.in index 7693485e3..5a6e5fdd5 100644 --- a/src/ccapi/common/Makefile.in +++ b/src/ccapi/common/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/common +mydir=ccapi$(S)common BUILDTOP=$(REL)..$(S).. SUBDIRS=unix diff --git a/src/ccapi/common/unix/Makefile.in b/src/ccapi/common/unix/Makefile.in index 4b176fc80..b2ebc9049 100644 --- a/src/ccapi/common/unix/Makefile.in +++ b/src/ccapi/common/unix/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/common/unix +mydir=ccapi$(S)common$(S)unix BUILDTOP=$(REL)..$(S)..$(S).. STLIBOBJS= diff --git a/src/ccapi/lib/Makefile.in b/src/ccapi/lib/Makefile.in index 1e2e13d36..f2655488e 100644 --- a/src/ccapi/lib/Makefile.in +++ b/src/ccapi/lib/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/lib +mydir=ccapi$(S)lib BUILDTOP=$(REL)..$(S).. SUBDIRS=unix LOCALINCLUDES=-I$(srcdir)/../common -I. diff --git a/src/ccapi/lib/ccapi_context.c b/src/ccapi/lib/ccapi_context.c index da8aa59f0..7715139ff 100644 --- a/src/ccapi/lib/ccapi_context.c +++ b/src/ccapi/lib/ccapi_context.c @@ -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 (); } diff --git a/src/ccapi/lib/ccapi_ipc.c b/src/ccapi/lib/ccapi_ipc.c index 54b5faa86..0f14df80a 100644 --- a/src/ccapi/lib/ccapi_ipc.c +++ b/src/ccapi/lib/ccapi_ipc.c @@ -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, diff --git a/src/ccapi/lib/ccapi_ipc.h b/src/ccapi/lib/ccapi_ipc.h index 5b7d5d374..03b890b1f 100644 --- a/src/ccapi/lib/ccapi_ipc.h +++ b/src/ccapi/lib/ccapi_ipc.h @@ -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, diff --git a/src/ccapi/lib/ccapi_os_ipc.h b/src/ccapi/lib/ccapi_os_ipc.h index b5e040599..eabea254e 100644 --- a/src/ccapi/lib/ccapi_os_ipc.h +++ b/src/ccapi/lib/ccapi_os_ipc.h @@ -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, diff --git a/src/ccapi/lib/mac/ccapi_os_ipc.c b/src/ccapi/lib/mac/ccapi_os_ipc.c index e0a81d878..a25297e31 100644 --- a/src/ccapi/lib/mac/ccapi_os_ipc.c +++ b/src/ccapi/lib/mac/ccapi_os_ipc.c @@ -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) diff --git a/src/ccapi/lib/unix/Makefile.in b/src/ccapi/lib/unix/Makefile.in index 8a043c92a..455b6b7b1 100644 --- a/src/ccapi/lib/unix/Makefile.in +++ b/src/ccapi/lib/unix/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/lib/unix +mydir=ccapi$(S)lib$(S)unix BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES= -I$(srcdir)/.. -I$(srcdir)/../../common diff --git a/src/ccapi/lib/win/Makefile.in b/src/ccapi/lib/win/Makefile.in index 9fa6c02dc..7ca749a18 100644 --- a/src/ccapi/lib/win/Makefile.in +++ b/src/ccapi/lib/win/Makefile.in @@ -1,119 +1,119 @@ -# makefile: Constructs the Kerberos for Windows CCAPI DLL. -# -OBJS = $(OUTPRE)ccapi_ccache.obj \ - $(OUTPRE)ccapi_ccache_iterator.obj \ - $(OUTPRE)ccapi_context.obj \ - $(OUTPRE)ccapi_context_change_time.obj \ - $(OUTPRE)ccapi_credentials.obj \ - $(OUTPRE)ccapi_credentials_iterator.obj \ - $(OUTPRE)ccapi_ipc.obj \ - $(OUTPRE)ccapi_err.obj \ - $(OUTPRE)ccapi_os_ipc.obj \ - $(OUTPRE)ccapi_string.obj \ - $(OUTPRE)ccapi_v2.obj \ - $(OUTPRE)cci_array_internal.obj \ - $(OUTPRE)cci_cred_union.obj \ - $(OUTPRE)cci_debugging.obj \ - $(OUTPRE)cci_identifier.obj \ - $(OUTPRE)cci_message.obj \ - $(OUTPRE)cci_os_debugging.obj \ - $(OUTPRE)cci_os_identifier.obj \ - $(OUTPRE)ccs_reply_proc.obj \ - $(OUTPRE)ccs_reply_s.obj \ - $(OUTPRE)ccs_request_c.obj \ - $(OUTPRE)ccutils.obj \ - $(OUTPRE)client.obj \ - $(OUTPRE)dllmain.obj \ - $(OUTPRE)init.obj \ - $(OUTPRE)rpc.obj \ - $(OUTPRE)secure.obj \ - $(OUTPRE)tls.obj \ - $(OUTPRE)util.obj \ - $(OUTPRE)win-utils.obj - -##### Options -# Set NODEBUG if building release instead of debug - -#BUILDTOP is krb5/src and is relative to krb5/src/ccapi/lib/win, for making Makefile. -BUILDTOP=..\..\..\ -CCAPI = $(BUILDTOP)\CCAPI -CO = $(CCAPI)\common -COWIN = $(CCAPI)\common\win -CCUTIL = $(CCAPI)\common\win\OldCC -LIBDIR = $(CCAPI)\lib -LIBWIN = $(LIBDIR)\win -POSIX = $(BUILDTOP)\lib\krb5\posix -OLDCC = $(LIBWIN)\OldCC -SRCTMP = $(LIBWIN)\srctmp - -!if defined(KRB5_KFW_COMPILE) -KFWINC= /I$(BUILDTOP)\..\..\krbcc\include -!endif - -# 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 -MIDLINCLUDES = /I..\$(BUILDTOP)\include - -CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \ --D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS $(cvarsdll) - - -##### Linker -LINK = link -LIBS = ..\$(CLIB) ..\$(SLIB) kernel32.lib ws2_32.lib user32.lib advapi32.lib -LFLAGS = /nologo $(LOPTS) - -all:: Makefile copysrc midl $(OUTPRE)ccapi.dll 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 ccapi.dll 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 $(LIBDIR)\*.* $(SRCTMP) - xcopy /D/Y $(LIBWIN)\*.* $(SRCTMP) - xcopy /D/Y $(OLDCC)\*.* $(SRCTMP) - cd $(SRCTMP) - if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE) - -midl : ccs_request.h ccs_reply.h - -# Main program: -$(OUTPRE)ccapi.dll: $(OBJS) ccapi.def - $(LINK) $(LFLAGS) -entry:_DllMainCRTStartup@12 -dll /map:$*.map /out:$@ /DEF:ccapi.def $(OBJS) \ - /implib:ccapi.lib $(dllflags) $(LIBS) $(KFWLIB) $(SCLIB) rpcrt4.lib $(conlibsdll) $(conflags) - -ccapi.def: - echo ;ccapi.def is generated by a Makefile rule. > ccapi.def - echo HEAPSIZE 8192 >> ccapi.def - echo EXPORTS >> ccapi.def - type ccapi.exports >> ccapi.def - type ccapi_v2.exports >> ccapi.def - type debug.exports >> ccapi.def - -finish: - echo "Finished in ccapi/lib/win." - cd .. - -install:: - echo "Doing nothing for make install" - -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) \ No newline at end of file +# makefile: Constructs the Kerberos for Windows CCAPI DLL. +# +OBJS = $(OUTPRE)ccapi_ccache.obj \ + $(OUTPRE)ccapi_ccache_iterator.obj \ + $(OUTPRE)ccapi_context.obj \ + $(OUTPRE)ccapi_context_change_time.obj \ + $(OUTPRE)ccapi_credentials.obj \ + $(OUTPRE)ccapi_credentials_iterator.obj \ + $(OUTPRE)ccapi_ipc.obj \ + $(OUTPRE)ccapi_err.obj \ + $(OUTPRE)ccapi_os_ipc.obj \ + $(OUTPRE)ccapi_string.obj \ + $(OUTPRE)ccapi_v2.obj \ + $(OUTPRE)cci_array_internal.obj \ + $(OUTPRE)cci_cred_union.obj \ + $(OUTPRE)cci_debugging.obj \ + $(OUTPRE)cci_identifier.obj \ + $(OUTPRE)cci_message.obj \ + $(OUTPRE)cci_os_debugging.obj \ + $(OUTPRE)cci_os_identifier.obj \ + $(OUTPRE)ccs_reply_proc.obj \ + $(OUTPRE)ccs_reply_s.obj \ + $(OUTPRE)ccs_request_c.obj \ + $(OUTPRE)ccutils.obj \ + $(OUTPRE)client.obj \ + $(OUTPRE)dllmain.obj \ + $(OUTPRE)init.obj \ + $(OUTPRE)rpc.obj \ + $(OUTPRE)secure.obj \ + $(OUTPRE)tls.obj \ + $(OUTPRE)util.obj \ + $(OUTPRE)win-utils.obj + +##### Options +# Set NODEBUG if building release instead of debug + +#BUILDTOP is krb5/src and is relative to krb5/src/ccapi/lib/win, for making Makefile. +BUILDTOP= ..\..\.. +CCAPI = $(BUILDTOP)\CCAPI +CO = $(CCAPI)\common +COWIN = $(CCAPI)\common\win +CCUTIL = $(CCAPI)\common\win\OldCC +LIBDIR = $(CCAPI)\lib +LIBWIN = $(LIBDIR)\win +POSIX = $(BUILDTOP)\lib\krb5\posix +OLDCC = $(LIBWIN)\OldCC +SRCTMP = $(LIBWIN)\srctmp + +!if defined(KRB5_KFW_COMPILE) +KFWINC= /I$(BUILDTOP)\..\..\krbcc\include +!endif + +# 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 +MIDLINCLUDES = /I..\$(BUILDTOP)\include + +CPPFLAGS = $(CPPFLAGS) /EHsc -D_CRTAPI1=_cdecl -D_CRTAPI2=_cdecl -DWINVER=0x0501 \ +-D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS $(cvarsdll) + + +##### Linker +LINK = link +LIBS = ..\$(CLIB) ..\$(SLIB) kernel32.lib ws2_32.lib user32.lib advapi32.lib +LFLAGS = /nologo $(LOPTS) + +all:: Makefile copysrc midl $(OUTPRE)ccapi.dll 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 ccapi.dll 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 $(LIBDIR)\*.* $(SRCTMP) + xcopy /D/Y $(LIBWIN)\*.* $(SRCTMP) + xcopy /D/Y $(OLDCC)\*.* $(SRCTMP) + cd $(SRCTMP) + if NOT exist $(OUTPRE)\nul mkdir $(OUTPRE) + +midl : ccs_request.h ccs_reply.h + +# Main program: +$(OUTPRE)ccapi.dll: $(OBJS) ccapi.def + $(LINK) $(LFLAGS) -entry:_DllMainCRTStartup@12 -dll /map:$*.map /out:$@ /DEF:ccapi.def $(OBJS) \ + /implib:ccapi.lib $(dllflags) $(LIBS) $(KFWLIB) $(SCLIB) rpcrt4.lib $(conlibsdll) $(conflags) + +ccapi.def: + echo ;ccapi.def is generated by a Makefile rule. > ccapi.def + echo HEAPSIZE 8192 >> ccapi.def + echo EXPORTS >> ccapi.def + type ccapi.exports >> ccapi.def + type ccapi_v2.exports >> ccapi.def + type debug.exports >> ccapi.def + +finish: + echo "Finished in ccapi/lib/win." + cd .. + +install:: + echo "Doing nothing for make install" + +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) rmdir /s /q $(SRCTMP) diff --git a/src/ccapi/lib/win/WINCCAPI.sln b/src/ccapi/lib/win/WINCCAPI.sln index 985f4c610..cee989151 100644 --- a/src/ccapi/lib/win/WINCCAPI.sln +++ b/src/ccapi/lib/win/WINCCAPI.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WINCCAPI", "WINCCAPI.vcproj", "{1137FC16-E53E-48C1-8293-085B4BE68C32}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1137FC16-E53E-48C1-8293-085B4BE68C32}.Debug|Win32.ActiveCfg = Debug|Win32 - {1137FC16-E53E-48C1-8293-085B4BE68C32}.Debug|Win32.Build.0 = Debug|Win32 - {1137FC16-E53E-48C1-8293-085B4BE68C32}.Release|Win32.ActiveCfg = Release|Win32 - {1137FC16-E53E-48C1-8293-085B4BE68C32}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WINCCAPI", "WINCCAPI.vcproj", "{1137FC16-E53E-48C1-8293-085B4BE68C32}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1137FC16-E53E-48C1-8293-085B4BE68C32}.Debug|Win32.ActiveCfg = Debug|Win32 + {1137FC16-E53E-48C1-8293-085B4BE68C32}.Debug|Win32.Build.0 = Debug|Win32 + {1137FC16-E53E-48C1-8293-085B4BE68C32}.Release|Win32.ActiveCfg = Release|Win32 + {1137FC16-E53E-48C1-8293-085B4BE68C32}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ccapi/lib/win/WINCCAPI.vcproj b/src/ccapi/lib/win/WINCCAPI.vcproj index 69b7722e8..9af0e21a0 100644 --- a/src/ccapi/lib/win/WINCCAPI.vcproj +++ b/src/ccapi/lib/win/WINCCAPI.vcproj @@ -1,111 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ccapi/lib/win/ccapi_os_ipc.cxx b/src/ccapi/lib/win/ccapi_os_ipc.cxx index b6fc70155..062558cb1 100644 --- a/src/ccapi/lib/win/ccapi_os_ipc.cxx +++ b/src/ccapi/lib/win/ccapi_os_ipc.cxx @@ -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, diff --git a/src/ccapi/lib/win/debug.exports b/src/ccapi/lib/win/debug.exports index 7bf84d272..583e9ca1e 100644 --- a/src/ccapi/lib/win/debug.exports +++ b/src/ccapi/lib/win/debug.exports @@ -1,13 +1,10 @@ - cci_debug_printf - _cci_check_error - cci_os_ipc - cci_os_ipc_msg - cci_os_ipc_thread_init - krb5int_ipc_stream_data - krb5int_ipc_stream_write - krb5int_ipc_stream_new - - ccs_authenticate - - - \ No newline at end of file + cci_debug_printf + _cci_check_error + cci_os_ipc + cci_os_ipc_msg + cci_os_ipc_thread_init + krb5int_ipc_stream_data + krb5int_ipc_stream_write + krb5int_ipc_stream_new + + ccs_authenticate diff --git a/src/ccapi/server/Makefile.in b/src/ccapi/server/Makefile.in index 0ca140ba6..0cfa43a3a 100644 --- a/src/ccapi/server/Makefile.in +++ b/src/ccapi/server/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/server +mydir=ccapi$(S)server BUILDTOP=$(REL)..$(S).. SUBDIRS=unix diff --git a/src/ccapi/server/unix/Makefile.in b/src/ccapi/server/unix/Makefile.in index 526826030..1d45a5fc1 100644 --- a/src/ccapi/server/unix/Makefile.in +++ b/src/ccapi/server/unix/Makefile.in @@ -1,4 +1,4 @@ -mydir=ccapi/server/unix +mydir=ccapi$(S)server$(S)unix BUILDTOP=$(REL)..$(S)..$(S).. STLIBOBJS= diff --git a/src/ccapi/server/win/Makefile.in b/src/ccapi/server/win/Makefile.in index 3d8da6d22..d5da00136 100644 --- a/src/ccapi/server/win/Makefile.in +++ b/src/ccapi/server/win/Makefile.in @@ -1,109 +1,109 @@ -# 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) +# 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) rmdir /s /q $(SRCTMP) diff --git a/src/ccapi/server/win/Server.sln b/src/ccapi/server/win/Server.sln index 64cc7f08c..ea1bd455f 100644 --- a/src/ccapi/server/win/Server.sln +++ b/src/ccapi/server/win/Server.sln @@ -1,20 +1,20 @@ - -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 + +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 diff --git a/src/ccapi/server/win/Server.vcproj b/src/ccapi/server/win/Server.vcproj index 39db361d8..626c7a3c7 100644 --- a/src/ccapi/server/win/Server.vcproj +++ b/src/ccapi/server/win/Server.vcproj @@ -1,227 +1,227 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ccapi/server/win/WorkItem.cpp b/src/ccapi/server/win/WorkItem.cpp index 1b1725a8a..22e209de9 100644 --- a/src/ccapi/server/win/WorkItem.cpp +++ b/src/ccapi/server/win/WorkItem.cpp @@ -1,126 +1,126 @@ -/* - * $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 -#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; - } +/* + * $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 +#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; + } diff --git a/src/ccapi/server/win/WorkQueue.cpp b/src/ccapi/server/win/WorkQueue.cpp index f16ad117e..0d6b19cea 100644 --- a/src/ccapi/server/win/WorkQueue.cpp +++ b/src/ccapi/server/win/WorkQueue.cpp @@ -1,61 +1,60 @@ -/* - * $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; - } - +/* + * $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; + } diff --git a/src/ccapi/server/win/ccs_os_server.cpp b/src/ccapi/server/win/ccs_os_server.cpp index b22fdfa9b..e0695876d 100644 --- a/src/ccapi/server/win/ccs_os_server.cpp +++ b/src/ccapi/server/win/ccs_os_server.cpp @@ -1,963 +1,963 @@ -/* - * $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_ - 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; -} +/* + * $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_ + 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; +} diff --git a/src/ccapi/test/Makefile.in b/src/ccapi/test/Makefile.in index 175e06bf0..bf950b6a7 100644 --- a/src/ccapi/test/Makefile.in +++ b/src/ccapi/test/Makefile.in @@ -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 diff --git a/src/ccapi/test/pingtest.c b/src/ccapi/test/pingtest.c index d64db2e4b..d44839f71 100644 --- a/src/ccapi/test/pingtest.c +++ b/src/ccapi/test/pingtest.c @@ -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) { diff --git a/src/clients/Makefile.in b/src/clients/Makefile.in index 891da9e20..4ae836194 100644 --- a/src/clients/Makefile.in +++ b/src/clients/Makefile.in @@ -2,52 +2,6 @@ mydir=clients BUILDTOP=$(REL).. SUBDIRS= klist kinit kdestroy kpasswd ksu kvno kcpytkt kdeltkt +WINSUBDIRS= klist kinit kdestroy kpasswd kvno kcpytkt kdeltkt NO_OUTPRE=1 -all-windows:: - @echo Making all in clients\klist - cd klist - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kdestroy - cd ..\kdestroy - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kinit - cd ..\kinit - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kpasswd - cd ..\kpasswd - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kvno - cd ..\kvno - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kcpytkt - cd ..\kcpytkt - $(MAKE) -$(MFLAGS) - @echo Making all in clients\kdeltkt - cd ..\kdeltkt - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - @echo Making clean in clients\klist - cd klist - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kdestroy - cd ..\kdestroy - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kinit - cd ..\kinit - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kpasswd - cd ..\kpasswd - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kvno - cd ..\kvno - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kcpytkt - cd ..\kcpytkt - $(MAKE) -$(MFLAGS) clean - @echo Making clean in clients\kdeltkt - cd ..\kdeltkt - $(MAKE) -$(MFLAGS) clean - cd .. diff --git a/src/clients/kdestroy/Makefile.in b/src/clients/kdestroy/Makefile.in index 64a2dff56..b3bb0b281 100644 --- a/src/clients/kdestroy/Makefile.in +++ b/src/clients/kdestroy/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/kdestroy +mydir=clients$(S)kdestroy BUILDTOP=$(REL)..$(S).. DEFS= diff --git a/src/clients/kinit/Makefile.in b/src/clients/kinit/Makefile.in index d60b1c7ae..aeaba560f 100644 --- a/src/clients/kinit/Makefile.in +++ b/src/clients/kinit/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/kinit +mydir=clients$(S)kinit BUILDTOP=$(REL)..$(S).. DEFS= diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index 26641e8d1..d8746cb41 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -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) { diff --git a/src/clients/klist/Makefile.in b/src/clients/klist/Makefile.in index af4375063..c2b4d412a 100644 --- a/src/clients/klist/Makefile.in +++ b/src/clients/klist/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/klist +mydir=clients$(S)klist BUILDTOP=$(REL)..$(S).. DEFS= diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index f8d3cd87a..304d69db4 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -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); } diff --git a/src/clients/kpasswd/Makefile.in b/src/clients/kpasswd/Makefile.in index d53b92216..50abc89c6 100644 --- a/src/clients/kpasswd/Makefile.in +++ b/src/clients/kpasswd/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/kpasswd +mydir=clients$(S)kpasswd BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/clients/ksu/Makefile.in b/src/clients/ksu/Makefile.in index daf9059e9..9309b97ac 100644 --- a/src/clients/ksu/Makefile.in +++ b/src/clients/ksu/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/ksu +mydir=clients$(S)ksu BUILDTOP=$(REL)..$(S).. DEFINES = -DGET_TGT_VIA_PASSWD -DPRINC_LOOK_AHEAD -DCMD_PATH='"/bin /local/bin"' DEFS= diff --git a/src/clients/kvno/Makefile.in b/src/clients/kvno/Makefile.in index bbbb79c7a..741c73844 100644 --- a/src/clients/kvno/Makefile.in +++ b/src/clients/kvno/Makefile.in @@ -1,4 +1,4 @@ -mydir=clients/kvno +mydir=clients$(S)kvno BUILDTOP=$(REL)..$(S).. DEFS= diff --git a/src/config/pre.in b/src/config/pre.in index 8efa54913..de0864555 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -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 */ diff --git a/src/config/win-post.in b/src/config/win-post.in index 151fac687..6046e627e 100644 --- a/src/config/win-post.in +++ b/src/config/win-post.in @@ -34,7 +34,36 @@ Makefile: Makefile.in $(BUILDTOP)\config\win-pre.in $(BUILDTOP)\config\win-post. $(WCONFIG) $(BUILDTOP)\config < Makefile.in > Makefile !endif -!if ("$(CPU)" == "IA64" ) || ("$(CPU)" == "AMD64" ) || ("$(CPU)" == "ALPHA64" ) +# Recurse into subdirs if WINSUBDIRS or SUBDIRS is defined. Makefiles +# can depend on all-recurse, clean-recurse, or check-recurse to perform +# actions after recursion. +!if defined(SUBDIRS) && !defined(WINSUBDIRS) +WINSUBDIRS=$(SUBDIRS) +!endif +!ifdef WINSUBDIRS + +all-recurse: + @for %d in ($(WINSUBDIRS)) do @(echo Making in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) && popd) || exit 1 + @echo Making in $(mydir) +all-windows:: all-recurse + +clean-recurse:: + @for %d in ($(WINSUBDIRS)) do @(echo Making clean in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) clean && popd) || exit 1 + @echo Making clean in $(mydir) +clean-windows:: clean-recurse + +check-recurse:: + @for %d in ($(WINSUBDIRS)) do @(echo Making check in $(mydir)\%d && \ + pushd %d && $(MAKE) -$(MFLAGS) check && popd) || exit 1 + @echo Making check in $(mydir) +check-windows:: check-recurse + +!endif # WINSUBDIRS + +# Use 64-bit LIBNAME and OBJFILE on 64-bit platforms, if defined. +!if ("$(CPU)" == "IA64") || ("$(CPU)" == "AMD64") || ("$(CPU)" == "ALPHA64") !if defined(WIN64LIBNAME) LIBNAME=$(WIN64LIBNAME) !endif @@ -43,6 +72,7 @@ OBJFILE=$(WIN64OBJFILE) !endif !endif +# Build a library if LIBNAME is defined. !if defined(LIBNAME) !if !defined(OBJFILELIST) @@ -59,6 +89,7 @@ $(LIBNAME): $(OBJFILEDEP) !endif # LIBNAME +# Build an object file list if OBJFILE is defined. !if defined(OBJFILE) all-windows:: $(OBJFILE) !if defined(LIBOBJS) @@ -76,17 +107,6 @@ $(OBJFILE): $(LIBOBJS) check:: check-windows:: -!if defined(LIBNAME) -clean-windows:: -# NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR... -# if exist $(LIBNAME) del $(LIBNAME) -!endif -!if defined(OBJFILE) -clean-windows:: -# NO LONGER NEEDED BECAUSE WE CLEAN OUT THE DIR... -# if exist $(OBJFILE) del $(OBJFILE) -!endif - clean-windows:: clean-windows-files clean-windows-dir diff --git a/src/config/win-pre.in b/src/config/win-pre.in index 52f0e5b47..a71d88da3 100644 --- a/src/config/win-pre.in +++ b/src/config/win-pre.in @@ -228,6 +228,9 @@ MFLAGS=$(MAKEFLAGS) MAKE=-$(MAKE) !endif +CRYPTO_IMPL = builtin +PRNG_ALG = yarrow + CFLAGS = $(CCOPTS) ALL_CFLAGS = $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(CPPFLAGS) $(CFLAGS) diff --git a/src/include/Makefile.in b/src/include/Makefile.in index ef8c11274..ed7d20fbb 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -121,8 +121,9 @@ clean-unix:: clean-windows:: $(RM) com_err.h profile.h - $(RM) gssapi\gssapi.h gssapi\gssapi_generic.h gssapi\gssapi_krb5.h gssapi\timestamp - if exist gssapi\nul rmdir gssapi + $(RM) gssapi\gssapi.h gssapi\gssapi_generic.h gssapi\gssapi_krb5.h + $(RM) gssapi\gssapi_ext.h gssapi\timestamp + if exist gssapi\nul rmdir /s /q gssapi $(RM) osconf.h autoconf.h autoconf.stamp @echo Making clean in include diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 0c98d5029..37e0bc836 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -2348,10 +2348,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 *); @@ -2669,7 +2669,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 diff --git a/src/include/win-mac.h b/src/include/win-mac.h index 85f7a376f..84ffe7976 100644 --- a/src/include/win-mac.h +++ b/src/include/win-mac.h @@ -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 diff --git a/src/kadmin/cli/Makefile.in b/src/kadmin/cli/Makefile.in index b5f54287e..c7ba8312e 100644 --- a/src/kadmin/cli/Makefile.in +++ b/src/kadmin/cli/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/cli +mydir=kadmin$(S)cli BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/kadmin/dbutil/Makefile.in b/src/kadmin/dbutil/Makefile.in index 454077069..2c13827e1 100644 --- a/src/kadmin/dbutil/Makefile.in +++ b/src/kadmin/dbutil/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/dbutil +mydir=kadmin$(S)dbutil BUILDTOP=$(REL)..$(S).. DEFS= LOCALINCLUDES = -I. diff --git a/src/kadmin/ktutil/Makefile.in b/src/kadmin/ktutil/Makefile.in index 607e58a53..930b1efc8 100644 --- a/src/kadmin/ktutil/Makefile.in +++ b/src/kadmin/ktutil/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/ktutil +mydir=kadmin$(S)ktutil BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/kadmin/server/Makefile.in b/src/kadmin/server/Makefile.in index d3111da4a..7872872d5 100644 --- a/src/kadmin/server/Makefile.in +++ b/src/kadmin/server/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/server +mydir=kadmin$(S)server BUILDTOP=$(REL)..$(S).. KDB_DEP_LIB=$(DL_LIB) $(THREAD_LINKOPTS) DEFS= diff --git a/src/kadmin/testing/Makefile.in b/src/kadmin/testing/Makefile.in index 1f154ec55..0681e8eca 100644 --- a/src/kadmin/testing/Makefile.in +++ b/src/kadmin/testing/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/testing +mydir=kadmin$(S)testing BUILDTOP=$(REL)..$(S).. SUBDIRS = scripts util diff --git a/src/kadmin/testing/scripts/Makefile.in b/src/kadmin/testing/scripts/Makefile.in index 36ae3b490..1e14d6117 100644 --- a/src/kadmin/testing/scripts/Makefile.in +++ b/src/kadmin/testing/scripts/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/testing/scripts +mydir=kadmin$(S)testing$(S)scripts BUILDTOP=$(REL)..$(S)..$(S).. PERL_PATH=@PERL_PATH@ diff --git a/src/kadmin/testing/util/Makefile.in b/src/kadmin/testing/util/Makefile.in index 3993c90a0..745a73ddd 100644 --- a/src/kadmin/testing/util/Makefile.in +++ b/src/kadmin/testing/util/Makefile.in @@ -1,4 +1,4 @@ -mydir=kadmin/testing/util +mydir=kadmin$(S)testing$(S)util BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = $(TCL_INCLUDES) -I$(BUILDTOP)/lib/kdb/ # Force Tcl headers to use stdarg.h, because krb5 does too, and if diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 55e9b0f37..4256f0586 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -1,5 +1,6 @@ mydir=lib SUBDIRS=crypto krb5 gssapi rpc kdb kadm5 apputils +WINSUBDIRS=crypto krb5 gssapi BUILDTOP=$(REL).. all-unix:: @@ -35,10 +36,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 +45,6 @@ clean-windows:: ##WIN32##PDEF = xpprof32.def ##WIN32##KDEF = krb5_32.def ##WIN32##GDEF = gssapi32.def -##WIN32##K4DEF = krb4_32.def @@ -60,7 +58,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 +67,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 +75,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 +84,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 +91,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 +118,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,48 +131,9 @@ 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) -##WIN32##all-windows:: -##WIN32## @echo Making in lib\crypto -##WIN32## cd crypto -##WIN32## $(MAKE) -$(MFLAGS) -##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) -##WIN32## @echo Making in lib -##WIN32## cd .. - -##WIN32##all-windows:: lib-windows -##WIN32##lib-windows:: krb5.lib gssapi.lib krb4.lib - -##WIN32##clean-windows:: -##WIN32## @echo Making clean in lib\crypto -##WIN32## cd crypto -##WIN32## $(MAKE) -$(MFLAGS) clean -##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 -##WIN32## @echo Making clean in lib -##WIN32## cd .. +##WIN32##all-windows:: all-recurse lib-windows +##WIN32##lib-windows:: krb5.lib gssapi.lib diff --git a/src/lib/apputils/Makefile.in b/src/lib/apputils/Makefile.in index 58273248b..75dd613dc 100644 --- a/src/lib/apputils/Makefile.in +++ b/src/lib/apputils/Makefile.in @@ -2,7 +2,7 @@ prefix=@prefix@ bindir=@bindir@ datadir=@datadir@ mydatadir=$(datadir)/apputils -mydir=lib/apputils +mydir=lib$(S)apputils BUILDTOP=$(REL)..$(S).. RELDIR=../lib/apputils SED = sed diff --git a/src/lib/crypto/Makefile.in b/src/lib/crypto/Makefile.in index 3749a15a6..464db261b 100644 --- a/src/lib/crypto/Makefile.in +++ b/src/lib/crypto/Makefile.in @@ -1,6 +1,6 @@ -mydir=lib/crypto +mydir=lib$(S)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,44 +19,48 @@ 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. DEPLIBS= +CRYPTO_LIBS=@CRYPTO_LIBS@ +CRYPTO_IMPL_LIBS=@CRYPTO_IMPL_LIBS@ SHLIB_DIRS=-L$(TOPLIBD) -SHLIB_EXPLIBS= $(SUPPORT_LIB) @CRYPTO_LIBS@ @CRYPTO_IMPL_LIBS@ $(LIBS) +SHLIB_EXPLIBS= $(SUPPORT_LIB) $(CRYPTO_LIBS) $(CRYPTO_IMPL_LIBS) $(LIBS) SHLIB_EXPDEPLIBS= $(SUPPORT_DEPLIB) 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 @@ -70,30 +74,6 @@ libcrypto.lib: clean-unix:: clean-liblinks clean-libs clean-libobjs -all-windows:: - cd krb - @echo Making in crypto\krb - $(MAKE) -$(MFLAGS) - cd ..\@CRYPTO_IMPL@ - @echo Making in crypto\@CRYPTO_IMPL@ - $(MAKE) -$(MFLAGS) - cd ..\crypto_tests - @echo Making in crypto\crypto_tests - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd krb - @echo Making in clean crypto\krb - $(MAKE) -$(MFLAGS) clean - cd ..\@CRYPTO_IMPL@ - @echo Making clean in crypto\@CRYPTO_IMPL@ - $(MAKE) -$(MFLAGS) clean - cd ..\crypto_tests - @echo Making clean in crypto\crypto_tests - $(MAKE) -$(MFLAGS) clean - cd .. - @lib_frag@ @libobj_frag@ diff --git a/src/lib/crypto/builtin/Makefile.in b/src/lib/crypto/builtin/Makefile.in index 240d2895b..66e16ce69 100644 --- a/src/lib/crypto/builtin/Makefile.in +++ b/src/lib/crypto/builtin/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/crypto/builtin +mydir=lib$(S)crypto$(S)builtin BUILDTOP=$(REL)..$(S)..$(S).. SUBDIRS=camellia des aes md4 md5 sha1 sha2 enc_provider hash_provider LOCALINCLUDES = -I$(srcdir)/../krb \ @@ -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 \ @@ -74,97 +72,6 @@ t_cf2$(EXEEXT): t_cf2.$(OBJEXT) $(SUPPORT_DEPLIB) clean:: $(RM) t_cf2 t_cf2.o t_cf2.output - - - -all-windows:: - cd ..\des - @echo Making in crypto\des - $(MAKE) -$(MFLAGS) - cd ..\md4 - @echo Making in crypto\md4 - $(MAKE) -$(MFLAGS) - cd ..\md5 - @echo Making in crypto\md5 - $(MAKE) -$(MFLAGS) - cd ..\sha1 - @echo Making in crypto\sha1 - $(MAKE) -$(MFLAGS) - cd ..\sh2a - @echo Making in crypto\sha2 - $(MAKE) -$(MFLAGS) - cd ..\hash_provider - @echo Making in crypto\hash_provider - $(MAKE) -$(MFLAGS) - cd ..\enc_provider - @echo Making in crypto\enc_provider - $(MAKE) -$(MFLAGS) - cd ..\aes - @echo Making in crypto\aes - $(MAKE) -$(MFLAGS) - cd ..\camellia - @echo Making in crypto\camellia - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd ..\des - @echo Making clean in crypto\des - $(MAKE) -$(MFLAGS) clean - cd ..\md4 - @echo Making clean in crypto\md4 - $(MAKE) -$(MFLAGS) clean - cd ..\md5 - @echo Making clean in crypto\md5 - $(MAKE) -$(MFLAGS) clean - cd ..\sha1 - @echo Making clean in crypto\sha1 - $(MAKE) -$(MFLAGS) clean - cd ..\sha2 - @echo Making clean in crypto\sha2 - $(MAKE) -$(MFLAGS) clean - cd ..\hash_provider - @echo Making clean in crypto\hash_provider - $(MAKE) -$(MFLAGS) clean - cd ..\enc_provider - @echo Making clean in crypto\enc_provider - $(MAKE) -$(MFLAGS) clean - cd ..\aes - @echo Making clean in crypto\aes - $(MAKE) -$(MFLAGS) clean - cd ..\camellia - @echo Making clean in crypto\camellia - $(MAKE) -$(MFLAGS) clean - cd .. - -check-windows:: - cd ..\des - @echo Making check in crypto\des - $(MAKE) -$(MFLAGS) check - cd ..\md4 - @echo Making check in crypto\md4 - $(MAKE) -$(MFLAGS) check - cd ..\md5 - @echo Making check in crypto\md5 - $(MAKE) -$(MFLAGS) check - cd ..\sha1 - @echo Making check in crypto\sha1 - $(MAKE) -$(MFLAGS) check - cd ..\hash_provider - @echo Making check in crypto\hash_provider - $(MAKE) -$(MFLAGS) check - cd ..\enc_provider - @echo Making check in crypto\enc_provider - $(MAKE) -$(MFLAGS) check - cd ..\aes - @echo Making check in crypto\aes - $(MAKE) -$(MFLAGS) check - cd ..\camellia - @echo Making check in crypto\camellia - $(MAKE) -$(MFLAGS) check - cd .. - - @lib_frag@ @libobj_frag@ diff --git a/src/lib/crypto/builtin/aes/Makefile.in b/src/lib/crypto/builtin/aes/Makefile.in index 260cc97cc..9a242cc45 100644 --- a/src/lib/crypto/builtin/aes/Makefile.in +++ b/src/lib/crypto/builtin/aes/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/builtin/aes +mydir=lib$(S)crypto$(S)builtin$(S)aes BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk -I$(srcdir)/../../../../include 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) diff --git a/src/lib/crypto/builtin/camellia/Makefile.in b/src/lib/crypto/builtin/camellia/Makefile.in index 32cbd5026..e6c86bc13 100644 --- a/src/lib/crypto/builtin/camellia/Makefile.in +++ b/src/lib/crypto/builtin/camellia/Makefile.in @@ -1,14 +1,14 @@ thisconfigdir=../../../.. myfulldir=lib/crypto/builtin/camellia -mydir=lib/crypto/builtin/camellia +mydir=lib$(S)crypto$(S)builtin$(S)camellia BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk \ -I$(srcdir)/../../../../include -I$(srcdir)/../aes 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) diff --git a/src/lib/crypto/builtin/des/Makefile.in b/src/lib/crypto/builtin/des/Makefile.in index 325fdc262..9b5d81402 100644 --- a/src/lib/crypto/builtin/des/Makefile.in +++ b/src/lib/crypto/builtin/des/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/builtin/des +mydir=lib$(S)crypto$(S)builtin$(S)des BUILDTOP=$(REL)..$(S)..$(S)..$(S).. 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) diff --git a/src/lib/crypto/builtin/enc_provider/Makefile.in b/src/lib/crypto/builtin/enc_provider/Makefile.in index aadec6e6a..e843d602a 100644 --- a/src/lib/crypto/builtin/enc_provider/Makefile.in +++ b/src/lib/crypto/builtin/enc_provider/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/crypto/builtin/enc_provider +mydir=lib$(S)crypto$(S)builtin$(S)enc_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/../des \ -I$(srcdir)/../arcfour \ @@ -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) diff --git a/src/lib/crypto/builtin/enc_provider/camellia.c b/src/lib/crypto/builtin/enc_provider/camellia.c index 566f2d78f..337a3104d 100644 --- a/src/lib/crypto/builtin/enc_provider/camellia.c +++ b/src/lib/crypto/builtin/enc_provider/camellia.c @@ -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 */ diff --git a/src/lib/crypto/builtin/hash_provider/Makefile.in b/src/lib/crypto/builtin/hash_provider/Makefile.in index 36ec412c5..f008e7118 100644 --- a/src/lib/crypto/builtin/hash_provider/Makefile.in +++ b/src/lib/crypto/builtin/hash_provider/Makefile.in @@ -1,12 +1,12 @@ -mydir=lib/crypto/builtin/hash_provider +mydir=lib$(S)crypto$(S)builtin$(S)hash_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/../../krb/crc32 -I$(srcdir)/../md4 \ -I$(srcdir)/../md5 -I$(srcdir)/../sha1 -I$(srcdir)/../../krb 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) diff --git a/src/lib/crypto/builtin/md4/Makefile.in b/src/lib/crypto/builtin/md4/Makefile.in index 561927a1e..3dbeb5bd7 100644 --- a/src/lib/crypto/builtin/md4/Makefile.in +++ b/src/lib/crypto/builtin/md4/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/builtin/md4 +mydir=lib$(S)crypto$(S)builtin$(S)md4 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. 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) diff --git a/src/lib/crypto/builtin/md5/Makefile.in b/src/lib/crypto/builtin/md5/Makefile.in index 6a1f52fa6..1ab1ce96f 100644 --- a/src/lib/crypto/builtin/md5/Makefile.in +++ b/src/lib/crypto/builtin/md5/Makefile.in @@ -1,10 +1,10 @@ -mydir=lib/crypto/builtin/md5 +mydir=lib$(S)crypto$(S)builtin$(S)md5 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) diff --git a/src/lib/crypto/builtin/sha1/Makefile.in b/src/lib/crypto/builtin/sha1/Makefile.in index ec51713a1..00e6cb6d4 100644 --- a/src/lib/crypto/builtin/sha1/Makefile.in +++ b/src/lib/crypto/builtin/sha1/Makefile.in @@ -1,10 +1,10 @@ -mydir=lib/crypto/builtin/sha1 +mydir=lib$(S)crypto$(S)builtin$(S)sha1 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) diff --git a/src/lib/crypto/builtin/sha2/Makefile.in b/src/lib/crypto/builtin/sha2/Makefile.in index 535d7eeb8..da176e66d 100644 --- a/src/lib/crypto/builtin/sha2/Makefile.in +++ b/src/lib/crypto/builtin/sha2/Makefile.in @@ -1,10 +1,10 @@ -mydir=lib/crypto/builtin/sha2 +mydir=lib$(S)crypto$(S)builtin$(S)sha2 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) diff --git a/src/lib/crypto/crypto_tests/Makefile.in b/src/lib/crypto/crypto_tests/Makefile.in index 06b1745e9..50700fd6c 100644 --- a/src/lib/crypto/crypto_tests/Makefile.in +++ b/src/lib/crypto/crypto_tests/Makefile.in @@ -1,15 +1,16 @@ -mydir=lib/crypto/crypto_tests +mydir=lib$(S)crypto$(S)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 diff --git a/src/lib/crypto/krb/Makefile.in b/src/lib/crypto/krb/Makefile.in index 94b06c4ee..5be92aa38 100644 --- a/src/lib/crypto/krb/Makefile.in +++ b/src/lib/crypto/krb/Makefile.in @@ -1,26 +1,25 @@ -mydir=lib/crypto/krb +mydir=lib$(S)crypto$(S)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 \ +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 \ -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 +66,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 +82,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 +97,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 +143,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) @@ -158,97 +158,6 @@ depend:: $(SRCS) clean-unix:: clean-libobjs -all-windows:: - cd arcfour - @echo Making in crypto\arcfour - $(MAKE) -$(MFLAGS) - cd ..\crc32 - @echo Making in crypto\crc32 - $(MAKE) -$(MFLAGS) - cd ..\checksum - @echo Making in crypto\checksum - $(MAKE) -$(MFLAGS) - cd ..\dk - @echo Making in crypto\dk - $(MAKE) -$(MFLAGS) - cd ..\prf - @echo Making in crypto\prf - $(MAKE) -$(MFLAGS) - cd ..\rand2key - @echo Making in crypto\rand2key - $(MAKE) -$(MFLAGS) - cd ..\old - @echo Making in crypto\old - $(MAKE) -$(MFLAGS) - cd ..\raw - @echo Making in crypto\raw - $(MAKE) -$(MFLAGS) - cd ..\prng - @echo Making in crypto\prng - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd arcfour - @echo Making in clean crypto\arcfour - $(MAKE) -$(MFLAGS) clean - cd ..\crc32 - @echo Making in clean crypto\crc32 - $(MAKE) -$(MFLAGS) clean - cd ..\checksum - @echo Making clean in crypto\checksum - $(MAKE) -$(MFLAGS) clean - cd ..\dk - @echo Making clean in crypto\dk - $(MAKE) -$(MFLAGS) clean - cd ..\prf - @echo Making clean in crypto\prf - $(MAKE) -$(MFLAGS) clean - cd ..\rand2key - @echo Making clean in crypto\rand2key - $(MAKE) -$(MFLAGS) clean - cd ..\old - @echo Making clean in crypto\old - $(MAKE) -$(MFLAGS) clean - cd ..\raw - @echo Making clean in crypto\raw - $(MAKE) -$(MFLAGS) clean - cd ..\prng - @echo Making clean in crypto\prng - $(MAKE) -$(MFLAGS) clean - cd .. - -check-windows:: - cd arcfour - @echo Making in check crypto\arcfour - $(MAKE) -$(MFLAGS) check - cd ..\crc32 - @echo Making in check crypto\crc32 - $(MAKE) -$(MFLAGS) check - cd ..\checksum - @echo Making check in crypto\checksum - $(MAKE) -$(MFLAGS) check - cd ..\dk - @echo Making check in crypto\dk - $(MAKE) -$(MFLAGS) check - cd ..\prf - @echo Making check in crypto\prf - $(MAKE) -$(MFLAGS) check - cd ..\rand2key - @echo Making check in crypto\rand2key - $(MAKE) -$(MFLAGS) check - cd ..\old - @echo Making check in crypto\old - $(MAKE) -$(MFLAGS) check - cd ..\raw - @echo Making check in crypto\raw - $(MAKE) -$(MFLAGS) check - cd ..\prng - @echo Making check in crypto\prng - $(MAKE) -$(MFLAGS) check - cd .. - - @lib_frag@ @libobj_frag@ diff --git a/src/lib/crypto/krb/arcfour/Makefile.in b/src/lib/crypto/krb/arcfour/Makefile.in index bd234faff..93af66273 100644 --- a/src/lib/crypto/krb/arcfour/Makefile.in +++ b/src/lib/crypto/krb/arcfour/Makefile.in @@ -1,12 +1,12 @@ -mydir=lib/crypto/krb/arcfour +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/krb/checksum/Makefile.in b/src/lib/crypto/krb/checksum/Makefile.in index 826afd189..2d4148168 100644 --- a/src/lib/crypto/krb/checksum/Makefile.in +++ b/src/lib/crypto/krb/checksum/Makefile.in @@ -1,18 +1,18 @@ -mydir=lib/crypto/krb/checksum +mydir=lib$(S)crypto$(S)krb$(S)checksum BUILDTOP=$(REL)..$(S)..$(S)..$(S).. 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) diff --git a/src/lib/crypto/krb/crc32/Makefile.in b/src/lib/crypto/krb/crc32/Makefile.in index b34f3aa72..5360339e7 100644 --- a/src/lib/crypto/krb/crc32/Makefile.in +++ b/src/lib/crypto/krb/crc32/Makefile.in @@ -1,10 +1,10 @@ -mydir=lib/crypto/krb/crc32 +mydir=lib$(S)crypto$(S)krb$(S)crc32 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) diff --git a/src/lib/crypto/krb/dk/Makefile.in b/src/lib/crypto/krb/dk/Makefile.in index cd804bc6d..63e55b6ff 100644 --- a/src/lib/crypto/krb/dk/Makefile.in +++ b/src/lib/crypto/krb/dk/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/krb/dk +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/krb/old/Makefile.in b/src/lib/crypto/krb/old/Makefile.in index cc3c7f602..8cbd7fc0b 100644 --- a/src/lib/crypto/krb/old/Makefile.in +++ b/src/lib/crypto/krb/old/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/krb/old +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/krb/prf/Makefile.in b/src/lib/crypto/krb/prf/Makefile.in index a0e1ad6b1..475d06b94 100644 --- a/src/lib/crypto/krb/prf/Makefile.in +++ b/src/lib/crypto/krb/prf/Makefile.in @@ -1,15 +1,15 @@ -mydir=lib/crypto/krb/prf +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/krb/prng/Makefile.in b/src/lib/crypto/krb/prng/Makefile.in index 76a9388b8..64ee96e62 100644 --- a/src/lib/crypto/krb/prng/Makefile.in +++ b/src/lib/crypto/krb/prng/Makefile.in @@ -1,16 +1,19 @@ -mydir=lib/crypto/krb/prng +mydir=lib$(S)crypto$(S)krb$(S)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 diff --git a/src/lib/crypto/krb/prng/fortuna/Makefile.in b/src/lib/crypto/krb/prng/fortuna/Makefile.in index fd66e08c3..544f4a154 100644 --- a/src/lib/crypto/krb/prng/fortuna/Makefile.in +++ b/src/lib/crypto/krb/prng/fortuna/Makefile.in @@ -1,10 +1,10 @@ -mydir=lib/crypto/krb/prng/fortuna +mydir=lib$(S)crypto$(S)krb$(S)prng$(S)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) diff --git a/src/lib/crypto/krb/prng/nss/Makefile.in b/src/lib/crypto/krb/prng/nss/Makefile.in index 66b089383..a02607672 100644 --- a/src/lib/crypto/krb/prng/nss/Makefile.in +++ b/src/lib/crypto/krb/prng/nss/Makefile.in @@ -1,7 +1,8 @@ -mydir=lib/crypto/krb/prng/nss +mydir=lib$(S)crypto$(S)krb$(S)prng$(S)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) diff --git a/src/lib/crypto/krb/prng/yarrow/Makefile.in b/src/lib/crypto/krb/prng/yarrow/Makefile.in index 40dd85aa0..3ecb64a4f 100644 --- a/src/lib/crypto/krb/prng/yarrow/Makefile.in +++ b/src/lib/crypto/krb/prng/yarrow/Makefile.in @@ -1,14 +1,14 @@ -mydir=lib/crypto/krb/prng/yarrow +mydir=lib$(S)crypto$(S)krb$(S)prng$(S)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) diff --git a/src/lib/crypto/krb/rand2key/Makefile.in b/src/lib/crypto/krb/rand2key/Makefile.in index adde89b94..7d1fb0705 100644 --- a/src/lib/crypto/krb/rand2key/Makefile.in +++ b/src/lib/crypto/krb/rand2key/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/krb/rand2key +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/krb/raw/Makefile.in b/src/lib/crypto/krb/raw/Makefile.in index 147b1d52e..f0b32b536 100644 --- a/src/lib/crypto/krb/raw/Makefile.in +++ b/src/lib/crypto/krb/raw/Makefile.in @@ -1,11 +1,11 @@ -mydir=lib/crypto/krb/raw +mydir=lib$(S)crypto$(S)krb$(S)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) diff --git a/src/lib/crypto/nss/Makefile.in b/src/lib/crypto/nss/Makefile.in index c50a74a84..7016e924b 100644 --- a/src/lib/crypto/nss/Makefile.in +++ b/src/lib/crypto/nss/Makefile.in @@ -1,6 +1,7 @@ -mydir=lib/crypto/nss +mydir=lib$(S)crypto$(S)nss BUILDTOP=$(REL)..$(S)..$(S).. SUBDIRS=des aes camellia md4 md5 sha1 sha2 enc_provider hash_provider +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ LOCALINCLUDES = -I$(srcdir)/../krb \ -I$(srcdir)/../krb/hash_provider \ -I$(srcdir)/des \ @@ -11,18 +12,12 @@ LOCALINCLUDES = -I$(srcdir)/../krb \ -I$(srcdir)/md5 \ -I$(srcdir)/enc_provider \ -I$(srcdir)/hash_provider \ - @CRYPTO_IMPL_CFLAGS@ + $(CRYPTO_IMPL_CFLAGS) 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)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)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 - STLIBOBJS=\ hmac.o \ pbkdf2.o @@ -50,8 +45,6 @@ SUBDIROBJLISTS= des/OBJS.ST md4/OBJS.ST \ aes/OBJS.ST \ camellia/OBJS.ST -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend @@ -59,97 +52,6 @@ depend:: $(SRCS) clean-unix:: clean-libobjs -all-windows:: - cd ..\des - @echo Making in crypto\des - $(MAKE) -$(MFLAGS) - cd ..\md4 - @echo Making in crypto\md4 - $(MAKE) -$(MFLAGS) - cd ..\md5 - @echo Making in crypto\md5 - $(MAKE) -$(MFLAGS) - cd ..\sha1 - @echo Making in crypto\sha1 - $(MAKE) -$(MFLAGS) - cd ..\sha2 - @echo Making in crypto\sh2a - $(MAKE) -$(MFLAGS) - cd ..\hash_provider - @echo Making in crypto\hash_provider - $(MAKE) -$(MFLAGS) - cd ..\enc_provider - @echo Making in crypto\enc_provider - $(MAKE) -$(MFLAGS) - cd ..\aes - @echo Making in crypto\aes - $(MAKE) -$(MFLAGS) - cd ..\camellia - @echo Making in crypto\aes - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd ..\des - @echo Making clean in crypto\des - $(MAKE) -$(MFLAGS) clean - cd ..\md4 - @echo Making clean in crypto\md4 - $(MAKE) -$(MFLAGS) clean - cd ..\md5 - @echo Making clean in crypto\md5 - $(MAKE) -$(MFLAGS) clean - cd ..\sha2 - @echo Making clean in crypto\sha2 - $(MAKE) -$(MFLAGS) clean - cd ..\sha1 - @echo Making clean in crypto\sha1 - $(MAKE) -$(MFLAGS) clean - cd ..\hash_provider - @echo Making clean in crypto\hash_provider - $(MAKE) -$(MFLAGS) clean - cd ..\enc_provider - @echo Making clean in crypto\enc_provider - $(MAKE) -$(MFLAGS) clean - cd ..\aes - @echo Making clean in crypto\aes - $(MAKE) -$(MFLAGS) clean - cd ..\camellia - @echo Making clean in crypto\aes - $(MAKE) -$(MFLAGS) clean - cd .. - -check-windows:: - cd ..\des - @echo Making check in crypto\des - $(MAKE) -$(MFLAGS) check - cd ..\md4 - @echo Making check in crypto\md4 - $(MAKE) -$(MFLAGS) check - cd ..\md5 - @echo Making check in crypto\md5 - $(MAKE) -$(MFLAGS) check - cd ..\sha1 - @echo Making check in crypto\sha1 - $(MAKE) -$(MFLAGS) check - cd ..\sha2 - @echo Making check in crypto\sha2 - $(MAKE) -$(MFLAGS) check - cd ..\hash_provider - @echo Making check in crypto\hash_provider - $(MAKE) -$(MFLAGS) check - cd ..\enc_provider - @echo Making check in crypto\enc_provider - $(MAKE) -$(MFLAGS) check - cd ..\aes - @echo Making check in crypto\aes - $(MAKE) -$(MFLAGS) check - cd ..\camellia - @echo Making check in crypto\aes - $(MAKE) -$(MFLAGS) check - cd .. - - @lib_frag@ @libobj_frag@ diff --git a/src/lib/crypto/nss/aes/Makefile.in b/src/lib/crypto/nss/aes/Makefile.in index 9855eafb0..ffbd4ba50 100644 --- a/src/lib/crypto/nss/aes/Makefile.in +++ b/src/lib/crypto/nss/aes/Makefile.in @@ -2,15 +2,11 @@ # system currently assumes that all modules have the same directory # structure. -mydir=lib/crypto/nss/aes +mydir=lib$(S)crypto$(S)nss$(S)aes BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk -I$(srcdir)/../../../../include DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=aes -##DOS##OBJFILE=..\$(OUTPRE)aes.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -21,20 +17,13 @@ OBJS= SRCS= -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check:: - - clean-unix:: clean-libobjs -clean:: - @libobj_frag@ diff --git a/src/lib/crypto/nss/camellia/Makefile.in b/src/lib/crypto/nss/camellia/Makefile.in index c937f2197..b8feffc5d 100644 --- a/src/lib/crypto/nss/camellia/Makefile.in +++ b/src/lib/crypto/nss/camellia/Makefile.in @@ -2,15 +2,11 @@ # system currently assumes that all modules have the same directory # structure. -mydir=lib/crypto/nss/camellia +mydir=lib$(S)crypto$(S)nss$(S)camellia BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk -I$(srcdir)/../../../../include DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=camellia -##DOS##OBJFILE=..\$(OUTPRE)camellia.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -21,20 +17,13 @@ OBJS= SRCS= -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check:: - - clean-unix:: clean-libobjs -clean:: - @libobj_frag@ diff --git a/src/lib/crypto/nss/des/Makefile.in b/src/lib/crypto/nss/des/Makefile.in index d97fcfbd8..c8ab6e429 100644 --- a/src/lib/crypto/nss/des/Makefile.in +++ b/src/lib/crypto/nss/des/Makefile.in @@ -1,13 +1,11 @@ -mydir=lib/crypto/nss/des +mydir=lib$(S)crypto$(S)nss$(S)des BUILDTOP=$(REL)..$(S)..$(S)..$(S).. -LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. -I$(srcdir)/../../krb @CRYPTO_IMPL_CFLAGS@ +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ +LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. -I$(srcdir)/../../krb \ + $(CRYPTO_IMPL_CFLAGS) DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=des -##DOS##OBJFILE=..\$(OUTPRE)des.lst - RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -29,20 +27,12 @@ SRCS= $(srcdir)/f_parity.c \ $(srcdir)/string2key.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs -check-unix:: - includes:: depend depend:: $(SRCS) -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/nss/enc_provider/Makefile.in b/src/lib/crypto/nss/enc_provider/Makefile.in index c7950d642..579072df3 100644 --- a/src/lib/crypto/nss/enc_provider/Makefile.in +++ b/src/lib/crypto/nss/enc_provider/Makefile.in @@ -1,18 +1,15 @@ -mydir=lib/crypto/nss/enc_provider +mydir=lib$(S)crypto$(S)nss$(S)enc_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ LOCALINCLUDES = -I$(srcdir)/../des \ -I$(srcdir)/../arcfour \ -I$(srcdir)/../aes \ -I$(srcdir)/../../krb \ -I$(srcdir)/../../krb/rand2key \ -I$(srcdir)/.. -I$(srcdir)/. \ - @CRYPTO_IMPL_CFLAGS@ + $(CRYPTO_IMPL_CFLAGS) DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=enc_provider -##DOS##OBJFILE=..\$(OUTPRE)enc_prov.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -40,8 +37,6 @@ SRCS= \ $(srcdir)/camellia.c \ $(srcdir)/rc4.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend diff --git a/src/lib/crypto/nss/hash_provider/Makefile.in b/src/lib/crypto/nss/hash_provider/Makefile.in index 2530559d9..719b50079 100644 --- a/src/lib/crypto/nss/hash_provider/Makefile.in +++ b/src/lib/crypto/nss/hash_provider/Makefile.in @@ -1,15 +1,12 @@ -mydir=lib/crypto/nss/hash_provider +mydir=lib$(S)crypto$(S)nss$(S)hash_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ LOCALINCLUDES = -I$(srcdir)/../../krb/crc32 -I$(srcdir)/../md4 \ -I$(srcdir)/.. -I$(srcdir)/../../krb \ - @CRYPTO_IMPL_CFLAGS@ + $(CRYPTO_IMPL_CFLAGS) DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=hash_provider -##DOS##OBJFILE=..\$(OUTPRE)hash_pro.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -32,8 +29,6 @@ SRCS= $(srcdir)/hash_gen.c \ $(srcdir)/hash_md5.c \ $(srcdir)/hash_sha1.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend diff --git a/src/lib/crypto/nss/md4/Makefile.in b/src/lib/crypto/nss/md4/Makefile.in index f7cb02835..dfb0182fa 100644 --- a/src/lib/crypto/nss/md4/Makefile.in +++ b/src/lib/crypto/nss/md4/Makefile.in @@ -1,12 +1,8 @@ -mydir=lib/crypto/nss/md4 +mydir=lib$(S)crypto$(S)nss$(S)md4 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir) DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=md4 -##DOS##OBJFILE=..\$(OUTPRE)md4.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -16,21 +12,12 @@ OBJS= $(OUTPRE)md4.$(OBJEXT) SRCS= $(srcdir)/md4.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) - -check-unix:: - -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/nss/md5/Makefile.in b/src/lib/crypto/nss/md5/Makefile.in index 94a9e5437..b0cde50e9 100644 --- a/src/lib/crypto/nss/md5/Makefile.in +++ b/src/lib/crypto/nss/md5/Makefile.in @@ -1,14 +1,11 @@ -mydir=lib/crypto/nss/md5 +mydir=lib$(S)crypto$(S)nss$(S)md5 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=md5 -##DOS##OBJFILE=..\$(OUTPRE)md5.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) -LOCALINCLUDES = -I$(srcdir)/.. @CRYPTO_IMPL_CFLAGS@ +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ +LOCALINCLUDES = -I$(srcdir)/.. $(CRYPTO_IMPL_CFLAGS) STLIBOBJS= md5.o @@ -17,20 +14,12 @@ OBJS= $(OUTPRE)md5.$(OBJEXT) SRCS= $(srcdir)/md5.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check-unix:: - -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/nss/sha1/Makefile.in b/src/lib/crypto/nss/sha1/Makefile.in index a7cb6e824..82d6d9b91 100644 --- a/src/lib/crypto/nss/sha1/Makefile.in +++ b/src/lib/crypto/nss/sha1/Makefile.in @@ -1,11 +1,8 @@ -mydir=lib/crypto/nss/sha1 +mydir=lib$(S)crypto$(S)nss$(S)sha1 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -LOCALINCLUDES = -I$(srcdir)/.. @CRYPTO_IMPL_CFLAGS@ - -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=sha1 -##DOS##OBJFILE=..\$(OUTPRE)sha1.lst +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ +LOCALINCLUDES = -I$(srcdir)/.. $(CRYPTO_IMPL_CFLAGS) PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -16,16 +13,12 @@ OBJS= $(OUTPRE)shs.$(OBJEXT) SRCS= $(srcdir)/shs.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/nss/sha2/Makefile.in b/src/lib/crypto/nss/sha2/Makefile.in index b42462eb2..a8edb60d9 100644 --- a/src/lib/crypto/nss/sha2/Makefile.in +++ b/src/lib/crypto/nss/sha2/Makefile.in @@ -1,11 +1,8 @@ -mydir=lib/crypto/nss/sha2 +mydir=lib$(S)crypto$(S)nss$(S)sha2 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -LOCALINCLUDES = -I$(srcdir)/.. @CRYPTO_IMPL_CFLAGS@ - -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=sha1 -##DOS##OBJFILE=..\$(OUTPRE)sha2.lst +CRYPTO_IMPL_CFLAGS=@CRYPTO_IMPL_CFLAGS@ +LOCALINCLUDES = -I$(srcdir)/.. $(CRYPTO_IMPL_CFLAGS) PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -16,16 +13,12 @@ OBJS= $(OUTPRE)sha2.$(OBJEXT) SRCS= $(srcdir)/sha2.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/openssl/Makefile.in b/src/lib/crypto/openssl/Makefile.in index f333c17ab..ff43d56d8 100644 --- a/src/lib/crypto/openssl/Makefile.in +++ b/src/lib/crypto/openssl/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/crypto/openssl +mydir=lib$(S)crypto$(S)openssl BUILDTOP=$(REL)..$(S)..$(S).. SUBDIRS=camellia des aes md4 md5 sha1 sha2 enc_provider hash_provider LOCALINCLUDES = -I$(srcdir)/../krb \ @@ -15,12 +15,6 @@ 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)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)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 - STLIBOBJS=\ hmac.o \ init.o \ @@ -49,8 +43,6 @@ SUBDIROBJLISTS= des/OBJS.ST md4/OBJS.ST \ hash_provider/OBJS.ST \ aes/OBJS.ST -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend @@ -58,85 +50,6 @@ depend:: $(SRCS) clean-unix:: clean-libobjs -all-windows:: - cd ..\des - @echo Making in crypto\des - $(MAKE) -$(MFLAGS) - cd ..\md4 - @echo Making in crypto\md4 - $(MAKE) -$(MFLAGS) - cd ..\md5 - @echo Making in crypto\md5 - $(MAKE) -$(MFLAGS) - cd ..\sha1 - @echo Making in crypto\sha1 - $(MAKE) -$(MFLAGS) - cd ..\sha2 - @echo Making in crypto\sha2 - $(MAKE) -$(MFLAGS) - cd ..\hash_provider - @echo Making in crypto\hash_provider - $(MAKE) -$(MFLAGS) - cd ..\enc_provider - @echo Making in crypto\enc_provider - $(MAKE) -$(MFLAGS) - cd ..\aes - @echo Making in crypto\aes - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd ..\des - @echo Making clean in crypto\des - $(MAKE) -$(MFLAGS) clean - cd ..\md4 - @echo Making clean in crypto\md4 - $(MAKE) -$(MFLAGS) clean - cd ..\md5 - @echo Making clean in crypto\md5 - $(MAKE) -$(MFLAGS) clean - cd ..\sha1 - @echo Making clean in crypto\sha1 - $(MAKE) -$(MFLAGS) clean - cd ..\sha2 - @echo Making clean in crypto\sha2 - $(MAKE) -$(MFLAGS) clean - cd ..\hash_provider - @echo Making clean in crypto\hash_provider - $(MAKE) -$(MFLAGS) clean - cd ..\enc_provider - @echo Making clean in crypto\enc_provider - $(MAKE) -$(MFLAGS) clean - cd ..\aes - @echo Making clean in crypto\aes - $(MAKE) -$(MFLAGS) clean - cd .. - -check-windows:: - cd ..\des - @echo Making check in crypto\des - $(MAKE) -$(MFLAGS) check - cd ..\md4 - @echo Making check in crypto\md4 - $(MAKE) -$(MFLAGS) check - cd ..\md5 - @echo Making check in crypto\md5 - $(MAKE) -$(MFLAGS) check - cd ..\sha1 - @echo Making check in crypto\sha1 - $(MAKE) -$(MFLAGS) check - cd ..\hash_provider - @echo Making check in crypto\hash_provider - $(MAKE) -$(MFLAGS) check - cd ..\enc_provider - @echo Making check in crypto\enc_provider - $(MAKE) -$(MFLAGS) check - cd ..\aes - @echo Making check in crypto\aes - $(MAKE) -$(MFLAGS) check - cd .. - - @lib_frag@ @libobj_frag@ diff --git a/src/lib/crypto/openssl/aes/Makefile.in b/src/lib/crypto/openssl/aes/Makefile.in index 6352c3dc2..b8a7de924 100644 --- a/src/lib/crypto/openssl/aes/Makefile.in +++ b/src/lib/crypto/openssl/aes/Makefile.in @@ -2,15 +2,11 @@ # system currently assumes that all modules have the same directory # structure. -mydir=lib/crypto/openssl/aes +mydir=lib$(S)crypto$(S)openssl$(S)aes BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk -I$(srcdir)/../../../../include DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=aes -##DOS##OBJFILE=..\$(OUTPRE)aes.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -20,21 +16,13 @@ OBJS= SRCS= - -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check:: - - clean-unix:: clean-libobjs -clean:: - @libobj_frag@ diff --git a/src/lib/crypto/openssl/camellia/Makefile.in b/src/lib/crypto/openssl/camellia/Makefile.in index 5e36d5070..c300cd455 100644 --- a/src/lib/crypto/openssl/camellia/Makefile.in +++ b/src/lib/crypto/openssl/camellia/Makefile.in @@ -2,15 +2,11 @@ # system currently assumes that all modules have the same directory # structure. -mydir=lib/crypto/openssl/camellia +mydir=lib$(S)crypto$(S)openssl$(S)camellia BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../../krb/dk -I$(srcdir)/../../../../include DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=camellia -##DOS##OBJFILE=..\$(OUTPRE)camellia.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -21,20 +17,13 @@ OBJS= SRCS= -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check:: - - clean-unix:: clean-libobjs -clean:: - @libobj_frag@ diff --git a/src/lib/crypto/openssl/des/Makefile.in b/src/lib/crypto/openssl/des/Makefile.in index 627b5cc7f..335c7e53c 100644 --- a/src/lib/crypto/openssl/des/Makefile.in +++ b/src/lib/crypto/openssl/des/Makefile.in @@ -1,12 +1,8 @@ -mydir=lib/crypto/openssl/des +mydir=lib$(S)crypto$(S)openssl$(S)des BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir)/../.. -I$(srcdir)/../../krb DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=des -##DOS##OBJFILE=..\$(OUTPRE)des.lst - RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -28,20 +24,12 @@ SRCS= $(srcdir)/f_parity.c \ $(srcdir)/string2key.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs -check-unix:: - includes:: depend depend:: $(SRCS) -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/openssl/enc_provider/Makefile.in b/src/lib/crypto/openssl/enc_provider/Makefile.in index e974da406..24f6b3045 100644 --- a/src/lib/crypto/openssl/enc_provider/Makefile.in +++ b/src/lib/crypto/openssl/enc_provider/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/crypto/openssl/enc_provider +mydir=lib$(S)crypto$(S)openssl$(S)enc_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/../des \ -I$(srcdir)/../arcfour \ @@ -9,10 +9,6 @@ LOCALINCLUDES = -I$(srcdir)/../des \ -I$(srcdir)/.. -I$(srcdir)/. DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=enc_provider -##DOS##OBJFILE=..\$(OUTPRE)enc_prov.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -39,8 +35,6 @@ SRCS= \ $(srcdir)/camellia.c \ $(srcdir)/rc4.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend @@ -50,4 +44,3 @@ depend:: $(SRCS) clean-unix:: clean-libobjs @libobj_frag@ - diff --git a/src/lib/crypto/openssl/hash_provider/Makefile.in b/src/lib/crypto/openssl/hash_provider/Makefile.in index b5a7dcfeb..472dbd393 100644 --- a/src/lib/crypto/openssl/hash_provider/Makefile.in +++ b/src/lib/crypto/openssl/hash_provider/Makefile.in @@ -1,13 +1,9 @@ -mydir=lib/crypto/openssl/hash_provider +mydir=lib$(S)crypto$(S)openssl$(S)hash_provider BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir)/../../krb/crc32 -I$(srcdir)/../md4 \ -I$(srcdir)/../md5 -I$(srcdir)/../sha1 -I$(srcdir)/../../krb DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=hash_provider -##DOS##OBJFILE=..\$(OUTPRE)hash_pro.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -27,8 +23,6 @@ SRCS= $(srcdir)/hash_crc32.c \ $(srcdir)/hash_md5.c \ $(srcdir)/hash_sha1.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend diff --git a/src/lib/crypto/openssl/md4/Makefile.in b/src/lib/crypto/openssl/md4/Makefile.in index f212c6d51..550d7df60 100644 --- a/src/lib/crypto/openssl/md4/Makefile.in +++ b/src/lib/crypto/openssl/md4/Makefile.in @@ -1,12 +1,8 @@ -mydir=lib/crypto/openssl/md4 +mydir=lib$(S)crypto$(S)openssl$(S)md4 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = -I$(srcdir) DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=md4 -##DOS##OBJFILE=..\$(OUTPRE)md4.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -16,21 +12,12 @@ OBJS= $(OUTPRE)md4.$(OBJEXT) SRCS= $(srcdir)/md4.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) - -check-unix:: - -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/openssl/md5/Makefile.in b/src/lib/crypto/openssl/md5/Makefile.in index 1b693c420..9c3d34091 100644 --- a/src/lib/crypto/openssl/md5/Makefile.in +++ b/src/lib/crypto/openssl/md5/Makefile.in @@ -1,11 +1,7 @@ -mydir=lib/crypto/openssl/md5 +mydir=lib$(S)crypto$(S)openssl$(S)md5 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=md5 -##DOS##OBJFILE=..\$(OUTPRE)md5.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -15,20 +11,12 @@ OBJS= $(OUTPRE)md5.$(OBJEXT) SRCS= $(srcdir)/md5.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -check-unix:: - -check-windows:: - -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/openssl/sha1/Makefile.in b/src/lib/crypto/openssl/sha1/Makefile.in index 0ec25872e..b2dcec6b9 100644 --- a/src/lib/crypto/openssl/sha1/Makefile.in +++ b/src/lib/crypto/openssl/sha1/Makefile.in @@ -1,11 +1,7 @@ -mydir=lib/crypto/openssl/sha1 +mydir=lib$(S)crypto$(S)openssl$(S)sha1 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=sha1 -##DOS##OBJFILE=..\$(OUTPRE)sha1.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -15,16 +11,12 @@ OBJS= $(OUTPRE)shs.$(OBJEXT) SRCS= $(srcdir)/shs.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/crypto/openssl/sha2/Makefile.in b/src/lib/crypto/openssl/sha2/Makefile.in index 6a4a27648..edb93bd27 100644 --- a/src/lib/crypto/openssl/sha2/Makefile.in +++ b/src/lib/crypto/openssl/sha2/Makefile.in @@ -1,11 +1,7 @@ -mydir=lib/crypto/openssl/sha2 +mydir=lib$(S)crypto$(S)openssl$(S)sha2 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFS= -##DOS##BUILDTOP = ..\..\..\.. -##DOS##PREFIXDIR=sha2 -##DOS##OBJFILE=..\$(OUTPRE)sha256.lst - PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) @@ -15,16 +11,12 @@ OBJS= $(OUTPRE)sha256.$(OBJEXT) SRCS= $(srcdir)/sha256.c -##DOS##LIBOBJS = $(OBJS) - all-unix:: all-libobjs includes:: depend depend:: $(SRCS) -clean:: - clean-unix:: clean-libobjs @libobj_frag@ diff --git a/src/lib/gssapi/Makefile.in b/src/lib/gssapi/Makefile.in index 1316c29fe..58658fd0e 100644 --- a/src/lib/gssapi/Makefile.in +++ b/src/lib/gssapi/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/gssapi +mydir=lib$(S)gssapi BUILDTOP=$(REL)..$(S).. SUBDIRS= generic krb5 spnego mechglue DEFS=-D_GSS_STATIC_LINK=1 @@ -49,44 +49,14 @@ EHDRDIR=$(BUILDTOP)$(S)include$(S)gssapi EXPORTED_HEADERS= \ $(EHDRDIR)$(S)gssapi_krb5.h \ $(EHDRDIR)$(S)gssapi_generic.h \ - $(EHDRDIR)$(S)gssapi.h + $(EHDRDIR)$(S)gssapi.h \ + $(EHDRDIR)$(S)gssapi_ext.h merged-gssapi-header.h: $(EXPORTED_HEADERS) cat $(EXPORTED_HEADERS) > merged.tmp $(MV) merged.tmp merged-gssapi-header.h verify-calling-conventions-gssapi: merged-gssapi-header.h $(PERL) -w $(top_srcdir)/util/def-check.pl merged-gssapi-header.h $(srcdir)/../gssapi32.def -all-windows:: - cd generic - @echo Making in gssapi\generic - $(MAKE) -$(MFLAGS) - cd ..\krb5 - @echo Making in gssapi\krb5 - $(MAKE) -$(MFLAGS) - cd ..\mechglue - @echo Making in gssapi\mechglue - $(MAKE) -$(MFLAGS) - cd ..\spnego - @echo Making in gssapi\spnego - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd generic - @echo Making clean in gssapi\generic - $(MAKE) -$(MFLAGS) clean - cd ..\krb5 - @echo Making clean in gssapi\krb5 - $(MAKE) -$(MFLAGS) clean - cd ..\mechglue - @echo Making clean in gssapi\mechglue - $(MAKE) -$(MFLAGS) clean - cd ..\spnego - @echo Making clean in gssapi\spnego - $(MAKE) -$(MFLAGS) clean - cd .. - @echo Making clean in gssapi - # These rules are an attempt to handle several different problems: # # Certain files in subdirectories must be made current by the diff --git a/src/lib/gssapi/generic/Makefile.in b/src/lib/gssapi/generic/Makefile.in index e4a0d58d0..9221d0b9a 100644 --- a/src/lib/gssapi/generic/Makefile.in +++ b/src/lib/gssapi/generic/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/gssapi/generic +mydir=lib$(S)gssapi$(S)generic BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I. -I$(srcdir) -I$(srcdir)/.. DEFS= @@ -39,13 +39,14 @@ $(OUTPRE)gssapi_err_generic.$(OBJEXT): gssapi_err_generic.c gssapi_err_generic.h: gssapi_err_generic.et gssapi_err_generic.c: gssapi_err_generic.et +##DOS##!if 0 include_stdint=@include_stdint@ include_inttypes=@include_inttypes@ 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. */"; \ @@ -55,6 +56,9 @@ gssapi.h: gssapi.hin $(BUILDTOP)/include/autoconf.h echo "/* End of gssapi.h prologue. */"&& \ cat $(srcdir)/gssapi.hin )> $$h && \ (set -x; $(MV) $$h $@) ; e=$$?; $(RM) $$h; exit $$e +##DOS##!endif +##DOS##gssapi.h: gssapi.hin +##DOS## $(CP) $** $@ #if HasHashLibrary # UTIL_VALIDATE_SRC= $(srcdir)/util_validate.c diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index a439bef7c..0ff0d39b2 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/gssapi/krb5 +mydir=lib$(S)gssapi$(S)krb5 BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I. -I$(srcdir) -I$(srcdir)/.. -I../generic -I$(srcdir)/../generic -I../mechglue -I$(srcdir)/../mechglue DEFS=-D_GSS_STATIC_LINK=1 @@ -237,7 +237,8 @@ error_map.h: $(top_srcdir)/util/gen-map.pl \ VALUE="char *" \ COMPARE=compare_OM_uint32 \ FREEVALUE=free_string - $(MV) error_map.new error_map.h + $(RM) $@ + $(MV) error_map.new $@ clean-unix:: $(RM) $(BUILDTOP)/include/gssapi/gssapi_krb5.h diff --git a/src/lib/gssapi/krb5/copy_ccache.c b/src/lib/gssapi/krb5/copy_ccache.c index efc68073d..fbb7a48a1 100644 --- a/src/lib/gssapi/krb5/copy_ccache.c +++ b/src/lib/gssapi/krb5/copy_ccache.c @@ -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, diff --git a/src/lib/gssapi/krb5/get_tkt_flags.c b/src/lib/gssapi/krb5/get_tkt_flags.c index 07f0c9727..636fc04db 100644 --- a/src/lib/gssapi/krb5/get_tkt_flags.c +++ b/src/lib/gssapi/krb5/get_tkt_flags.c @@ -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, diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index ce0265234..1e2eb2929 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -997,7 +997,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, @@ -1006,7 +1006,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, @@ -1020,11 +1020,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" @@ -1040,7 +1038,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, @@ -1112,7 +1110,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, diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index 25534e56b..50d4e36dd 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -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 diff --git a/src/lib/gssapi/krb5/krb5_gss_glue.c b/src/lib/gssapi/krb5/krb5_gss_glue.c index eb9dd83ca..bc3b7c7f9 100644 --- a/src/lib/gssapi/krb5/krb5_gss_glue.c +++ b/src/lib/gssapi/krb5/krb5_gss_glue.c @@ -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 diff --git a/src/lib/gssapi/krb5/lucid_context.c b/src/lib/gssapi/krb5/lucid_context.c index b1454cf71..6fe069bda 100644 --- a/src/lib/gssapi/krb5/lucid_context.c +++ b/src/lib/gssapi/krb5/lucid_context.c @@ -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) { diff --git a/src/lib/gssapi/krb5/set_allowable_enctypes.c b/src/lib/gssapi/krb5/set_allowable_enctypes.c index de1c5a4db..0daf8b135 100644 --- a/src/lib/gssapi/krb5/set_allowable_enctypes.c +++ b/src/lib/gssapi/krb5/set_allowable_enctypes.c @@ -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, diff --git a/src/lib/gssapi/krb5/set_ccache.c b/src/lib/gssapi/krb5/set_ccache.c index 7d52608df..4b6c89065 100644 --- a/src/lib/gssapi/krb5/set_ccache.c +++ b/src/lib/gssapi/krb5/set_ccache.c @@ -31,7 +31,7 @@ #include #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, diff --git a/src/lib/gssapi/mechglue/Makefile.in b/src/lib/gssapi/mechglue/Makefile.in index d2dccb46b..7bb2069da 100644 --- a/src/lib/gssapi/mechglue/Makefile.in +++ b/src/lib/gssapi/mechglue/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/gssapi/mechglue +mydir=lib$(S)gssapi$(S)mechglue BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I. -I$(srcdir) -I$(srcdir)/.. -I../generic -I$(srcdir)/../generic -I../krb5 -I$(srcdir)/../krb5 -I../spnego -I$(srcdir)/../spnego DEFS=-D_GSS_STATIC_LINK=1 diff --git a/src/lib/gssapi/mechglue/g_mechattr.c b/src/lib/gssapi/mechglue/g_mechattr.c index d23f32664..5f863e38b 100644 --- a/src/lib/gssapi/mechglue/g_mechattr.c +++ b/src/lib/gssapi/mechglue/g_mechattr.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_oid_ops.c b/src/lib/gssapi/mechglue/g_oid_ops.c index a68aca9ed..f87febfb2 100644 --- a/src/lib/gssapi/mechglue/g_oid_ops.c +++ b/src/lib/gssapi/mechglue/g_oid_ops.c @@ -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, diff --git a/src/lib/gssapi/mechglue/g_store_cred.c b/src/lib/gssapi/mechglue/g_store_cred.c index 3b286ecd4..f7de1d613 100644 --- a/src/lib/gssapi/mechglue/g_store_cred.c +++ b/src/lib/gssapi/mechglue/g_store_cred.c @@ -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; diff --git a/src/lib/gssapi/mechglue/mglueP.h b/src/lib/gssapi/mechglue/mglueP.h index 63d89c771..3524ceae4 100644 --- a/src/lib/gssapi/mechglue/mglueP.h +++ b/src/lib/gssapi/mechglue/mglueP.h @@ -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 */ diff --git a/src/lib/gssapi/spnego/Makefile.in b/src/lib/gssapi/spnego/Makefile.in index 16741eba4..49f67abc5 100644 --- a/src/lib/gssapi/spnego/Makefile.in +++ b/src/lib/gssapi/spnego/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/gssapi/spnego +mydir=lib$(S)gssapi$(S)spnego BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I. -I$(srcdir) -I$(srcdir)/.. -I../generic -I$(srcdir)/../generic -I../mechglue -I$(srcdir)/../mechglue DEFS=-D_GSS_STATIC_LINK=1 diff --git a/src/lib/gssapi/spnego/gssapiP_spnego.h b/src/lib/gssapi/spnego/gssapiP_spnego.h index 50f05678d..3c2edbbdd 100644 --- a/src/lib/gssapi/spnego/gssapiP_spnego.h +++ b/src/lib/gssapi/spnego/gssapiP_spnego.h @@ -13,7 +13,6 @@ extern "C" { #endif #include -#include #define SEC_CONTEXT_TOKEN 1 #define SPNEGO_SIZE_OF_INT 4 diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 519050a14..784714669 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -61,8 +61,6 @@ */ /* #pragma ident "@(#)spnego_mech.c 1.7 04/09/28 SMI" */ -#include -#include #include #include #include @@ -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, diff --git a/src/lib/gssapi32.def b/src/lib/gssapi32.def index fa36f51ed..7c71fa53f 100644 --- a/src/lib/gssapi32.def +++ b/src/lib/gssapi32.def @@ -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 @70 + gss_acquire_cred_with_password @71 + gss_add_buffer_set_member @72 + gss_add_cred_impersonate_name @73 + gss_complete_auth_token @74 + gss_create_empty_buffer_set @75 + gss_delete_name_attribute @76 + gss_display_mech_attr @77 + gss_display_name_ext @78 + gss_export_name_composite @79 + gss_get_name_attribute @80 + gss_indicate_mechs_by_attrs @81 + gss_inquire_attrs_for_mech @82 + gss_inquire_cred_by_oid @83 + gss_inquire_mech_for_saslname @84 + gss_inquire_name @85 + gss_inquire_saslname_for_mech @86 + gss_inquire_sec_context_by_oid @87 + gsskrb5_extract_authtime_from_sec_context @88 + gsskrb5_extract_authz_data_from_sec_context @89 + gss_krb5_import_cred @90 + gss_krb5_set_cred_rcache @91 + gss_map_name_to_any @92 + gss_pseudo_random @93 + gss_release_any_name_mapping @94 + gss_release_buffer_set @95 + gss_release_iov_buffer @96 + gss_set_cred_option @97 + gss_set_name_attribute @98 + gss_set_neg_mechs @99 + gss_set_sec_context_option @100 + gss_store_cred @101 + gss_unwrap_aead @102 + gss_unwrap_iov @103 + gss_wrap_aead @104 + gss_wrap_iov @105 + gss_wrap_iov_length @106 + + GSS_C_INQ_SSPI_SESSION_KEY @107 DATA + GSS_C_MA_AUTH_INIT @108 DATA + GSS_C_MA_AUTH_INIT_ANON @109 DATA + GSS_C_MA_AUTH_INIT_INIT @110 DATA + GSS_C_MA_AUTH_TARG @111 DATA + GSS_C_MA_AUTH_TARG_ANON @112 DATA + GSS_C_MA_AUTH_TARG_INIT @113 DATA + GSS_C_MA_CBINDINGS @114 DATA + GSS_C_MA_COMPRESS @115 DATA + GSS_C_MA_CONF_PROT @116 DATA + GSS_C_MA_CTX_TRANS @117 DATA + GSS_C_MA_DELEG_CRED @118 DATA + GSS_C_MA_DEPRECATED @119 DATA + GSS_C_MA_INTEG_PROT @120 DATA + GSS_C_MA_ITOK_FRAMED @121 DATA + GSS_C_MA_MECH_COMPOSITE @122 DATA + GSS_C_MA_MECH_CONCRETE @123 DATA + GSS_C_MA_MECH_GLUE @124 DATA + GSS_C_MA_MECH_NEGO @125 DATA + GSS_C_MA_MECH_PSEUDO @126 DATA + GSS_C_MA_MIC @127 DATA + GSS_C_MA_NOT_DFLT_MECH @128 DATA + GSS_C_MA_NOT_MECH @129 DATA + GSS_C_MA_OOS_DET @130 DATA + GSS_C_MA_PFS @131 DATA + GSS_C_MA_PROT_READY @132 DATA + GSS_C_MA_REPLAY_DET @133 DATA + GSS_C_MA_WRAP @134 DATA + gss_mech_iakerb @135 DATA + gss_nt_exported_name @136 DATA + gss_nt_service_name_v2 @137 DATA diff --git a/src/lib/kadm5/Makefile.in b/src/lib/kadm5/Makefile.in index 24da56550..92085175f 100644 --- a/src/lib/kadm5/Makefile.in +++ b/src/lib/kadm5/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/kadm5 +mydir=lib$(S)kadm5 BUILDTOP=$(REL)..$(S).. SUBDIRS = clnt srv unit-test DEFS= diff --git a/src/lib/kadm5/clnt/Makefile.in b/src/lib/kadm5/clnt/Makefile.in index 81aeb2027..beda5da55 100644 --- a/src/lib/kadm5/clnt/Makefile.in +++ b/src/lib/kadm5/clnt/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/kadm5/clnt +mydir=lib$(S)kadm5$(S)clnt BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I$(BUILDTOP)/include/kadm5 DEFS= diff --git a/src/lib/kadm5/srv/Makefile.in b/src/lib/kadm5/srv/Makefile.in index 378e03c76..d57d6f08f 100644 --- a/src/lib/kadm5/srv/Makefile.in +++ b/src/lib/kadm5/srv/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/kadm5/srv +mydir=lib$(S)kadm5$(S)srv BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I$(BUILDTOP)/include/kadm5 \ -I$(top_srcdir)/lib/gssapi/krb5 -I$(top_srcdir)/lib/gssapi/generic \ diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/unit-test/Makefile.in index ecd64c124..f8d7b7847 100644 --- a/src/lib/kadm5/unit-test/Makefile.in +++ b/src/lib/kadm5/unit-test/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/kadm5/unit-test +mydir=lib$(S)kadm5$(S)unit-test BUILDTOP=$(REL)..$(S)..$(S).. DEFINES = PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/lib/kdb/Makefile.in b/src/lib/kdb/Makefile.in index 3781dfb9a..c49e1b56c 100644 --- a/src/lib/kdb/Makefile.in +++ b/src/lib/kdb/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/kdb +mydir=lib$(S)kdb BUILDTOP=$(REL)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/lib/krb5/Makefile.in b/src/lib/krb5/Makefile.in index adaba32aa..9b95c02ba 100644 --- a/src/lib/krb5/Makefile.in +++ b/src/lib/krb5/Makefile.in @@ -1,7 +1,8 @@ -mydir=lib/krb5 +mydir=lib$(S)krb5 BUILDTOP=$(REL)..$(S).. LOCALINCLUDES = -I$(srcdir)/ccache -I$(srcdir)/keytab -I$(srcdir)/rcache -I$(srcdir)/os -I$(srcdir)/unicode SUBDIRS= error_tables asn.1 ccache keytab krb os rcache unicode +WINSUBDIRS= $(SUBDIRS) posix DEFS= ##DOSBUILDTOP = ..\.. @@ -68,67 +69,6 @@ clean-unix:: clean-liblinks clean-libs clean-libobjs clean-windows:: $(RM) $(OUTPRE)krb5.lib krb5.bak -all-windows:: - cd asn.1 - @echo Making in krb5\asn.1 - $(MAKE) -$(MFLAGS) - cd ..\ccache - @echo Making in krb5\ccache - $(MAKE) -$(MFLAGS) - cd ..\error_tables - @echo Making in krb5\error_tables - $(MAKE) -$(MFLAGS) - cd ..\keytab - @echo Making in krb5\keytab - $(MAKE) -$(MFLAGS) - cd ..\krb - @echo Making in krb5\krb - $(MAKE) -$(MFLAGS) - cd ..\os - @echo Making in krb5\os - $(MAKE) -$(MFLAGS) - cd ..\posix - @echo Making in krb5\posix - $(MAKE) -$(MFLAGS) - cd ..\rcache - @echo Making in krb5\rcache - $(MAKE) -$(MFLAGS) - cd ..\unicode - @echo Making in krb5\unicode - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - cd asn.1 - @echo Making clean in krb5\asn.1 - $(MAKE) -$(MFLAGS) clean - cd ..\ccache - @echo Making clean in krb5\ccache - $(MAKE) -$(MFLAGS) clean - cd ..\error_tables - @echo Making clean in krb5\error_tables - $(MAKE) -$(MFLAGS) clean - cd ..\keytab - @echo Making clean in krb5\keytab - $(MAKE) -$(MFLAGS) clean - cd ..\krb - @echo Making clean in krb5\krb - $(MAKE) -$(MFLAGS) clean - cd ..\os - @echo Making clean in krb5\os - $(MAKE) -$(MFLAGS) clean - cd ..\posix - @echo Making clean in krb5\posix - $(MAKE) -$(MFLAGS) clean - cd ..\rcache - @echo Making clean in krb5\rcache - $(MAKE) -$(MFLAGS) clean - cd ..\unicode - @echo Making clean in krb5\unicode - $(MAKE) -$(MFLAGS) clean - cd .. - @echo Making clean locally - install-unix:: install-libs @lib_frag@ diff --git a/src/lib/krb5/asn.1/Makefile.in b/src/lib/krb5/asn.1/Makefile.in index d0566c120..ec8455ca6 100644 --- a/src/lib/krb5/asn.1/Makefile.in +++ b/src/lib/krb5/asn.1/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/asn.1 +mydir=lib$(S)krb5$(S)asn.1 BUILDTOP=$(REL)..$(S)..$(S).. DEFS= diff --git a/src/lib/krb5/asn.1/krb5_decode.c b/src/lib/krb5/asn.1/krb5_decode.c index 7aeb6bfe5..af5c65928 100644 --- a/src/lib/krb5/asn.1/krb5_decode.c +++ b/src/lib/krb5/asn.1/krb5_decode.c @@ -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, diff --git a/src/lib/krb5/ccache/Makefile.in b/src/lib/krb5/ccache/Makefile.in index b421c031f..021bd7602 100644 --- a/src/lib/krb5/ccache/Makefile.in +++ b/src/lib/krb5/ccache/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/ccache +mydir=lib$(S)krb5$(S)ccache BUILDTOP=$(REL)..$(S)..$(S).. SUBDIRS = # ccapi DEFS= diff --git a/src/lib/krb5/ccache/ccapi/Makefile.in b/src/lib/krb5/ccache/ccapi/Makefile.in index 135672b0c..7adfb208e 100644 --- a/src/lib/krb5/ccache/ccapi/Makefile.in +++ b/src/lib/krb5/ccache/ccapi/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/ccache/ccapi +mydir=lib$(S)krb5$(S)ccache$(S)ccapi BUILDTOP=$(REL)..$(S)..$(S)..$(S).. LOCALINCLUDES = $(WIN_INCLUDES) DEFS= -DUSE_CCAPI -DUSE_CCAPI_V3 diff --git a/src/lib/krb5/error_tables/Makefile.in b/src/lib/krb5/error_tables/Makefile.in index d340b7b15..eb890d196 100644 --- a/src/lib/krb5/error_tables/Makefile.in +++ b/src/lib/krb5/error_tables/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/error_tables +mydir=lib$(S)krb5$(S)error_tables BUILDTOP=$(REL)..$(S)..$(S).. DEFS= diff --git a/src/lib/krb5/keytab/Makefile.in b/src/lib/krb5/keytab/Makefile.in index 258eac7d3..ccb4a6a2a 100644 --- a/src/lib/krb5/keytab/Makefile.in +++ b/src/lib/krb5/keytab/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/keytab +mydir=lib$(S)krb5$(S)keytab BUILDTOP=$(REL)..$(S)..$(S).. DEFS= diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in index 0737a2e53..b96229986 100644 --- a/src/lib/krb5/krb/Makefile.in +++ b/src/lib/krb5/krb/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/krb +mydir=lib$(S)krb5$(S)krb BUILDTOP=$(REL)..$(S)..$(S).. RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) @@ -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) \ diff --git a/src/lib/krb5/krb/auth_con.c b/src/lib/krb5/krb/auth_con.c index 5efb37105..65c87667d 100644 --- a/src/lib/krb5/krb/auth_con.c +++ b/src/lib/krb5/krb/auth_con.c @@ -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) diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c index ac2859860..8fb22c6ed 100644 --- a/src/lib/krb5/krb/get_creds.c +++ b/src/lib/krb5/krb/get_creds.c @@ -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; diff --git a/src/lib/krb5/krb/kfree.c b/src/lib/krb5/krb/kfree.c index 6a8cdd522..476a513bb 100644 --- a/src/lib/krb5/krb/kfree.c +++ b/src/lib/krb5/krb/kfree.c @@ -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; diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index dc9d09b1e..903d86af1 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/os +mydir=lib$(S)krb5$(S)os BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c index 96a022f4d..5c4e21d6a 100644 --- a/src/lib/krb5/os/hst_realm.c +++ b/src/lib/krb5/os/hst_realm.c @@ -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) { diff --git a/src/lib/krb5/rcache/Makefile.in b/src/lib/krb5/rcache/Makefile.in index fec270bc7..83e709670 100644 --- a/src/lib/krb5/rcache/Makefile.in +++ b/src/lib/krb5/rcache/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/rcache +mydir=lib$(S)krb5$(S)rcache BUILDTOP=$(REL)..$(S)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/lib/krb5/unicode/Makefile.in b/src/lib/krb5/unicode/Makefile.in index 5ae89fbe7..63e08c9df 100644 --- a/src/lib/krb5/unicode/Makefile.in +++ b/src/lib/krb5/unicode/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/krb5/unicode +mydir=lib$(S)krb5$(S)unicode BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/lib/krb5_32.def b/src/lib/krb5_32.def index 569c9ff17..e74943700 100644 --- a/src/lib/krb5_32.def +++ b/src/lib/krb5_32.def @@ -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,12 +288,120 @@ EXPORTS krb5_free_error_message @134 krb5_clear_error_message @94 -; new in 1.7 - krb5_rd_rep_dce - krb5_mk_rep_dce - krb5_c_padding_length - krb5_c_crypto_length - krb5_c_encrypt_iov - krb5_c_decrypt_iov - krb5_c_make_checksum_iov - krb5_c_verify_checksum_iov +; new in 1.7-1.9 + krb5_rd_rep_dce @270 + krb5_mk_rep_dce @271 + krb5_c_padding_length @272 + krb5_c_crypto_length @273 + krb5_c_encrypt_iov @274 + krb5_c_decrypt_iov @275 + krb5_c_make_checksum_iov @276 + krb5_c_verify_checksum_iov @277 + krb5_allow_weak_crypto @278 + krb5_anonymous_principal @279 + krb5_anonymous_realm @280 + krb5_auth_con_getkey_k @281 + krb5_auth_con_getrecvsubkey_k @282 + krb5_auth_con_getsendsubkey_k @283 + krb5_auth_con_setrecvsubkey_k @284 + krb5_auth_con_setsendsubkey_k @285 + krb5_build_principal_alloc_va @286 + krb5_c_crypto_length_iov @287 + krb5_c_free_state @288 + krb5_c_fx_cf2_simple @289 + krb5_c_init_state @290 + krb5_c_keylengths @291 + krb5_c_random_add_entropy @292 + krb5_c_random_os_entropy @293 + krb5_c_random_to_key @294 + krb5_cc_dup @295 + krb5_cc_get_config @296 + krb5_cc_set_config @297 + krb5_copy_error_message @298 + krb5_decode_authdata_container @299 + krb5_encode_authdata_container @300 + krb5_enctype_to_name @301 + krb5_get_fallback_host_realm @302 + krb5_get_init_creds_opt_get_fast_flags @303 + krb5_get_init_creds_opt_set_anonymous @304 + krb5_get_init_creds_opt_set_canonicalize @305 + krb5_get_init_creds_opt_set_expire_callback @306 + krb5_get_init_creds_opt_set_fast_ccache @307 + krb5_get_init_creds_opt_set_fast_ccache_name @308 + krb5_get_init_creds_opt_set_fast_flags @309 + krb5_get_init_creds_opt_set_out_ccache @310 + krb5_init_creds_free @311 + krb5_init_creds_get @312 + krb5_init_creds_get_creds @313 + krb5_init_creds_get_error @314 + krb5_init_creds_get_times @315 + krb5_init_creds_init @316 + krb5_init_creds_set_keytab @317 + krb5_init_creds_set_password @318 + krb5_init_creds_set_service @319 + krb5_init_creds_step @320 + krb5_is_config_principal @321 + krb5_k_create_key @322 + krb5_k_decrypt @323 + krb5_k_decrypt_iov @324 + krb5_k_encrypt @325 + krb5_k_encrypt_iov @326 + krb5_k_free_key @327 + krb5_k_key_enctype @328 + krb5_k_key_keyblock @329 + krb5_k_make_checksum @330 + krb5_k_make_checksum_iov @331 + krb5_k_prf @332 + krb5_k_reference_key @333 + krb5_k_verify_checksum @334 + krb5_k_verify_checksum_iov @335 + krb5_make_authdata_kdc_issued @336 + krb5_merge_authdata @337 + krb5_pac_add_buffer @338 + krb5_pac_free @339 + krb5_pac_get_buffer @340 + krb5_pac_get_types @341 + krb5_pac_init @342 + krb5_pac_parse @343 + krb5_pac_verify @344 + krb5_parse_name_flags @345 + krb5_principal_compare_any_realm @346 + krb5_principal_compare_flags @347 + krb5_tkt_creds_free @348 + krb5_tkt_creds_get @349 + krb5_tkt_creds_get_creds @350 + krb5_tkt_creds_get_times @351 + krb5_tkt_creds_init @352 + krb5_tkt_creds_step @353 + krb5_unparse_name_flags @354 + krb5_unparse_name_flags_ext @355 + krb5_verify_authdata_kdc_issued @356 + +; More internal symbols used by gssapi + decode_krb5_error @357 ; PRIVATE GSSAPI + decode_krb5_iakerb_finished @358 ; PRIVATE GSSAPI + decode_krb5_iakerb_header @359 ; PRIVATE GSSAPI + encode_krb5_iakerb_finished @360 ; PRIVATE GSSAPI + encode_krb5_iakerb_header @361 ; PRIVATE GSSAPI + encode_krb5_ticket @362 ; PRIVATE GSSAPI + krb5_auth_con_get_authdata_context @363 ; PRIVATE GSSAPI + krb5_auth_con_set_authdata_context @364 ; PRIVATE GSSAPI + krb5_authdata_context_copy @365 ; PRIVATE GSSAPI + krb5_authdata_context_free @366 ; PRIVATE GSSAPI + krb5_authdata_context_init @367 ; PRIVATE GSSAPI + krb5_authdata_delete_attribute @368 ; PRIVATE GSSAPI + krb5_authdata_export_attributes @369 ; PRIVATE GSSAPI + krb5_authdata_export_authdata @370 ; PRIVATE GSSAPI + krb5_authdata_export_internal @371 ; PRIVATE GSSAPI + krb5_authdata_free_internal @372 ; PRIVATE GSSAPI + krb5_authdata_get_attribute @373 ; PRIVATE GSSAPI + krb5_authdata_get_attribute_types @374 ; PRIVATE GSSAPI + krb5_authdata_import_attributes @375 ; PRIVATE GSSAPI + krb5_authdata_set_attribute @376 ; PRIVATE GSSAPI + krb5_free_iakerb_finished @377 ; PRIVATE GSSAPI + krb5_free_iakerb_header @378 ; PRIVATE GSSAPI + krb5_get_credentials_for_user @379 ; PRIVATE GSSAPI + krb5_get_credentials_for_proxy @380 ; PRIVATE GSSAPI + krb5_sendto_kdc @381 ; PRIVATE GSSAPI + krb5int_copy_data_contents_add0 @382 ; PRIVATE GSSAPI + krb5int_free_data_list @383 ; PRIVATE GSSAPI diff --git a/src/lib/rpc/Makefile.in b/src/lib/rpc/Makefile.in index 578a2d190..58de423bd 100644 --- a/src/lib/rpc/Makefile.in +++ b/src/lib/rpc/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/rpc +mydir=lib$(S)rpc BUILDTOP=$(REL)..$(S).. DEFINES = -DGSSAPI_KRB5 -DDEBUG_GSSAPI=0 -DGSSRPC__IMPL DEFS= diff --git a/src/lib/rpc/unit-test/Makefile.in b/src/lib/rpc/unit-test/Makefile.in index 71ddef8e0..0642e53de 100644 --- a/src/lib/rpc/unit-test/Makefile.in +++ b/src/lib/rpc/unit-test/Makefile.in @@ -1,4 +1,4 @@ -mydir=lib/rpc/unit-test +mydir=lib$(S)rpc$(S)unit-test BUILDTOP=$(REL)..$(S)..$(S).. LOCALINCLUDES = -I. PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/lib/win_glue.c b/src/lib/win_glue.c index b18178e1c..3d6dd7206 100644 --- a/src/lib/win_glue.c +++ b/src/lib/win_glue.c @@ -1,12 +1,5 @@ -#ifdef KRB4 -#include -#endif #include "k5-int.h" -#ifdef KRB4 -#include -#include -#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 diff --git a/src/plugins/authdata/greet/Makefile.in b/src/plugins/authdata/greet/Makefile.in index 840ebc22d..6e3c0282e 100644 --- a/src/plugins/authdata/greet/Makefile.in +++ b/src/plugins/authdata/greet/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/authdata/greet +mydir=plugins$(S)authdata$(S)greet BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/authdata/greet_client/Makefile.in b/src/plugins/authdata/greet_client/Makefile.in index 52f2e7245..82b10ff07 100644 --- a/src/plugins/authdata/greet_client/Makefile.in +++ b/src/plugins/authdata/greet_client/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/authdata/greet_client +mydir=plugins$(S)authdata$(S)greet_client BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/authdata/greet_server/Makefile.in b/src/plugins/authdata/greet_server/Makefile.in index 2793aafac..54ffe67dc 100644 --- a/src/plugins/authdata/greet_server/Makefile.in +++ b/src/plugins/authdata/greet_server/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/authdata/greet_server +mydir=plugins$(S)authdata$(S)greet_server BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kadm5_hook/test/Makefile.in b/src/plugins/kadm5_hook/test/Makefile.in index 883cd14e2..0b2a2ef31 100644 --- a/src/plugins/kadm5_hook/test/Makefile.in +++ b/src/plugins/kadm5_hook/test/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kadm5_hook/test +mydir=plugins$(S)kadm5_hook$(S)test BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kdb/db2/Makefile.in b/src/plugins/kdb/db2/Makefile.in index db570d706..182d80208 100644 --- a/src/plugins/kdb/db2/Makefile.in +++ b/src/plugins/kdb/db2/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2 +mydir=plugins$(S)kdb$(S)db2 BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kdb/db2/libdb2/Makefile.in b/src/plugins/kdb/db2/libdb2/Makefile.in index 9faf05490..3cc5da939 100644 --- a/src/plugins/kdb/db2/libdb2/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2 +mydir=plugins$(S)kdb$(S)db2$(S)libdb2 BUILDTOP=$(REL)..$(S)..$(S)..$(S).. SUBDIRS=hash btree db mpool recno test diff --git a/src/plugins/kdb/db2/libdb2/btree/Makefile.in b/src/plugins/kdb/db2/libdb2/btree/Makefile.in index 29a3ba88e..aa72ee940 100644 --- a/src/plugins/kdb/db2/libdb2/btree/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/btree/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/btree +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)btree BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. STLIBOBJS= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o \ bt_open.o bt_overflow.o bt_page.o bt_put.o bt_search.o \ diff --git a/src/plugins/kdb/db2/libdb2/db/Makefile.in b/src/plugins/kdb/db2/libdb2/db/Makefile.in index a1c1db4ae..3e1371327 100644 --- a/src/plugins/kdb/db2/libdb2/db/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/db/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/db +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)db BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. STLIBOBJS=db.o diff --git a/src/plugins/kdb/db2/libdb2/hash/Makefile.in b/src/plugins/kdb/db2/libdb2/hash/Makefile.in index 9fedc04f3..0031b6f95 100644 --- a/src/plugins/kdb/db2/libdb2/hash/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/hash/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/hash +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)hash BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. STLIBOBJS= hash.o hash_bigkey.o hash_debug.o hash_func.o hash_log2.o \ hash_page.o hsearch.o dbm.o diff --git a/src/plugins/kdb/db2/libdb2/mpool/Makefile.in b/src/plugins/kdb/db2/libdb2/mpool/Makefile.in index c8340fc26..c891a73a9 100644 --- a/src/plugins/kdb/db2/libdb2/mpool/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/mpool/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/mpool +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)mpool BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. STLIBOBJS=mpool.o diff --git a/src/plugins/kdb/db2/libdb2/recno/Makefile.in b/src/plugins/kdb/db2/libdb2/recno/Makefile.in index 022dca4af..f13341364 100644 --- a/src/plugins/kdb/db2/libdb2/recno/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/recno/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/recno +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)recno BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. STLIBOBJS= rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o \ rec_search.o rec_seq.o rec_utils.o diff --git a/src/plugins/kdb/db2/libdb2/test/Makefile.in b/src/plugins/kdb/db2/libdb2/test/Makefile.in index 7e3485e40..854d50d36 100644 --- a/src/plugins/kdb/db2/libdb2/test/Makefile.in +++ b/src/plugins/kdb/db2/libdb2/test/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/db2/libdb2/test +mydir=plugins$(S)kdb$(S)db2$(S)libdb2$(S)test BUILDTOP=$(REL)..$(S)..$(S)..$(S)..$(S).. FCTSH = @FCTSH@ diff --git a/src/plugins/kdb/hdb/Makefile.in b/src/plugins/kdb/hdb/Makefile.in index fa1485272..03e1e9902 100644 --- a/src/plugins/kdb/hdb/Makefile.in +++ b/src/plugins/kdb/hdb/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/hdb +mydir=plugins$(S)kdb$(S)hdb BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kdb/ldap/Makefile.in b/src/plugins/kdb/ldap/Makefile.in index 437bcc49a..490c3ecfd 100644 --- a/src/plugins/kdb/ldap/Makefile.in +++ b/src/plugins/kdb/ldap/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/ldap +mydir=plugins$(S)kdb$(S)ldap BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/kdb/ldap/ldap_util/Makefile.in b/src/plugins/kdb/ldap/ldap_util/Makefile.in index e269a46a7..33f3b157a 100644 --- a/src/plugins/kdb/ldap/ldap_util/Makefile.in +++ b/src/plugins/kdb/ldap/ldap_util/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/ldap/ldap_util +mydir=plugins$(S)kdb$(S)ldap$(S)ldap_util BUILDTOP=$(REL)..$(S)..$(S)..$(S).. DEFINES = -DKDB4_DISABLE DEFS= diff --git a/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in b/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in index 956ab394e..cadc1bfe0 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in +++ b/src/plugins/kdb/ldap/libkdb_ldap/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/kdb/ldap/libkdb_ldap +mydir=plugins$(S)kdb$(S)ldap$(S)libkdb_ldap BUILDTOP=$(REL)..$(S)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/locate/python/Makefile.in b/src/plugins/locate/python/Makefile.in index 790de8475..4ac0232e9 100644 --- a/src/plugins/locate/python/Makefile.in +++ b/src/plugins/locate/python/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/locate/python +mydir=plugins$(S)locate$(S)python BUILDTOP=$(REL)..$(S)..$(S).. LIBBASE=python diff --git a/src/plugins/preauth/cksum_body/Makefile.in b/src/plugins/preauth/cksum_body/Makefile.in index adad2cf85..82c5a7b04 100644 --- a/src/plugins/preauth/cksum_body/Makefile.in +++ b/src/plugins/preauth/cksum_body/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/preauth/cksum_body +mydir=plugins$(S)preauth$(S)cksum_body BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/preauth/encrypted_challenge/Makefile.in b/src/plugins/preauth/encrypted_challenge/Makefile.in index 2e2f41612..963e4d4bb 100644 --- a/src/plugins/preauth/encrypted_challenge/Makefile.in +++ b/src/plugins/preauth/encrypted_challenge/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/preauth/encrypted_challenge +mydir=plugins$(S)preauth$(S)encrypted_challenge BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/preauth/pkinit/Makefile.in b/src/plugins/preauth/pkinit/Makefile.in index 6f10cea12..73bf6c1d0 100644 --- a/src/plugins/preauth/pkinit/Makefile.in +++ b/src/plugins/preauth/pkinit/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/preauth/pkinit +mydir=plugins$(S)preauth$(S)pkinit BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/preauth/securid_sam2/Makefile.in b/src/plugins/preauth/securid_sam2/Makefile.in index a32db4e26..14427849c 100644 --- a/src/plugins/preauth/securid_sam2/Makefile.in +++ b/src/plugins/preauth/securid_sam2/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/preauth/securid_sam2 +mydir=plugins$(S)preauth$(S)securid_sam2 BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/plugins/preauth/wpse/Makefile.in b/src/plugins/preauth/wpse/Makefile.in index 8a9c9ac9d..ca6e87d71 100644 --- a/src/plugins/preauth/wpse/Makefile.in +++ b/src/plugins/preauth/wpse/Makefile.in @@ -1,4 +1,4 @@ -mydir=plugins/preauth/wpse +mydir=plugins$(S)preauth$(S)wpse BUILDTOP=$(REL)..$(S)..$(S).. KRB5_RUN_ENV = @KRB5_RUN_ENV@ KRB5_CONFIG_SETUP = KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf ; export KRB5_CONFIG ; diff --git a/src/tests/asn.1/Makefile.in b/src/tests/asn.1/Makefile.in index 14585e3d6..3bb385840 100644 --- a/src/tests/asn.1/Makefile.in +++ b/src/tests/asn.1/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/asn.1 +mydir=tests$(S)asn.1 BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/tests/create/Makefile.in b/src/tests/create/Makefile.in index bacb5d29d..24870e941 100644 --- a/src/tests/create/Makefile.in +++ b/src/tests/create/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/create +mydir=tests$(S)create BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/tests/dejagnu/Makefile.in b/src/tests/dejagnu/Makefile.in index 1cb750986..85c7ab9d1 100644 --- a/src/tests/dejagnu/Makefile.in +++ b/src/tests/dejagnu/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/dejagnu +mydir=tests$(S)dejagnu BUILDTOP=$(REL)..$(S).. RUNTEST = @RUNTEST@ $(DEJAFLAGS) RUNTESTFLAGS = diff --git a/src/tests/gss-threads/Makefile.in b/src/tests/gss-threads/Makefile.in index 917bd1ffb..598dcf409 100644 --- a/src/tests/gss-threads/Makefile.in +++ b/src/tests/gss-threads/Makefile.in @@ -1,6 +1,6 @@ # Derived from appl/gss-sample, January 2005. -mydir=tests/gss-threads +mydir=tests$(S)gss-threads BUILDTOP=$(REL)..$(S).. DEFINES = -DUSE_AUTOCONF_H -DGSSAPI_V2 PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/tests/gssapi/Makefile.in b/src/tests/gssapi/Makefile.in index 4002d001e..a0e2e47d4 100644 --- a/src/tests/gssapi/Makefile.in +++ b/src/tests/gssapi/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/gssapi +mydir=tests$(S)gssapi BUILDTOP=$(REL)..$(S).. DEFINES = -DUSE_AUTOCONF_H PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/tests/hammer/Makefile.in b/src/tests/hammer/Makefile.in index 2321028ca..c9d551568 100644 --- a/src/tests/hammer/Makefile.in +++ b/src/tests/hammer/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/hammer +mydir=tests$(S)hammer BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/tests/misc/Makefile.in b/src/tests/misc/Makefile.in index 9e52f8811..5a4b329bc 100644 --- a/src/tests/misc/Makefile.in +++ b/src/tests/misc/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/misc +mydir=tests$(S)misc BUILDTOP=$(REL)..$(S).. RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/tests/mkeystash_compat/Makefile.in b/src/tests/mkeystash_compat/Makefile.in index 1785e108f..5c53d9e8a 100644 --- a/src/tests/mkeystash_compat/Makefile.in +++ b/src/tests/mkeystash_compat/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/mkeystash_compat +mydir=tests$(S)mkeystash_compat BUILDTOP=$(REL)..$(S).. RUN_SETUP = @KRB5_RUN_ENV@ KRB5_KDC_PROFILE=kdc.conf KRB5_CONFIG=krb5.conf diff --git a/src/tests/resolve/Makefile.in b/src/tests/resolve/Makefile.in index 98b87d127..be761c8d5 100644 --- a/src/tests/resolve/Makefile.in +++ b/src/tests/resolve/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/resolve +mydir=tests$(S)resolve BUILDTOP=$(REL)..$(S).. RUN_SETUP = @KRB5_RUN_ENV@ PROG_LIBPATH=-L$(TOPLIBD) diff --git a/src/tests/shlib/Makefile.in b/src/tests/shlib/Makefile.in index e8a061586..d569cacd7 100644 --- a/src/tests/shlib/Makefile.in +++ b/src/tests/shlib/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/shlib +mydir=tests$(S)shlib BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/tests/threads/Makefile.in b/src/tests/threads/Makefile.in index 139972a2e..0cc4be78a 100644 --- a/src/tests/threads/Makefile.in +++ b/src/tests/threads/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/threads +mydir=tests$(S)threads BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/tests/verify/Makefile.in b/src/tests/verify/Makefile.in index d46bff035..084941802 100644 --- a/src/tests/verify/Makefile.in +++ b/src/tests/verify/Makefile.in @@ -1,4 +1,4 @@ -mydir=tests/verify +mydir=tests$(S)verify BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) PROG_RPATH=$(KRB5_LIBDIR) diff --git a/src/util/Makefile.in b/src/util/Makefile.in index ec92828c4..cd9dc0e8d 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -1,12 +1,12 @@ mydir=util -##WIN32###Windows NMAKE doesn't like @ in make variable names, and on -##WIN32### Windows we don't do the @FOO@ substitutions we do with UNIX -##WIN32### configure scripts. The set of subdirs to use is hard-coded -##WIN32### below in the 'all-windows' target anyways, so just hide this. +# Windows NMAKE doesn't like @ in make variable names, and on +# Windows we don't do the @FOO@ substitutions we do with UNIX +# configure scripts, so hide this. ##WIN32##!if 0 SUBDIRS=support $(MAYBE_ET_@COM_ERR_VERSION@) $(MAYBE_SS_@SS_VERSION@) \ profile send-pr ##WIN32##!endif +WINSUBDIRS=windows support et profile BUILDTOP=$(REL).. MAYBE_ET_k5 = et @@ -20,32 +20,6 @@ clean-unix:: $(RM) -r $(FAKEPREFIX) NO_OUTDIR=1 -all-windows:: - @echo Making in util\windows - cd windows - $(MAKE) -$(MFLAGS) - @echo Making in util\support - cd ..\support - $(MAKE) -$(MFLAGS) - @echo Making in util\et - cd ..\et - $(MAKE) -$(MFLAGS) - @echo Making in util\profile - cd ..\profile - $(MAKE) -$(MFLAGS) - cd .. - -clean-windows:: - @echo Making clean in util\windows - cd windows - $(MAKE) -$(MFLAGS) clean - @echo Making clean in util\et - cd ..\et - $(MAKE) -$(MFLAGS) clean - @echo Making clean in util\profile - cd ..\profile - $(MAKE) -$(MFLAGS) clean - cd .. install:: @echo nothing to install in util diff --git a/src/util/collected-client-lib/Makefile.in b/src/util/collected-client-lib/Makefile.in index f23f1e5cb..1f7d31012 100644 --- a/src/util/collected-client-lib/Makefile.in +++ b/src/util/collected-client-lib/Makefile.in @@ -1,4 +1,4 @@ -mydir=util/collected-client-lib +mydir=util$(S)collected-client-lib BUILDTOP=$(REL)..$(S).. RELDIR=../util/collected-client-lib DEFS= diff --git a/src/util/et/Makefile.in b/src/util/et/Makefile.in index e585fb3fc..8a5648c2d 100644 --- a/src/util/et/Makefile.in +++ b/src/util/et/Makefile.in @@ -2,7 +2,7 @@ prefix=@prefix@ bindir=@bindir@ datadir=@datadir@ mydatadir=$(datadir)/et -mydir=util/et +mydir=util$(S)et BUILDTOP=$(REL)..$(S).. RELDIR=../util/et SED = sed diff --git a/src/util/profile/Makefile.in b/src/util/profile/Makefile.in index 33a1321b7..326fd1967 100644 --- a/src/util/profile/Makefile.in +++ b/src/util/profile/Makefile.in @@ -1,4 +1,4 @@ -mydir=util/profile +mydir=util$(S)profile BUILDTOP=$(REL)..$(S).. PROG_LIBPATH=-L$(TOPLIBD) $(TCL_LIBPATH) -L. PROG_RPATH=$(KRB5_LIBDIR)$(TCL_RPATH) @@ -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 diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c index 85bd91227..8fab90b29 100644 --- a/src/util/profile/prof_parse.c +++ b/src/util/profile/prof_parse.c @@ -9,7 +9,9 @@ #endif #include #include +#ifndef _WIN32 #include +#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) diff --git a/src/util/send-pr/Makefile.in b/src/util/send-pr/Makefile.in index 5ee5ae5d8..24d884feb 100644 --- a/src/util/send-pr/Makefile.in +++ b/src/util/send-pr/Makefile.in @@ -1,4 +1,4 @@ -mydir=util/send-pr +mydir=util$(S)send-pr BUILDTOP=$(REL)..$(S).. # # Makefile for building a standalone send-pr. diff --git a/src/util/ss/Makefile.in b/src/util/ss/Makefile.in index d13df4282..3f6fd84f9 100644 --- a/src/util/ss/Makefile.in +++ b/src/util/ss/Makefile.in @@ -1,4 +1,4 @@ -mydir=util/ss +mydir=util$(S)ss BUILDTOP=$(REL)..$(S).. SED = sed DEFS= diff --git a/src/util/support/Makefile.in b/src/util/support/Makefile.in index 6c2be57bb..88520438f 100644 --- a/src/util/support/Makefile.in +++ b/src/util/support/Makefile.in @@ -1,4 +1,4 @@ -mydir=util/support +mydir=util$(S)support BUILDTOP=$(REL)..$(S).. RELDIR=../util/support DEFS= diff --git a/src/windows/Makefile.in b/src/windows/Makefile.in index f1a46c0df..9cadd576d 100644 --- a/src/windows/Makefile.in +++ b/src/windows/Makefile.in @@ -1,76 +1,6 @@ BUILDTOP=.. NO_OUTPRE=1 - -# -# Makefile that recurses into cns subdirectory. -# -all-windows:: ntsecapitest - @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 - cd ..\gss - cd - $(MAKE) -$(MFLAGS) - @echo Making in windows\gina - cd ..\gina - $(MAKE) -$(MFLAGS) - @echo Making in windows\ms2mit - cd ..\ms2mit - $(MAKE) -$(MFLAGS) -!if "$(KRB5_KFW_COMPILE)"=="1" - @echo Making in windows\kfwlogon - cd ..\kfwlogon - $(MAKE) -$(MFLAGS) - @echo Making in windows\identity - cd ..\identity - $(MAKE) -$(MFLAGS) -!endif - cd .. - -clean-windows:: clean-ntsecapitest - @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 - @echo Making clean in windows\gina - cd ..\gina - $(MAKE) -$(MFLAGS) clean - @echo Making clean in windows\ms2mit - cd ..\ms2mit - $(MAKE) -$(MFLAGS) clean -!if "$(KRB5_KFW_COMPILE)"=="1" - @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 +!if "$(KRB5_KFW_COMPILE)"=="1" +KFWLOGON= kfwlogon +!endif +SUBDIRS= lib cns gss gina ms2mit $(KFWLOGON) diff --git a/src/windows/README b/src/windows/README index 0276b4350..47261f746 100644 --- a/src/windows/README +++ b/src/windows/README @@ -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: ---------------- diff --git a/src/windows/build/bkw.pl b/src/windows/build/bkw.pl index c1e33d28f..24c32a035 100644 --- a/src/windows/build/bkw.pl +++ b/src/windows/build/bkw.pl @@ -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 index 459e5dbd7..000000000 --- a/src/windows/ntsecapitest.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Simple program to show what is in ntsecapi.h. - Compile -P to generate preprocessor output. - */ - -#include "ntsecapi.h" - -#ifdef TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS -VISTA_SDK_VERSION -#else -NT_SDK_VERSION -#endif diff --git a/src/windows/ntsecapitest.pl b/src/windows/ntsecapitest.pl deleted file mode 100644 index c5306ea8d..000000000 --- a/src/windows/ntsecapitest.pl +++ /dev/null @@ -1,11 +0,0 @@ -#!perl -w - -$filename = "ntsecapitest.i"; -$string = "VISTA_SDK_VERSION"; - -if (system("grep $string $filename")) { - print "$string not found; deleting $filename.\n"; - system("rm $filename"); - } - -exit(0); \ No newline at end of file -- 2.26.2