From 530043377ee6f39b9ca95c13f6260602e6fe7674 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 25 Nov 2010 20:28:30 +0000 Subject: Fix Windows build 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. ticket: 6826 target_version: 1.9 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24533 dc483132-0cff-0310-8789-dd5450dbe970 --- src/windows/Makefile.in | 31 +++------------------------ src/windows/README | 52 +++++++++++++++++++-------------------------- src/windows/build/bkw.pl | 5 ----- src/windows/ntsecapitest.c | 11 ---------- src/windows/ntsecapitest.pl | 11 ---------- 5 files changed, 25 insertions(+), 85 deletions(-) delete mode 100644 src/windows/ntsecapitest.c delete mode 100644 src/windows/ntsecapitest.pl (limited to 'src/windows') diff --git a/src/windows/Makefile.in b/src/windows/Makefile.in index f1a46c0df2..6447cf4c60 100644 --- a/src/windows/Makefile.in +++ b/src/windows/Makefile.in @@ -4,19 +4,15 @@ NO_OUTPRE=1 # # Makefile that recurses into cns subdirectory. # -all-windows:: ntsecapitest +all-windows:: @echo Making in windows\lib cd lib $(MAKE) -$(MFLAGS) @echo Making in windows\cns cd ..\cns $(MAKE) -$(MFLAGS) - @echo Making in windows\wintel - cd ..\wintel - $(MAKE) -$(MFLAGS) - @echo Making in windows\gss + @echo Making in windows\gss cd ..\gss - cd $(MAKE) -$(MFLAGS) @echo Making in windows\gina cd ..\gina @@ -28,22 +24,16 @@ all-windows:: ntsecapitest @echo Making in windows\kfwlogon cd ..\kfwlogon $(MAKE) -$(MFLAGS) - @echo Making in windows\identity - cd ..\identity - $(MAKE) -$(MFLAGS) !endif cd .. -clean-windows:: clean-ntsecapitest +clean-windows:: @echo Making clean in windows\lib cd lib $(MAKE) -$(MFLAGS) clean @echo Making clean in windows\cns cd ..\cns $(MAKE) -$(MFLAGS) clean - @echo Making clean in windows\wintel - cd ..\wintel - $(MAKE) -$(MFLAGS) clean @echo Making clean in windows\gss cd ..\gss $(MAKE) -$(MFLAGS) clean @@ -57,20 +47,5 @@ clean-windows:: clean-ntsecapitest @echo Making clean in windows\kfwlogon cd ..\kfwlogon $(MAKE) -$(MFLAGS) clean - @echo Making clean in windows\identity - cd ..\identity - $(MAKE) -$(MFLAGS) clean !endif cd .. - -# If ntsecapi.h contains the string that indicates it came from the Vista SDK, -# then ntsecapitest.i will be left behind. If the string is not present, -# ntsecapitest.i will be deleted. -ntsecapitest:: ntsecapitest.i - ntsecapitest.pl - -clean-ntsecapitest:: - $(RM) ntsecapitest.i - -{}.c{}.i: - @$(C_RULE) -P diff --git a/src/windows/README b/src/windows/README index 0276b4350a..47261f7467 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 c1e33d28f0..24c32a035d 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 459e5dbd7f..0000000000 --- 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 c5306ea8d1..0000000000 --- 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 -- cgit