diff --git a/admin/NTMakefile b/admin/NTMakefile index 0068c0dae..e45a5e75f 100644 --- a/admin/NTMakefile +++ b/admin/NTMakefile @@ -49,14 +49,13 @@ KTUTIL_OBJS= \ $(OBJ)\rename.obj KTUTIL_LIBS= \ - $(LIBKRB5) \ + $(LIBHEIMDAL) \ $(LIBKADM5SRV) \ $(LIBSL) \ $(LIBROKEN) \ - $(LIBHCRYPTO) \ $(LIBVERS) -$(SBINDIR)\ktutil.exe: $(KTUTIL_OBJS) $(KTUTIL_LIBS) +$(SBINDIR)\ktutil.exe: $(KTUTIL_OBJS) $(KTUTIL_LIBS) $(OBJ)\ktutil-version.res $(EXECONLINK) $(EXEPREP) diff --git a/admin/ktutil-version.rc b/admin/ktutil-version.rc new file mode 100644 index 000000000..e0e91c5ce --- /dev/null +++ b/admin/ktutil-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Kerberos Keytab Tool" +#define RC_FILE_ORIG_0409 "ktutil.exe" + +#include "../windows/version.rc" diff --git a/cf/w32-check-exported-symbols.pl b/cf/w32-check-exported-symbols.pl new file mode 100644 index 000000000..cfe014ff2 --- /dev/null +++ b/cf/w32-check-exported-symbols.pl @@ -0,0 +1,98 @@ +use Getopt::Long; +use Pod::Usage; +use feature "switch"; + +my $def_name = ''; +my $vs_name = ''; +my $show_help = 0; + +my %syms; + +my $def_only = 0; +my $vs_only = 0; + +GetOptions ("def=s" => \$def_name, + "vs=s" => \$vs_name, + "help|?" => \$show_help) or pod2usage( -exitval => 2, + -verbose => 3 ); +pod2usage( -exitval => 1, + -verbose => 3 ) if $show_help or !$def_name or !$vs_name; + +open (my $def, '<', $def_name) or die $!; +open (my $vs, '<', $vs_name) or die $!; + +# First go through the version-script + +my $global = 0; + +while(<$vs>) +{ + next unless m/^([^#]+)/; + + @a = split(/\s+|({|})/,$1); + + for $f (@a) { + given ($f) { + when (/global\:/) { $global = 1; } + when (/{|}|.*\:/) { $global = 0; } + when (/(.*)\;/ and $global == 1) { + $syms{$1} = 1; + } + } + } +} + +while(<$def>) +{ + next if m/^#/; + next unless m/^;!([^;]+)/ or m/^([^;]+);?(!?)/; + + @a = split(/\s+/, $1); + + for $f (@a) { + next if $f =~ /EXPORTS/ or $f =~ /DATA/ or not $f; + + if (not exists $syms{$f} and not $2) { + print "$f: Only in DEF\n"; + ++$def_only; + } + delete $syms{$f}; + } +} + +#while (($k,$v) = each %syms) { +for $k (sort keys %syms) { + print "$k: Only in VS\n"; + ++$vs_only; +} + +close($def); +close($vs); + +if ($def_only or $vs_only) { + print "\nMismatches found.\n"; + exit(1); +} + +__END__ + +=head1 NAME + +w32-sync-exported-symbols.pl - Synchronize Windows .def with version-script + +=head1 SYNOPSIS + +w32-sync-exported-symbols.pl {options} + + Options: + --def Name of .def file + --vs Name of version-script file + +=head1 DESCRIPTION + +Verifies that all the symbols exported by the version-script is also +accounted for in the .def file. Also checks that no extra symbols are +exported by the .def file unless they are marked as safe. + +=cut + diff --git a/cf/w32-def-from-dll.pl b/cf/w32-def-from-dll.pl new file mode 100644 index 000000000..d7c412a40 --- /dev/null +++ b/cf/w32-def-from-dll.pl @@ -0,0 +1,166 @@ +my $show_module_name = 1; +my $use_indent = 1; +my $strip_leading_underscore = 0; +my $module_name = ""; +my %target_exports = (); +my %local_exports = (); + +sub build_target_exports_list($) +{ + $fn = shift; + + print STDERR "Processing defs from file [$fn]\n"; + + open(SP, '-|', "dumpbin /exports \"".$fn."\"") or die "Can't open pipe for $fn"; + + LINE: + while () { +# 112 6F 00071CDC krb5_encrypt_size + + /^ +([[:digit:]]+)\s+[[:xdigit:]]+\s[[:xdigit:]]{8,}\s+(\S+)(?:| = (\S*))$/ && do { + my ($ordinal, $symbol, $in) = ($1, $2, $3); + + if ($in eq "") { $in = $symbol }; + $target_exports{$symbol} = $in; + }; + } + + close SP; +} + +# Dump all symbols for the given dll file that are defined and have +# external scope. + +sub build_glue_exports_list($) +{ + $fn = shift; + + print STDERR "Opening dump of DLL [$fn]\n"; + + open(SP, '-|', "dumpbin /exports \"".$fn."\"") or die "Can't open pipe for $fn"; + + LINE: + while () { +# 112 6F 00071CDC krb5_encrypt_size + + /^ +([[:digit:]]+)\s+[[:xdigit:]]+\s[[:xdigit:]]{8,}\s+(\S+)(?:| = (\S*))$/ && do { + my ($ordinal, $symbol, $in) = ($1, $2, $3); + + if ($strip_leading_underscore && $symbol =~ /_(.*)/) { + $symbol = $1; + } + if (exists $local_exports{$symbol}) { + print "\t".$symbol; + print " = ".$local_exports{$symbol}; + if ($in ne $local_exports{$symbol} and $in ne "") { + print STDERR "Incorrect calling convention for local $symbol\n"; + print STDERR " ".$in." != ".$local_exports{$symbol}."\n"; + } + print "\t@".$ordinal."\n"; + } elsif (exists $local_exports{"SHIM_".$symbol}) { + print "\t".$symbol; + print " = ".$local_exports{"SHIM_".$symbol}; + print "\t@".$ordinal."\n"; + } elsif (exists $target_exports{$symbol}) { + print "\t".$symbol; + print " = ".$module_name; + if ($in ne $target_exports{$symbol} and $in ne "") { + print STDERR "Incorrect calling convention for $symbol\n"; + print STDERR " ".$in." != ".$target_exports{$symbol}."\n"; + } + my $texp = $target_exports{$symbol}; + if ($texp =~ /^_([^@]+)$/) { $texp = $1; } + print $texp."\t@".$ordinal."\n"; + } else { + print STDERR "Symbol not found: $symbol\n"; + } + }; + } + + close SP; +} + +sub build_local_exports_list($) +{ + $fn = shift; + + print STDERR "Opening dump of object [$fn]\n"; + + open(SP, '-|', "dumpbin /symbols \"".$fn."\"") or die "Can't open pipe for $fn"; + + LINE: + while () { + # 009 00000010 SECT3 notype () External | _remove_error_table@4 + m/^[[:xdigit:]]{3,}\s[[:xdigit:]]{8,}\s(\w+)\s+\w*\s+(?:\(\)| )\s+(\w+)\s+\|\s+(\S+)$/ && do { + my ($section, $visibility, $symbol) = ($1, $2, $3); + + if ($section ne "UNDEF" && $visibility eq "External") { + + my $exp_name = $symbol; + + if ($symbol =~ m/^_(\w+)(?:@.*|)$/) { + $exp_name = $1; + } + + if ($symbol =~ m/^_([^@]+)$/) { + $symbol = $1; + } + + $local_exports{$exp_name} = $symbol; + } + }; + } + + close SP; +} + +sub process_file($) +{ + $fn = shift; + + if ($fn =~ m/\.dll$/i) { + build_glue_exports_list($fn); + } elsif ($fn =~ m/\.obj$/i) { + build_local_exports_list($fn); + } else { + die "File type not recognized for $fn."; + } +} + +sub use_response_file($) +{ + $fn = shift; + + open (RF, '<', $fn) or die "Can't open response file $fn"; + + while () { + /(\S+)/ && do { + process_file($1); + } + } + close RF; +} + +print "; This is a generated file. Do not modify directly.\n"; +print "EXPORTS\n"; + +for (@ARGV) { + ARG: { + /-m(.*)/ && do { + $module_name = $1."."; + last ARG; + }; + + /-e(.*)/ && do { + build_target_exports_list($1); + last ARG; + }; + + /@(.*)/ && do { + use_response_file($1); + last ARG; + }; + + process_file($_); + } +} diff --git a/include/config.h.w32 b/include/config.h.w32 index ea338f26b..6e356f355 100644 --- a/include/config.h.w32 +++ b/include/config.h.w32 @@ -1356,11 +1356,15 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define if you don't want to use mmap. */ #define NO_MMAP 1 +/* Define if EGD rand method is not defined */ #define NO_RAND_EGD_METHOD 1 /* Define if the Unix rand method is not defined */ #define NO_RAND_UNIX_METHOD 1 +/* Define if the Fortuna rand method is not defined */ +#define NO_RAND_FORTUNA_METHOD 1 + /* Define if PID files should not be used. */ #define NO_PIDFILES 1 @@ -1454,32 +1458,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } #include "roken_rename.h" #endif -#define RETSIGTYPE void - -#define VOID_RETSIGTYPE 1 - -#ifdef VOID_RETSIGTYPE -#define SIGRETURN(x) return -#else -#define SIGRETURN(x) return (RETSIGTYPE)(x) -#endif - -#ifndef CPP_ONLY - -typedef int pid_t; - -typedef unsigned int gid_t; - -typedef unsigned int uid_t; - -typedef unsigned short mode_t; - -#endif - -#ifndef __cplusplus -#define inline __inline -#endif - #if defined(ENCRYPTION) && !defined(AUTHENTICATION) #define AUTHENTICATION 1 #endif diff --git a/kadmin/NTMakefile b/kadmin/NTMakefile index eb2c676c2..f20592362 100644 --- a/kadmin/NTMakefile +++ b/kadmin/NTMakefile @@ -42,9 +42,7 @@ SBIN_PROGRAMS=$(SBINDIR)\kadmin.exe COMMON_LIBS= \ $(LIBHDB) \ - $(LIBKRB5) \ - $(LIBHCRYPTO) \ - $(LIBASN1) \ + $(LIBHEIMDAL) \ $(LIBROKEN) KADMIN_OBJS= \ @@ -66,7 +64,8 @@ KADMIN_OBJS= \ $(OBJ)\util.obj \ $(OBJ)\pw_quality.obj \ $(OBJ)\random_password.obj \ - $(OBJ)\kadmin-commands.obj + $(OBJ)\kadmin-commands.obj \ + $(OBJ)\kadmin-version.res KADMIN_LIBS= \ $(LIBKADM5CLNT) \ @@ -92,7 +91,8 @@ KADMIND_OBJS= \ $(OBJ)\rpc.obj \ $(OBJ)\server.obj \ $(OBJ)\kadmind.obj \ - $(OBJ)\kadm_conn.obj + $(OBJ)\kadm_conn.obj \ + $(OBJ)\kadmind-version.res KADMIND_LIBS=\ $(LIBKADM5SRV) \ diff --git a/kadmin/kadmin-version.rc b/kadmin/kadmin-version.rc new file mode 100644 index 000000000..d04058864 --- /dev/null +++ b/kadmin/kadmin-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Kerberos Administration Tool" +#define RC_FILE_ORIG_0409 "kadmin.exe" + +#include "../windows/version.rc" diff --git a/kadmin/kadmind-version.rc b/kadmin/kadmind-version.rc new file mode 100644 index 000000000..090bc816d --- /dev/null +++ b/kadmin/kadmind-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Kerberos Administration Server" +#define RC_FILE_ORIG_0409 "kadmind.exe" + +#include "../windows/version.rc" diff --git a/kdc/NTMakefile b/kdc/NTMakefile index 2c681e047..f9ee92b56 100644 --- a/kdc/NTMakefile +++ b/kdc/NTMakefile @@ -59,53 +59,41 @@ clean:: BIN_LIBS=\ $(LIBHDB) \ - $(LIBKRB5) \ - $(LIBHCRYPTO) \ - $(LIBASN1) \ + $(LIBHEIMDAL) \ $(LIBROKEN) \ $(LIBVERS) -$(LIBEXECDIR)\hprop.exe: $(OBJ)\hprop.obj $(OBJ)\mit_dump.obj $(BIN_LIBS) +$(LIBEXECDIR)\hprop.exe: $(OBJ)\hprop.obj $(OBJ)\mit_dump.obj $(BIN_LIBS) $(OBJ)\hprop-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) !ifdef KRB4 $(LIBEXECDIR)\hprop.exe: $(OBJ)\v4_dump.obj !endif -$(LIBEXECDIR)\hpropd.exe: $(OBJ)\hpropd.obj $(BIN_LIBS) +$(LIBEXECDIR)\hpropd.exe: $(OBJ)\hpropd.obj $(BIN_LIBS) $(OBJ)\hpropd-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(SBINDIR)\kstash.exe: $(OBJ)\kstash.obj $(BIN_LIBS) +$(SBINDIR)\kstash.exe: $(OBJ)\kstash.obj $(BIN_LIBS) $(OBJ)\kstash-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\string2key.exe: $(OBJ)\string2key.obj $(BIN_LIBS) +$(BINDIR)\string2key.exe: $(OBJ)\string2key.obj $(BIN_LIBS) $(OBJ)\string2key-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(BINDIR)\digest-service.exe: $(OBJ)\digest-service.obj $(BIN_LIBS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(LIBEXECDIR)\kdc.exe: \ -$(OBJ)\connect.obj $(OBJ)\config.obj $(OBJ)\announce.obj $(OBJ)\main.obj $(LIBKDC) $(BIN_LIBS) + $(OBJ)\connect.obj $(OBJ)\config.obj $(OBJ)\announce.obj \ + $(OBJ)\main.obj $(OBJ)\kdc-version.res \ + $(LIBKDC) $(BIN_LIBS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) LIBKDC_OBJS=\ $(OBJ)\default_config.obj \ @@ -129,21 +117,15 @@ LIBKDC_OBJS=$(LIBKDC_OBJS) \ LIBKDC_LIBS=\ $(LIBHDB) \ - $(LIBKRB5) \ + $(LIBHEIMDAL) \ $(LIBHEIMNTLM) \ - $(LIBHCRYPTO) \ - $(LIBASN1) \ $(LIBROKEN) -!ifdef PKINIT -LIBKDC_LIBS=$(LIBKDC_LIBS) $(LIBHX509) -!endif +LIBKDCRES=$(OBJ)\libkdc-version.res -$(LIBEXECDIR)\libkdc.dll: $(LIBKDC_OBJS) $(LIBKDC_LIBS) +$(LIBEXECDIR)\libkdc.dll: $(LIBKDC_OBJS) $(LIBKDC_LIBS) $(LIBKDCRES) $(DLLGUILINK) -implib:$(LIBKDC) -def:libkdc-exports.def - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(DLLPREP) $(LIBKDC): $(LIBEXECDIR)\libkdc.dll diff --git a/kdc/hprop-version.rc b/kdc/hprop-version.rc new file mode 100644 index 000000000..1e782f5d7 --- /dev/null +++ b/kdc/hprop-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "KDC Database Propagation Tool" +#define RC_FILE_ORIG_0409 "hprop.exe" + +#include "../windows/version.rc" diff --git a/kdc/hpropd-version.rc b/kdc/hpropd-version.rc new file mode 100644 index 000000000..388d64d92 --- /dev/null +++ b/kdc/hpropd-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Propagated KDC database recipient" +#define RC_FILE_ORIG_0409 "hpropd.exe" + +#include "../windows/version.rc" diff --git a/kdc/kdc-version.rc b/kdc/kdc-version.rc new file mode 100644 index 000000000..662aff475 --- /dev/null +++ b/kdc/kdc-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Heimdal Kerberos v5 Server" +#define RC_FILE_ORIG_0409 "kdc.exe" + +#include "../windows/version.rc" diff --git a/kdc/kstash-version.rc b/kdc/kstash-version.rc new file mode 100644 index 000000000..c3d221466 --- /dev/null +++ b/kdc/kstash-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "KDC Master Password Stash Tool" +#define RC_FILE_ORIG_0409 "kstash.exe" + +#include "../windows/version.rc" diff --git a/kdc/libkdc-version.rc b/kdc/libkdc-version.rc new file mode 100644 index 000000000..fee500415 --- /dev/null +++ b/kdc/libkdc-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Heimdal KDC Library" +#define RC_FILE_ORIG_0409 "libkdc.dll" + +#include "../windows/version.rc" diff --git a/kdc/string2key-version.rc b/kdc/string2key-version.rc new file mode 100644 index 000000000..120ef4b22 --- /dev/null +++ b/kdc/string2key-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Password to Key Mapper" +#define RC_FILE_ORIG_0409 "string2key.exe" + +#include "../windows/version.rc" diff --git a/kuser/NTMakefile b/kuser/NTMakefile index 425a8b4eb..c6e3d4629 100644 --- a/kuser/NTMakefile +++ b/kuser/NTMakefile @@ -51,10 +51,8 @@ NOINSTPROGRAMS=\ $(OBJ)\copy_cred_cache.exe BINLIBS=\ - $(LIBKRB5) \ + $(LIBHEIMDAL) \ $(LIBHEIMNTLM) \ - $(LIBHCRYPTO) \ - $(LIBASN1) \ $(LIBROKEN) \ $(LIBVERS) @@ -64,45 +62,33 @@ all:: $(BINPROGRAMS) $(LIBEXECPROGRAMS) clean:: -$(RM) $(BINPROGRAMS) $(LIBEXECPROGRAMS) -$(BINDIR)\kinit.exe: $(OBJ)\kinit.obj $(BINLIBS) +$(BINDIR)\kinit.exe: $(OBJ)\kinit.obj $(BINLIBS) $(OBJ)\kinit-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\klist.exe: $(OBJ)\klist.obj $(BINLIBS) +$(BINDIR)\klist.exe: $(OBJ)\klist.obj $(BINLIBS) $(OBJ)\klist-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\kdestroy.exe: $(OBJ)\kdestroy.obj $(BINLIBS) +$(BINDIR)\kdestroy.exe: $(OBJ)\kdestroy.obj $(BINLIBS) $(OBJ)\kdestroy-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\kgetcred.exe: $(OBJ)\kgetcred.obj $(BINLIBS) +$(BINDIR)\kgetcred.exe: $(OBJ)\kgetcred.obj $(BINLIBS) $(OBJ)\kgetcred-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\kswitch.exe: $(OBJ)\kswitch.obj $(BINLIBS) +$(BINDIR)\kswitch.exe: $(OBJ)\kswitch.obj $(BINLIBS) $(OBJ)\kswitch-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(LIBEXECDIR)\kdigest.exe: $(OBJ)\kdigest-commands.obj $(OBJ)\kdigest.obj $(BINLIBS) $(LIBSL) +$(LIBEXECDIR)\kdigest.exe: $(OBJ)\kdigest-commands.obj $(OBJ)\kdigest.obj $(BINLIBS) $(LIBSL) $(OBJ)\kdigest-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(OBJ)\kdigest.obj: kdigest.c $(C2OBJ) -I$(OBJ) @@ -114,9 +100,7 @@ $(OBJ)\kdigest-commands.c $(OBJ)\kdigest-commands.h: kdigest-commands.in cd $(SRCDIR) -$(LIBEXECDIR)\kimpersonate.exe: $(OBJ)\kimpersonate.obj $(BINLIBS) +$(LIBEXECDIR)\kimpersonate.exe: $(OBJ)\kimpersonate.obj $(BINLIBS) $(OBJ)\kimpersonate-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) diff --git a/kuser/kdestroy-version.rc b/kuser/kdestroy-version.rc new file mode 100644 index 000000000..9ccbdef9e --- /dev/null +++ b/kuser/kdestroy-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Destroy Kerberos Tickets" +#define RC_FILE_ORIG_0409 "kdestroy.exe" + +#include "../windows/version.rc" diff --git a/kuser/kdigest-version.rc b/kuser/kdigest-version.rc new file mode 100644 index 000000000..8e5b16ee2 --- /dev/null +++ b/kuser/kdigest-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "KDC Digest Interface Tool" +#define RC_FILE_ORIG_0409 "kdigest.exe" + +#include "../windows/version.rc" diff --git a/kuser/kgetcred-version.rc b/kuser/kgetcred-version.rc new file mode 100644 index 000000000..cd3064935 --- /dev/null +++ b/kuser/kgetcred-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Get Kerberos Ticket For Service" +#define RC_FILE_ORIG_0409 "kgetcred.exe" + +#include "../windows/version.rc" diff --git a/kuser/kimpersonate-version.rc b/kuser/kimpersonate-version.rc new file mode 100644 index 000000000..8552b05df --- /dev/null +++ b/kuser/kimpersonate-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Impersonate a Kerberos Principal" +#define RC_FILE_ORIG_0409 "kimpersonate.exe" + +#include "../windows/version.rc" diff --git a/kuser/kinit-version.rc b/kuser/kinit-version.rc new file mode 100644 index 000000000..3eb53e25a --- /dev/null +++ b/kuser/kinit-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Acquire Initial Kerberos Tickets" +#define RC_FILE_ORIG_0409 "kinit.exe" + +#include "../windows/version.rc" diff --git a/kuser/klist-version.rc b/kuser/klist-version.rc new file mode 100644 index 000000000..c98b7f406 --- /dev/null +++ b/kuser/klist-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "List Kerberos Tickets" +#define RC_FILE_ORIG_0409 "klist.exe" + +#include "../windows/version.rc" diff --git a/kuser/kswitch-version.rc b/kuser/kswitch-version.rc new file mode 100644 index 000000000..3437e275d --- /dev/null +++ b/kuser/kswitch-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Switch Between Default Credential Caches" +#define RC_FILE_ORIG_0409 "kswitch.exe" + +#include "../windows/version.rc" diff --git a/lib/NTMakefile b/lib/NTMakefile index 148d5801e..a5527e636 100644 --- a/lib/NTMakefile +++ b/lib/NTMakefile @@ -44,11 +44,24 @@ dir_hcrypto = hcrypto !endif SUBDIRS = roken vers editline com_err sl wind asn1 sqlite \ - $(dir_hcrypto) hx509 krb5 ntlm kafs gssapi hdb kadm5 \ - auth $(dir_45) $(dir_otp) $(dir_dce) + $(dir_hcrypto) hx509 krb5 heimdal ntlm kafs gssapi hdb \ + kadm5 auth $(dir_45) $(dir_otp) $(dir_dce) ..\packages\windows\assembly !include ../windows/NTMakefile.w32 -all:: subdirs +# We can't build some of the lib tools until after we have LIBHEIMDAL. +# So we build tools in a separate build step: + +all:: all-tools + +all-tools:: asn1-tools hx509-tools krb5-tools + +asn1-tools: + @( cd asn1 && $(RMAKE) all-tools && cd .. ) || exit /b 1 + +hx509-tools: + @( cd hx509 && $(RMAKE) all-tools && cd .. ) || exit /b 1 + +krb5-tools: + @( cd krb5 && $(RMAKE) all-tools && cd .. ) || exit /b 1 -clean:: clean-subdirs diff --git a/lib/asn1/NTMakefile b/lib/asn1/NTMakefile index 3462b292b..f0c4d85d5 100644 --- a/lib/asn1/NTMakefile +++ b/lib/asn1/NTMakefile @@ -31,6 +31,8 @@ RELDIR=lib\asn1 +intcflags=-I$(SRCDIR) -I$(OBJ) + !include ../../windows/NTMakefile.w32 gen_files_k5 = \ @@ -309,6 +311,7 @@ gen_files_rfc2459 = \ $(OBJ)\asn1_id_rsadsi_encalg.x \ $(OBJ)\asn1_id_rsadsi_rc2_cbc.x \ $(OBJ)\asn1_id_secsig_sha_1.x \ + $(OBJ)\asn1_id_secsig_sha_1WithRSAEncryption.x \ $(OBJ)\asn1_id_sha224.x \ $(OBJ)\asn1_id_sha256.x \ $(OBJ)\asn1_id_sha384.x \ @@ -492,9 +495,7 @@ gen_files_kx509 = \ $(OBJ)\asn1_Kx509Request.x ASN1_BINARIES = \ - $(LIBEXECDIR)\asn1_compile.exe \ - $(LIBEXECDIR)\asn1_print.exe \ - $(BINDIR)\asn1_gen.exe + $(LIBEXECDIR)\asn1_compile.exe $(BINDIR)\asn1_compile.exe: \ $(OBJ)\asn1parse.obj \ @@ -510,11 +511,10 @@ $(BINDIR)\asn1_compile.exe: \ $(OBJ)\hash.obj \ $(OBJ)\lex.obj \ $(OBJ)\main.obj \ - $(OBJ)\symbol.obj + $(OBJ)\symbol.obj \ + $(OBJ)\asn1_compile-version.res $(EXECONLINK) $(LIBROKEN) $(LIBVERS) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(OBJ)\lex.c: lex.l $(OBJ)\asn1parse.h $(LEX) -o$@ lex.l @@ -527,17 +527,13 @@ $(OBJ)\asn1_err.c $(OBJ)\asn1_err.h: asn1_err.et $(BINDIR)\compile_et.exe $(SRCDIR)\asn1_err.et cd $(SRCDIR) -$(BINDIR)\asn1_print.exe: $(OBJ)\asn1_print.obj $(LIBASN1) +$(BINDIR)\asn1_print.exe: $(OBJ)\asn1_print.obj $(LIBHEIMDAL) $(EXECONLINK) $(LIBVERS) $(LIBROKEN) $(LIBCOMERR) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(BINDIR)\asn1_gen.exe: $(OBJ)\asn1_gen.obj $(LIBASN1) +$(BINDIR)\asn1_gen.exe: $(OBJ)\asn1_gen.obj $(LIBHEIMDAL) $(EXECONLINK) $(LIBVERS) $(LIBROKEN) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) LIBASN1_OBJS= \ $(OBJ)\der.obj \ @@ -561,34 +557,12 @@ LIBASN1_OBJS= \ $(gen_files_kx509:.x=.obj) \ $(OBJ)\asn1_err.obj -LIBASN1_LIBS=\ - $(LIBROKEN) \ - $(LIBCOMERR) - -!ifndef STATICLIBS - -$(LIBASN1): $(BINDIR)\libasn1.dll - -$(BINDIR)\libasn1.dll: $(LIBASN1_OBJS) $(LIBASN1_LIBS) - $(DLLGUILINK_C) -out:$@ -def:libasn1-exports.def -implib:$(LIBASN1) @<< -$(**: = -) -<< - $(DLLPREP) - -clean:: - -$(RM) $(BINDIR)\libasn1.dll - -!else - $(LIBASN1): $(LIBASN1_OBJS) $(LIBCON_C) -out:$@ @<< $(**: = ) << -!endif - clean:: -$(RM) $(LIBASN1) @@ -757,20 +731,49 @@ clean:: all:: $(INCFILES) $(GENINCFILES) $(ASN1_BINARIES) $(LIBASN1) +all-tools:: $(LIBEXECDIR)\asn1_print.exe $(BINDIR)\asn1_gen.exe + TEST_BINARIES=\ $(OBJ)\check-der.exe \ $(OBJ)\check-gen.exe \ - $(OBJ)\check-timegm.exe + $(OBJ)\check-timegm.exe \ + $(OBJ)\check-ber.exe \ + $(OBJ)\check-template.exe \ test-binaries: $(TEST_BINARIES) test-run: + cd $(OBJ) + check-der.exe + check-gen.exe + check-timegm.exe + check-ber.exe + check-template.exe + cd $(SRC) test:: test-binaries test-run -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) -I$(SRCDIR) -I$(OBJ) +$(OBJ)\check-ber.exe: $(OBJ)\check-ber.obj \ + $(LIBHEIMDAL) $(LIBROKEN) + $(EXECONLINK) + $(EXEPREP_NODIST) -{}.c{$(OBJ)}.obj: - $(C2OBJ) -I$(SRCDIR) -I$(OBJ) +$(OBJ)\check-der.exe: $(OBJ)\check-der.obj $(OBJ)\check-common.obj \ + $(LIBHEIMDAL) $(LIBROKEN) + $(EXECONLINK) + $(EXEPREP_NODIST) +$(OBJ)\check-gen.exe: $(OBJ)\check-gen.obj $(OBJ)\check-common.obj \ + $(LIBHEIMDAL) $(LIBROKEN) $(gen_files_test:.x=.obj) + $(EXECONLINK) + $(EXEPREP_NODIST) + +$(OBJ)\check-timegm.exe: $(OBJ)\check-timegm.obj \ + $(LIBHEIMDAL) $(LIBROKEN) + $(EXECONLINK) + $(EXEPREP_NODIST) + +$(OBJ)\check-template.exe: $(OBJ)\check-template.obj $(OBJ)\check-common.obj \ + $(LIBHEIMDAL) $(LIBROKEN) $(gen_files_test:.x=.obj) + $(EXECONLINK) + $(EXEPREP_NODIST) diff --git a/lib/asn1/asn1-common.h b/lib/asn1/asn1-common.h index 34bb73b10..9c8793e0c 100644 --- a/lib/asn1/asn1-common.h +++ b/lib/asn1/asn1-common.h @@ -64,4 +64,16 @@ typedef struct heim_octet_string heim_any_set; } \ } while (0) +#ifdef _WIN32 +#ifndef ASN1_LIB +#define ASN1EXP __declspec(dllimport) +#else +#define ASN1EXP +#endif +#define ASN1CALL __stdcall +#else +#define ASN1EXP +#define ASN1CALL +#endif + #endif diff --git a/lib/asn1/asn1_compile-version.rc b/lib/asn1/asn1_compile-version.rc new file mode 100644 index 000000000..120fb85c4 --- /dev/null +++ b/lib/asn1/asn1_compile-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "ASN.1 Compiler" +#define RC_FILE_ORIG_0409 "asn1_compile.exe" + +#include "../../windows/version.rc" diff --git a/lib/asn1/check-common.c b/lib/asn1/check-common.c index 15b3869bc..886be89e3 100644 --- a/lib/asn1/check-common.c +++ b/lib/asn1/check-common.c @@ -208,7 +208,9 @@ generic_test (const struct test_case *tests, void *data; struct map_page *data_map, *buf_map, *buf2_map; +#ifdef HAVE_SIGACTION struct sigaction sa, osa; +#endif for (i = 0; i < ntests; ++i) { int ret; @@ -219,6 +221,7 @@ generic_test (const struct test_case *tests, current_state = "init"; +#ifdef HAVE_SIGACTION sigemptyset (&sa.sa_mask); sa.sa_flags = 0; #ifdef SA_RESETHAND @@ -226,6 +229,7 @@ generic_test (const struct test_case *tests, #endif sa.sa_handler = segv_handler; sigaction (SIGSEGV, &sa, &osa); +#endif data = map_alloc(OVERRUN, NULL, data_size, &data_map); @@ -241,7 +245,7 @@ generic_test (const struct test_case *tests, continue; } if (sz != tests[i].byte_len) { - printf ("encoding of %s has wrong len (%lu != %lu)\n", + printf ("encoding of %s has wrong len (%lu != %lu)\n", tests[i].name, (unsigned long)sz, (unsigned long)tests[i].byte_len); ++failures; @@ -329,7 +333,9 @@ generic_test (const struct test_case *tests, map_free(buf2_map, tests[i].name, "decode"); map_free(data_map, tests[i].name, "data"); +#ifdef HAVE_SIGACTION sigaction (SIGSEGV, &osa, NULL); +#endif } current_state = "done"; return failures; @@ -355,7 +361,9 @@ generic_decode_fail (const struct test_case *tests, void *data; struct map_page *data_map, *buf_map; +#ifdef HAVE_SIGACTION struct sigaction sa, osa; +#endif for (i = 0; i < ntests; ++i) { int ret; @@ -366,6 +374,7 @@ generic_decode_fail (const struct test_case *tests, current_state = "init"; +#ifdef HAVE_SIGACTION sigemptyset (&sa.sa_mask); sa.sa_flags = 0; #ifdef SA_RESETHAND @@ -373,6 +382,7 @@ generic_decode_fail (const struct test_case *tests, #endif sa.sa_handler = segv_handler; sigaction (SIGSEGV, &sa, &osa); +#endif data = map_alloc(OVERRUN, NULL, data_size, &data_map); @@ -402,7 +412,9 @@ generic_decode_fail (const struct test_case *tests, map_free(buf_map, tests[i].name, "encode"); map_free(data_map, tests[i].name, "data"); +#ifdef HAVE_SIGACTION sigaction (SIGSEGV, &osa, NULL); +#endif } current_state = "done"; return failures; diff --git a/lib/asn1/gen.c b/lib/asn1/gen.c index 386ee1c0a..ac3653ebc 100644 --- a/lib/asn1/gen.c +++ b/lib/asn1/gen.c @@ -228,6 +228,18 @@ init_generate (const char *filename, const char *base) " } \\\n" " } while (0)\n\n", headerfile); + fputs("#ifdef _WIN32\n" + "#ifndef ASN1_LIB\n" + "#define ASN1EXP __declspec(dllimport)\n" + "#else\n" + "#define ASN1EXP\n" + "#endif\n" + "#define ASN1CALL __stdcall\n" + "#else\n" + "#define ASN1EXP\n" + "#define ASN1CALL\n" + "#endif\n", + headerfile); fprintf (headerfile, "struct units;\n\n"); fprintf (headerfile, "#endif\n\n"); if (asprintf(&fn, "%s_files", base) < 0 || fn == NULL) @@ -340,6 +352,7 @@ generate_header_of_codefile(const char *name) fprintf (codefile, "/* Generated from %s */\n" "/* Do not edit */\n\n" + "#define ASN1_LIB\n\n" "#include \n" "#include \n" "#include \n" @@ -975,6 +988,7 @@ void generate_type (const Symbol *s) { FILE *h; + const char * exp; if (!one_code_file) generate_header_of_codefile(s->gen_name); @@ -996,30 +1010,37 @@ generate_type (const Symbol *s) /* generate prototypes */ - if (is_export(s->name)) + if (is_export(s->name)) { h = headerfile; - else + exp = "ASN1EXP "; + } else { h = privheaderfile; + exp = ""; + } fprintf (h, - "int " + "%sint ASN1CALL " "decode_%s(const unsigned char *, size_t, %s *, size_t *);\n", + exp, s->gen_name, s->gen_name); fprintf (h, - "int " + "%sint ASN1CALL " "encode_%s(unsigned char *, size_t, const %s *, size_t *);\n", + exp, s->gen_name, s->gen_name); fprintf (h, - "size_t length_%s(const %s *);\n", + "%ssize_t ASN1CALL length_%s(const %s *);\n", + exp, s->gen_name, s->gen_name); fprintf (h, - "int copy_%s (const %s *, %s *);\n", + "%sint ASN1CALL copy_%s (const %s *, %s *);\n", + exp, s->gen_name, s->gen_name, s->gen_name); fprintf (h, - "void free_%s (%s *);\n", + "%svoid ASN1CALL free_%s (%s *);\n", + exp, s->gen_name, s->gen_name); - fprintf(h, "\n\n"); if (!one_code_file) { diff --git a/lib/asn1/gen_copy.c b/lib/asn1/gen_copy.c index ee68e1942..36f68ee5d 100644 --- a/lib/asn1/gen_copy.c +++ b/lib/asn1/gen_copy.c @@ -231,7 +231,7 @@ generate_type_copy (const Symbol *s) used_fail = 0; - fprintf (codefile, "int\n" + fprintf (codefile, "int ASN1CALL\n" "copy_%s(const %s *from, %s *to)\n" "{\n" "memset(to, 0, sizeof(*to));\n", diff --git a/lib/asn1/gen_decode.c b/lib/asn1/gen_decode.c index de680173a..ad76c0725 100644 --- a/lib/asn1/gen_decode.c +++ b/lib/asn1/gen_decode.c @@ -661,7 +661,7 @@ generate_type_decode (const Symbol *s) { int preserve = preserve_type(s->name) ? TRUE : FALSE; - fprintf (codefile, "int\n" + fprintf (codefile, "int ASN1CALL\n" "decode_%s(const unsigned char *p," " size_t len, %s *data, size_t *size)\n" "{\n", diff --git a/lib/asn1/gen_encode.c b/lib/asn1/gen_encode.c index f622a95ef..43f29c1fe 100644 --- a/lib/asn1/gen_encode.c +++ b/lib/asn1/gen_encode.c @@ -288,8 +288,8 @@ encode_type (const char *name, const Type *t, const char *tmpstr) fprintf(codefile, "{\n" "struct heim_octet_string *val;\n" - "size_t elen, totallen = 0;\n" - "int eret;\n"); + "size_t elen = 0, totallen = 0;\n" + "int eret = 0;\n"); fprintf(codefile, "if ((%s)->len > UINT_MAX/sizeof(val[0]))\n" @@ -502,7 +502,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) void generate_type_encode (const Symbol *s) { - fprintf (codefile, "int\n" + fprintf (codefile, "int ASN1CALL\n" "encode_%s(unsigned char *p, size_t len," " const %s *data, size_t *size)\n" "{\n", diff --git a/lib/asn1/gen_free.c b/lib/asn1/gen_free.c index 948273b22..7c88751c3 100644 --- a/lib/asn1/gen_free.c +++ b/lib/asn1/gen_free.c @@ -180,7 +180,7 @@ generate_type_free (const Symbol *s) { int preserve = preserve_type(s->name) ? TRUE : FALSE; - fprintf (codefile, "void\n" + fprintf (codefile, "void ASN1CALL\n" "free_%s(%s *data)\n" "{\n", s->gen_name, s->gen_name); diff --git a/lib/asn1/gen_length.c b/lib/asn1/gen_length.c index 6284e5e9f..20b5adfe5 100644 --- a/lib/asn1/gen_length.c +++ b/lib/asn1/gen_length.c @@ -187,13 +187,13 @@ length_type (const char *name, const Type *t, fprintf (codefile, "{\n" - "int %s_oldret = %s;\n" + "size_t %s_oldret = %s;\n" "int i;\n" "%s = 0;\n", tmpstr, variable, variable); fprintf (codefile, "for(i = (%s)->len - 1; i >= 0; --i){\n", name); - fprintf (codefile, "int %s_for_oldret = %s;\n" + fprintf (codefile, "size_t %s_for_oldret = %s;\n" "%s = 0;\n", tmpstr, variable, variable); if (asprintf (&n, "&(%s)->val[i]", name) < 0 || n == NULL) errx(1, "malloc"); @@ -267,7 +267,7 @@ void generate_type_length (const Symbol *s) { fprintf (codefile, - "size_t\n" + "size_t ASN1CALL\n" "length_%s(const %s *data)\n" "{\n" "size_t ret = 0;\n", diff --git a/lib/asn1/gen_seq.c b/lib/asn1/gen_seq.c index 7df82f00c..ac7b9ed0b 100644 --- a/lib/asn1/gen_seq.c +++ b/lib/asn1/gen_seq.c @@ -67,12 +67,12 @@ generate_type_seq (const Symbol *s) subname = type->subtype->symbol->gen_name; fprintf (headerfile, - "int add_%s (%s *, const %s *);\n" - "int remove_%s (%s *, unsigned int);\n", + "ASN1EXP int ASN1CALL add_%s (%s *, const %s *);\n" + "ASN1EXP int ASN1CALL remove_%s (%s *, unsigned int);\n", s->gen_name, s->gen_name, subname, s->gen_name, s->gen_name); - fprintf (codefile, "int\n" + fprintf (codefile, "int ASN1CALL\n" "add_%s(%s *data, const %s *element)\n" "{\n", s->gen_name, s->gen_name, subname); @@ -93,7 +93,7 @@ generate_type_seq (const Symbol *s) fprintf (codefile, "}\n\n"); - fprintf (codefile, "int\n" + fprintf (codefile, "int ASN1CALL\n" "remove_%s(%s *data, unsigned int element)\n" "{\n", s->gen_name, s->gen_name); diff --git a/lib/com_err/NTMakefile b/lib/com_err/NTMakefile index 686b583af..2dbb04409 100644 --- a/lib/com_err/NTMakefile +++ b/lib/com_err/NTMakefile @@ -31,6 +31,8 @@ RELDIR = lib\com_err +intcflags=-DBUILD_KRB5_LIB + !include ../../windows/NTMakefile.w32 INCFILES=$(INCDIR)\com_err.h $(INCDIR)\com_right.h @@ -52,17 +54,13 @@ $(COMERRDLL): $(libcomerr_OBJs) $(OBJ)\libcom_err-version.res $(DLLGUILINK_C) -out:$(COMERRDLL) -implib:$(LIBCOMERR) $** \ $(LIBROKEN) \ -def:libcom_err-exports.def - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(DLLPREP) !endif -$(BINDIR)\compile_et.exe: $(OBJ)\parse.obj $(OBJ)\lex.obj $(OBJ)\compile_et.obj +$(BINDIR)\compile_et.exe: $(OBJ)\parse.obj $(OBJ)\lex.obj $(OBJ)\compile_et.obj $(OBJ)\compile_et-version.res $(EXECONLINK) $(LIBROKEN) $(LIBVERS) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(OBJ)\parse.obj: $(OBJ)\parse.c $(C2OBJ) -I$(SRC)\$(RELDIR) @@ -86,3 +84,7 @@ clean:: -$(RM) $(INCFILES) -$(RM) $(COMERRDLL) +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libcom_err-exports.def + +test:: test-exports diff --git a/lib/com_err/com_err.c b/lib/com_err/com_err.c index a43d1e3e6..fe4cc2983 100644 --- a/lib/com_err/com_err.c +++ b/lib/com_err/com_err.c @@ -43,7 +43,7 @@ struct et_list *_et_list = NULL; -const char * +KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL error_message (long code) { static char msg[128]; @@ -61,18 +61,18 @@ error_message (long code) return msg; } -int +KRB5_LIB_FUNCTION int KRB5_LIB_CALL init_error_table(const char **msgs, long base, int count) { initialize_error_table_r(&_et_list, msgs, count, base); return 0; } -static void +static void KRB5_CALLCONV default_proc (const char *whoami, long code, const char *fmt, va_list args) __attribute__((__format__(__printf__, 3, 0))); -static void +static void KRB5_CALLCONV default_proc (const char *whoami, long code, const char *fmt, va_list args) { if (whoami) @@ -86,7 +86,7 @@ default_proc (const char *whoami, long code, const char *fmt, va_list args) static errf com_err_hook = default_proc; -void +KRB5_LIB_FUNCTION void KRB5_LIB_CALL com_err_va (const char *whoami, long code, const char *fmt, @@ -95,7 +95,7 @@ com_err_va (const char *whoami, (*com_err_hook) (whoami, code, fmt, args); } -void +KRB5_LIB_FUNCTION void KRB5_LIB_CALL com_err (const char *whoami, long code, const char *fmt, @@ -107,7 +107,7 @@ com_err (const char *whoami, va_end(ap); } -errf +KRB5_LIB_FUNCTION errf KRB5_LIB_CALL set_com_err_hook (errf new) { errf old = com_err_hook; @@ -120,7 +120,7 @@ set_com_err_hook (errf new) return old; } -errf +KRB5_LIB_FUNCTION errf KRB5_LIB_CALL reset_com_err_hook (void) { return set_com_err_hook(NULL); @@ -134,7 +134,7 @@ static const char char_set[] = static char buf[6]; -const char * +KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL error_table_name(int num) { int ch; @@ -156,7 +156,7 @@ error_table_name(int num) return(buf); } -void +KRB5_LIB_FUNCTION void KRB5_LIB_CALL add_to_error_table(struct et_list *new_table) { struct et_list *et; diff --git a/lib/com_err/com_err.h b/lib/com_err/com_err.h index a8ceb969c..1fcfe7f7a 100644 --- a/lib/com_err/com_err.h +++ b/lib/com_err/com_err.h @@ -45,22 +45,52 @@ #define __attribute__(X) #endif -typedef void (*errf) (const char *, long, const char *, va_list); +#ifndef KRB5_LIB +#ifndef KRB5_LIB_FUNCTION +#if defined(_WIN32) +#define KRB5_LIB_FUNCTION __declspec(dllimport) +#define KRB5_LIB_CALL __stdcall +#define KRB5_LIB_VARIABLE __declspec(dllimport) +#else +#define KRB5_LIB_FUNCTION +#define KRB5_LIB_CALL +#define KRB5_LIB_VARIABLE +#endif +#endif +#endif -const char * error_message (long); -int init_error_table (const char**, long, int); +#ifdef _WIN32 +#define KRB5_CALLCONV __stdcall +#else +#define KRB5_CALLCONV +#endif -void com_err_va (const char *, long, const char *, va_list) +typedef void (KRB5_CALLCONV *errf) (const char *, long, const char *, va_list); + +KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL +error_message (long); + +KRB5_LIB_FUNCTION int KRB5_LIB_CALL +init_error_table (const char**, long, int); + +KRB5_LIB_FUNCTION void KRB5_LIB_CALL +com_err_va (const char *, long, const char *, va_list) __attribute__((format(printf, 3, 0))); -void com_err (const char *, long, const char *, ...) +KRB5_LIB_FUNCTION void KRB5_LIB_CALL +com_err (const char *, long, const char *, ...) __attribute__((format(printf, 3, 4))); -errf set_com_err_hook (errf); -errf reset_com_err_hook (void); +KRB5_LIB_FUNCTION errf KRB5_LIB_CALL +set_com_err_hook (errf); -const char *error_table_name (int num); +KRB5_LIB_FUNCTION errf KRB5_LIB_CALL +reset_com_err_hook (void); -void add_to_error_table (struct et_list *new_table); +KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL +error_table_name (int num); + +KRB5_LIB_FUNCTION void KRB5_LIB_CALL +add_to_error_table (struct et_list *new_table); #endif /* __COM_ERR_H__ */ diff --git a/lib/com_err/compile_et-version.rc b/lib/com_err/compile_et-version.rc new file mode 100644 index 000000000..5b0b91abe --- /dev/null +++ b/lib/com_err/compile_et-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Error Table Compiler" +#define RC_FILE_ORIG_0409 "compile_et.exe" + +#include "../../windows/version.rc" diff --git a/lib/com_err/libcom_err-version.rc b/lib/com_err/libcom_err-version.rc index 5f38c1f7c..7fe64323e 100644 --- a/lib/com_err/libcom_err-version.rc +++ b/lib/com_err/libcom_err-version.rc @@ -1,19 +1,19 @@ /*********************************************************************** * Copyright (c) 2009, Secure Endpoints Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -26,11 +26,11 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. - * + * **********************************************************************/ #define RC_FILE_TYPE VFT_DLL -#define RC_FILE_COMMENT_0409 "Some comment" +#define RC_FILE_DESC_0409 "Common Error Library" #define RC_FILE_ORIG_0409 "com_err.dll" #include "../../windows/version.rc" diff --git a/lib/editline/NTMakefile b/lib/editline/NTMakefile index 6c4eb60bd..55ab8aaa5 100644 --- a/lib/editline/NTMakefile +++ b/lib/editline/NTMakefile @@ -43,9 +43,7 @@ $(LIBDIR)\libeditline.lib: $(libeditline_la_OBJS) $(OBJ)\testit.exe: $(OBJ)\testit.obj $(LIBEDITLINE) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP_NODIST) all:: $(LIBEDITLINE) @@ -55,8 +53,6 @@ clean:: test-binaries: $(OBJ)\testit.exe run-test: - cd $(OBJ) - testit.exe - cd $(SRC)\lib\editline + echo Please run $(OBJ)\testit.exe interactively to test. test:: test-binaries run-test diff --git a/lib/gssapi/NTMakefile b/lib/gssapi/NTMakefile index 6f321b732..2430ca37b 100644 --- a/lib/gssapi/NTMakefile +++ b/lib/gssapi/NTMakefile @@ -91,7 +91,6 @@ mechsrc = \ mech/context.h \ mech/context.c \ mech/cred.h \ - mech/doxygen.c \ mech/gss_accept_sec_context.c \ mech/gss_acquire_cred.c \ mech/gss_add_cred.c \ @@ -309,7 +308,6 @@ libgssapi_OBJs = \ $(OBJ)\krb5/verify_mic.obj \ $(OBJ)\krb5/wrap.obj \ $(OBJ)\mech/context.obj \ - $(OBJ)\mech/doxygen.obj \ $(OBJ)\mech/gss_accept_sec_context.obj \ $(OBJ)\mech/gss_acquire_cred.obj \ $(OBJ)\mech/gss_add_cred.obj \ @@ -406,38 +404,38 @@ libgssapi_OBJs = \ GCOPTS=-I$(SRCDIR) -I$(OBJ) -Igssapi -DBUILD_GSSAPI_LIB -{$(OBJ)\krb5}.c{$(OBJ)\krb5}.obj: - $(C2OBJ) -I$(OBJ)\krb5 $(GCOPTS) +{$(OBJ)\krb5}.c{$(OBJ)\krb5}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\krb5\ -Fd$(OBJ)\krb5\ -I$(OBJ)\krb5 $(GCOPTS) -{krb5}.c{$(OBJ)\krb5}.obj: - $(C2OBJ) -I$(OBJ)\krb5 $(GCOPTS) +{krb5}.c{$(OBJ)\krb5}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\krb5\ -Fd$(OBJ)\krb5\ -I$(OBJ)\krb5 $(GCOPTS) -{$(OBJ)\mech}.c{$(OBJ)\mech}.obj: - $(C2OBJ) -I$(OBJ)\mech $(GCOPTS) +{$(OBJ)\mech}.c{$(OBJ)\mech}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\mech\ -Fd$(OBJ)\mech\ -I$(OBJ)\mech $(GCOPTS) -{mech}.c{$(OBJ)\mech}.obj: - $(C2OBJ) -I$(OBJ)\mech -I$(OBJ)\gssapi $(GCOPTS) +{mech}.c{$(OBJ)\mech}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\mech\ -Fd$(OBJ)\mech\ -I$(OBJ)\mech -I$(OBJ)\gssapi $(GCOPTS) -{$(OBJ)\ntlm}.c{$(OBJ)\ntlm}.obj: - $(C2OBJ) -I$(OBJ)\ntlm $(GCOPTS) +{$(OBJ)\ntlm}.c{$(OBJ)\ntlm}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\ntlm\ -Fd$(OBJ)\ntlm\ -I$(OBJ)\ntlm $(GCOPTS) -{ntlm}.c{$(OBJ)\ntlm}.obj: - $(C2OBJ) -I$(OBJ)\ntlm $(GCOPTS) +{ntlm}.c{$(OBJ)\ntlm}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\ntlm\ -Fd$(OBJ)\ntlm\ -I$(OBJ)\ntlm $(GCOPTS) -{$(OBJ)\spnego}.c{$(OBJ)\spnego}.obj: - $(C2OBJ) -I$(OBJ)\spnego $(GCOPTS) +{$(OBJ)\spnego}.c{$(OBJ)\spnego}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\spnego\ -Fd$(OBJ)\spnego\ -I$(OBJ)\spnego $(GCOPTS) -{spnego}.c{$(OBJ)\spnego}.obj: - $(C2OBJ) -I$(OBJ)\spnego -Imech $(GCOPTS) +{spnego}.c{$(OBJ)\spnego}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\spnego\ -Fd$(OBJ)\spnego\ -I$(OBJ)\spnego -Imech $(GCOPTS) -{$(OBJ)\gssapi}.c{$(OBJ)\gssapi}.obj: - $(C2OBJ) -I$(OBJ)\gssapi $(GCOPTS) +{$(OBJ)\gssapi}.c{$(OBJ)\gssapi}.obj:: + $(C2OBJ_NP) -Fo$(OBJ)\gssapi\ -Fd$(OBJ)\gssapi\ -I$(OBJ)\gssapi $(GCOPTS) -{}.c{$(OBJ)}.obj: - $(C2OBJ) $(GCOPTS) +{}.c{$(OBJ)}.obj:: + $(C2OBJ_P) $(GCOPTS) -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) $(GCOPTS) +{$(OBJ)}.c{$(OBJ)}.obj:: + $(C2OBJ_P) $(GCOPTS) {$(OBJ)\spnego}.x{$(OBJ)\spnego}.c: $(CP) $** $@ @@ -456,9 +454,7 @@ GCOPTS=-I$(SRCDIR) -I$(OBJ) -Igssapi -DBUILD_GSSAPI_LIB LIBGSSAPI_LIBS=\ $(LIBROKEN) \ - $(LIBASN1) \ - $(LIBKRB5) \ - $(LIBHCRYPTO) \ + $(LIBHEIMDAL) \ $(LIBHEIMNTLM) \ $(LIBCOMERR) @@ -467,22 +463,22 @@ LIBGSSAPI_SDKLIBS=\ !ifndef STATICLIBS -$(BINDIR)\libgssapi.dll: $(libgssapi_OBJs) +RES=$(OBJ)\libgssapi-version.res + +$(BINDIR)\gssapi.dll: $(libgssapi_OBJs) $(RES) $(DLLGUILINK_C) -implib:$(LIBGSSAPI) \ - -out:$(BINDIR)\libgssapi.dll \ + -out:$(BINDIR)\gssapi.dll \ -def:libgssapi-exports.def \ - $(LIBGSSAPI_LIBS) $(LIBGSSAPI_SDKLIBS) @<< + $(LIBGSSAPI_LIBS) $(RES) $(LIBGSSAPI_SDKLIBS) @<< $(libgssapi_OBJs: = ) << - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(DLLPREP) -$(LIBGSSAPI): $(BINDIR)\libgssapi.dll +$(LIBGSSAPI): $(BINDIR)\gssapi.dll clean:: - -$(RM) $(BINDIR)\libgssapi.dll + -$(RM) $(BINDIR)\gssapi.dll !else @@ -535,3 +531,8 @@ clean:: "\t$(gssapi_files:.x=.obj)") "krb5src" "mechsrc" "spnegosrc" "ntlmsrc") !endif + +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libgssapi-exports.def + +test:: test-exports diff --git a/lib/gssapi/gssapi/gssapi.h b/lib/gssapi/gssapi/gssapi.h index 6957c9a01..fa53a8a74 100644 --- a/lib/gssapi/gssapi/gssapi.h +++ b/lib/gssapi/gssapi/gssapi.h @@ -73,6 +73,12 @@ #define GSSAPI_CPP_END #endif +#ifdef _WIN32 +#define GSSAPI_CALLCONV __stdcall +#else +#define GSSAPI_CALLCONV +#endif + /* * Now define the three implementation-dependent types. */ @@ -446,7 +452,7 @@ extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_sasl_digest_md5_mechanism_oid_desc * Finally, function prototypes for the GSS-API routines. */ -OM_uint32 GSSAPI_LIB_FUNCTION gss_acquire_cred +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred (OM_uint32 * /*minor_status*/, const gss_name_t /*desired_name*/, OM_uint32 /*time_req*/, @@ -457,12 +463,12 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_acquire_cred OM_uint32 * /*time_rec*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_release_cred +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred (OM_uint32 * /*minor_status*/, gss_cred_id_t * /*cred_handle*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_init_sec_context +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context (OM_uint32 * /*minor_status*/, const gss_cred_id_t /*initiator_cred_handle*/, gss_ctx_id_t * /*context_handle*/, @@ -478,7 +484,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_init_sec_context OM_uint32 * /*time_rec*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_accept_sec_context +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_accept_sec_context (OM_uint32 * /*minor_status*/, gss_ctx_id_t * /*context_handle*/, const gss_cred_id_t /*acceptor_cred_handle*/, @@ -492,25 +498,25 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_accept_sec_context gss_cred_id_t * /*delegated_cred_handle*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_process_context_token +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_process_context_token (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, const gss_buffer_t /*token_buffer*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_delete_sec_context +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_sec_context (OM_uint32 * /*minor_status*/, gss_ctx_id_t * /*context_handle*/, gss_buffer_t /*output_token*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_context_time +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_time (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, OM_uint32 * /*time_rec*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_get_mic +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_mic (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, gss_qop_t /*qop_req*/, @@ -518,7 +524,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_get_mic gss_buffer_t /*message_token*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_verify_mic +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify_mic (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, const gss_buffer_t /*message_buffer*/, @@ -526,7 +532,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_verify_mic gss_qop_t * /*qop_state*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, int /*conf_req_flag*/, @@ -536,7 +542,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap gss_buffer_t /*output_message_buffer*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_unwrap +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap (OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, const gss_buffer_t /*input_message_buffer*/, @@ -545,7 +551,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_unwrap gss_qop_t * /*qop_state*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_display_status +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_status (OM_uint32 * /*minor_status*/, OM_uint32 /*status_value*/, int /*status_type*/, @@ -554,54 +560,54 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_display_status gss_buffer_t /*status_string*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_indicate_mechs +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_indicate_mechs (OM_uint32 * /*minor_status*/, gss_OID_set * /*mech_set*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_compare_name +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_compare_name (OM_uint32 * /*minor_status*/, const gss_name_t /*name1*/, const gss_name_t /*name2*/, int * /*name_equal*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_display_name +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name (OM_uint32 * /*minor_status*/, const gss_name_t /*input_name*/, gss_buffer_t /*output_name_buffer*/, gss_OID * /*output_name_type*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_import_name +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name (OM_uint32 * /*minor_status*/, const gss_buffer_t /*input_name_buffer*/, const gss_OID /*input_name_type*/, gss_name_t * /*output_name*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_export_name +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name (OM_uint32 * /*minor_status*/, const gss_name_t /*input_name*/, gss_buffer_t /*exported_name*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_release_name +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name (OM_uint32 * /*minor_status*/, gss_name_t * /*input_name*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_release_buffer +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer (OM_uint32 * /*minor_status*/, gss_buffer_t /*buffer*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_release_oid_set +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid_set (OM_uint32 * /*minor_status*/, gss_OID_set * /*set*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_cred +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred (OM_uint32 * /*minor_status*/, const gss_cred_id_t /*cred_handle*/, gss_name_t * /*name*/, @@ -610,7 +616,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_cred gss_OID_set * /*mechanisms*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_context ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_context ( OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, gss_name_t * /*src_name*/, @@ -622,7 +628,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_context ( int * /*open_context*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_size_limit ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_size_limit ( OM_uint32 * /*minor_status*/, const gss_ctx_id_t /*context_handle*/, int /*conf_req_flag*/, @@ -631,7 +637,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_wrap_size_limit ( OM_uint32 * /*max_input_size*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_add_cred ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred ( OM_uint32 * /*minor_status*/, const gss_cred_id_t /*input_cred_handle*/, const gss_name_t /*desired_name*/, @@ -645,7 +651,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_add_cred ( OM_uint32 * /*acceptor_time_rec*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_cred_by_mech ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_mech ( OM_uint32 * /*minor_status*/, const gss_cred_id_t /*cred_handle*/, const gss_OID /*mech_type*/, @@ -655,81 +661,81 @@ OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_cred_by_mech ( gss_cred_usage_t * /*cred_usage*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_export_sec_context ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_sec_context ( OM_uint32 * /*minor_status*/, gss_ctx_id_t * /*context_handle*/, gss_buffer_t /*interprocess_token*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_import_sec_context ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_sec_context ( OM_uint32 * /*minor_status*/, const gss_buffer_t /*interprocess_token*/, gss_ctx_id_t * /*context_handle*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_create_empty_oid_set ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_oid_set ( OM_uint32 * /*minor_status*/, gss_OID_set * /*oid_set*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_add_oid_set_member ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member ( OM_uint32 * /*minor_status*/, const gss_OID /*member_oid*/, gss_OID_set * /*oid_set*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_test_oid_set_member ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_test_oid_set_member ( OM_uint32 * /*minor_status*/, const gss_OID /*member*/, const gss_OID_set /*set*/, int * /*present*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_names_for_mech ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_names_for_mech ( OM_uint32 * /*minor_status*/, const gss_OID /*mechanism*/, gss_OID_set * /*name_types*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_inquire_mechs_for_name ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_mechs_for_name ( OM_uint32 * /*minor_status*/, const gss_name_t /*input_name*/, gss_OID_set * /*mech_types*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_canonicalize_name ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name ( OM_uint32 * /*minor_status*/, const gss_name_t /*input_name*/, const gss_OID /*mech_type*/, gss_name_t * /*output_name*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_duplicate_name ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_name ( OM_uint32 * /*minor_status*/, const gss_name_t /*src_name*/, gss_name_t * /*dest_name*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION gss_duplicate_oid ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_duplicate_oid ( OM_uint32 * /* minor_status */, gss_OID /* src_oid */, gss_OID * /* dest_oid */ ); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid (OM_uint32 * /*minor_status*/, gss_OID * /* oid */ ); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_oid_to_str( OM_uint32 * /*minor_status*/, gss_OID /* oid */, gss_buffer_t /* str */ ); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_sec_context_by_oid( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, @@ -737,38 +743,38 @@ gss_inquire_sec_context_by_oid( gss_buffer_set_t *data_set ); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_sec_context_option (OM_uint32 *minor_status, gss_ctx_id_t *context_handle, const gss_OID desired_object, const gss_buffer_t value); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_cred_option (OM_uint32 *minor_status, gss_cred_id_t *cred_handle, const gss_OID object, const gss_buffer_t value); -int GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL gss_oid_equal(const gss_OID a, const gss_OID b); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_buffer_set (OM_uint32 * minor_status, gss_buffer_set_t *buffer_set); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_buffer_set_member (OM_uint32 * minor_status, const gss_buffer_t member_buffer, gss_buffer_set_t *buffer_set); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer_set (OM_uint32 * minor_status, gss_buffer_set_t *buffer_set); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_oid(OM_uint32 *minor_status, const gss_cred_id_t cred_handle, const gss_OID desired_object, @@ -781,7 +787,7 @@ gss_inquire_cred_by_oid(OM_uint32 *minor_status, #define GSS_C_PRF_KEY_FULL 0 #define GSS_C_PRF_KEY_PARTIAL 1 -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_pseudo_random (OM_uint32 *minor_status, gss_ctx_id_t context, @@ -791,7 +797,7 @@ gss_pseudo_random gss_buffer_t prf_out ); -OM_uint32 +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_store_cred(OM_uint32 * /* minor_status */, gss_cred_id_t /* input_cred_handle */, gss_cred_usage_t /* cred_usage */, @@ -820,7 +826,7 @@ extern gss_OID_desc GSSAPI_LIB_VARIABLE __gss_c_attr_stream_sizes_oid_desc; #define GSS_C_ATTR_STREAM_SIZES (&__gss_c_attr_stream_sizes_oid_desc) -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_query_attributes(OM_uint32 * /* minor_status */, const gss_ctx_id_t /* context_handle */, const gss_OID /* attribute */, @@ -837,7 +843,7 @@ gss_context_query_attributes(OM_uint32 * /* minor_status */, * obsolete versions of these routines and their current forms. */ -OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_sign +GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign (OM_uint32 * /*minor_status*/, gss_ctx_id_t /*context_handle*/, int /*qop_req*/, @@ -845,7 +851,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_sign gss_buffer_t /*message_token*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_verify +GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify (OM_uint32 * /*minor_status*/, gss_ctx_id_t /*context_handle*/, gss_buffer_t /*message_buffer*/, @@ -853,7 +859,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_verify int * /*qop_state*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_seal +GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal (OM_uint32 * /*minor_status*/, gss_ctx_id_t /*context_handle*/, int /*conf_req_flag*/, @@ -863,7 +869,7 @@ OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_seal gss_buffer_t /*output_message_buffer*/ ); -OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_unseal +GSSAPI_DEPRECATED GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal (OM_uint32 * /*minor_status*/, gss_ctx_id_t /*context_handle*/, gss_buffer_t /*input_message_buffer*/, @@ -876,12 +882,12 @@ OM_uint32 GSSAPI_LIB_FUNCTION GSSAPI_DEPRECATED gss_unseal * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_encapsulate_token(const gss_buffer_t /* input_token */, const gss_OID /* oid */, gss_buffer_t /* output_token */); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_decapsulate_token(const gss_buffer_t /* input_token */, const gss_OID /* oid */, gss_buffer_t /* output_token */); @@ -896,29 +902,29 @@ gss_decapsulate_token(const gss_buffer_t /* input_token */, * GSS_IOV */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *, gss_iov_buffer_desc *, int); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap_iov(OM_uint32 *, gss_ctx_id_t, int *, gss_qop_t *, gss_iov_buffer_desc *, int); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov_length(OM_uint32 *, gss_ctx_id_t, int, gss_qop_t, int *, gss_iov_buffer_desc *, int); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_iov_buffer(OM_uint32 *, gss_iov_buffer_desc *, int); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_cred(OM_uint32 * /* minor_status */, gss_cred_id_t /* cred_handle */, gss_buffer_t /* cred_token */); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_cred(OM_uint32 * /* minor_status */, gss_buffer_t /* cred_token */, gss_cred_id_t * /* cred_handle */); diff --git a/lib/gssapi/gssapi/gssapi_krb5.h b/lib/gssapi/gssapi/gssapi_krb5.h index 7d580bcec..28f9c3777 100644 --- a/lib/gssapi/gssapi/gssapi_krb5.h +++ b/lib/gssapi/gssapi/gssapi_krb5.h @@ -149,42 +149,42 @@ struct krb5_keytab_data; struct krb5_ccache_data; struct Principal; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_ccache_name(OM_uint32 * /*minor_status*/, const char * /*name */, const char ** /*out_name */); -OM_uint32 GSSAPI_LIB_FUNCTION gsskrb5_register_acceptor_identity +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_register_acceptor_identity (const char * /*identity*/); -OM_uint32 GSSAPI_LIB_FUNCTION krb5_gss_register_acceptor_identity +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL krb5_gss_register_acceptor_identity (const char * /*identity*/); -OM_uint32 GSSAPI_LIB_FUNCTION gss_krb5_copy_ccache +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_copy_ccache (OM_uint32 * /*minor*/, gss_cred_id_t /*cred*/, struct krb5_ccache_data * /*out*/); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_import_cred(OM_uint32 * /*minor*/, struct krb5_ccache_data * /*in*/, struct Principal * /*keytab_principal*/, struct krb5_keytab_data * /*keytab*/, gss_cred_id_t * /*out*/); -OM_uint32 GSSAPI_LIB_FUNCTION gss_krb5_get_tkt_flags +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_get_tkt_flags (OM_uint32 * /*minor*/, gss_ctx_id_t /*context_handle*/, OM_uint32 * /*tkt_flags*/); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_authz_data_from_sec_context (OM_uint32 * /*minor_status*/, gss_ctx_id_t /*context_handle*/, int /*ad_type*/, gss_buffer_t /*ad_data*/); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_dns_canonicalize(int); struct gsskrb5_send_to_kdc { @@ -192,35 +192,35 @@ struct gsskrb5_send_to_kdc { void *ptr; }; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_send_to_kdc(struct gsskrb5_send_to_kdc *) GSSKRB5_FUNCTION_DEPRECATED; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_default_realm(const char *); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_authtime_from_sec_context(OM_uint32 *, gss_ctx_id_t, time_t *); struct EncryptionKey; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_service_keyblock(OM_uint32 *minor_status, gss_ctx_id_t context_handle, struct EncryptionKey **out); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_initiator_subkey(OM_uint32 *minor_status, gss_ctx_id_t context_handle, struct EncryptionKey **out); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_subkey(OM_uint32 *minor_status, gss_ctx_id_t context_handle, struct EncryptionKey **out); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_time_offset(int); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_time_offset(int *); struct gsskrb5_krb5_plugin { @@ -229,7 +229,7 @@ struct gsskrb5_krb5_plugin { void *symbol; }; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_plugin_register(struct gsskrb5_krb5_plugin *); @@ -275,19 +275,19 @@ typedef struct gss_krb5_lucid_context_version { * Function declarations */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_export_lucid_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, OM_uint32 version, void **kctx); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_free_lucid_sec_context(OM_uint32 *minor_status, void *kctx); -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_set_allowable_enctypes(OM_uint32 *minor_status, gss_cred_id_t cred, OM_uint32 num_enctypes, diff --git a/lib/gssapi/gssapi_mech.h b/lib/gssapi/gssapi_mech.h index 65cabf54d..93b7bf72d 100644 --- a/lib/gssapi/gssapi_mech.h +++ b/lib/gssapi/gssapi_mech.h @@ -31,7 +31,7 @@ #include -typedef OM_uint32 _gss_acquire_cred_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_acquire_cred_t (OM_uint32 *, /* minor_status */ const gss_name_t, /* desired_name */ OM_uint32, /* time_req */ @@ -42,12 +42,12 @@ typedef OM_uint32 _gss_acquire_cred_t OM_uint32 * /* time_rec */ ); -typedef OM_uint32 _gss_release_cred_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_release_cred_t (OM_uint32 *, /* minor_status */ gss_cred_id_t * /* cred_handle */ ); -typedef OM_uint32 _gss_init_sec_context_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_init_sec_context_t (OM_uint32 *, /* minor_status */ const gss_cred_id_t, /* initiator_cred_handle */ gss_ctx_id_t *, /* context_handle */ @@ -64,7 +64,7 @@ typedef OM_uint32 _gss_init_sec_context_t OM_uint32 * /* time_rec */ ); -typedef OM_uint32 _gss_accept_sec_context_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_accept_sec_context_t (OM_uint32 *, /* minor_status */ gss_ctx_id_t *, /* context_handle */ const gss_cred_id_t, /* acceptor_cred_handle */ @@ -79,25 +79,25 @@ typedef OM_uint32 _gss_accept_sec_context_t gss_cred_id_t * /* delegated_cred_handle */ ); -typedef OM_uint32 _gss_process_context_token_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_process_context_token_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ const gss_buffer_t /* token_buffer */ ); -typedef OM_uint32 _gss_delete_sec_context_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_delete_sec_context_t (OM_uint32 *, /* minor_status */ gss_ctx_id_t *, /* context_handle */ gss_buffer_t /* output_token */ ); -typedef OM_uint32 _gss_context_time_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_context_time_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ OM_uint32 * /* time_rec */ ); -typedef OM_uint32 _gss_get_mic_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_get_mic_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ gss_qop_t, /* qop_req */ @@ -105,7 +105,7 @@ typedef OM_uint32 _gss_get_mic_t gss_buffer_t /* message_token */ ); -typedef OM_uint32 _gss_verify_mic_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_verify_mic_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ const gss_buffer_t, /* message_buffer */ @@ -113,7 +113,7 @@ typedef OM_uint32 _gss_verify_mic_t gss_qop_t * /* qop_state */ ); -typedef OM_uint32 _gss_wrap_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ int, /* conf_req_flag */ @@ -123,7 +123,7 @@ typedef OM_uint32 _gss_wrap_t gss_buffer_t /* output_message_buffer */ ); -typedef OM_uint32 _gss_unwrap_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_unwrap_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ const gss_buffer_t, /* input_message_buffer */ @@ -132,7 +132,7 @@ typedef OM_uint32 _gss_unwrap_t gss_qop_t * /* qop_state */ ); -typedef OM_uint32 _gss_display_status_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_display_status_t (OM_uint32 *, /* minor_status */ OM_uint32, /* status_value */ int, /* status_type */ @@ -141,44 +141,44 @@ typedef OM_uint32 _gss_display_status_t gss_buffer_t /* status_string */ ); -typedef OM_uint32 _gss_indicate_mechs_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_indicate_mechs_t (OM_uint32 *, /* minor_status */ gss_OID_set * /* mech_set */ ); -typedef OM_uint32 _gss_compare_name_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_compare_name_t (OM_uint32 *, /* minor_status */ const gss_name_t, /* name1 */ const gss_name_t, /* name2 */ int * /* name_equal */ ); -typedef OM_uint32 _gss_display_name_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_display_name_t (OM_uint32 *, /* minor_status */ const gss_name_t, /* input_name */ gss_buffer_t, /* output_name_buffer */ gss_OID * /* output_name_type */ ); -typedef OM_uint32 _gss_import_name_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_import_name_t (OM_uint32 *, /* minor_status */ const gss_buffer_t, /* input_name_buffer */ const gss_OID, /* input_name_type */ gss_name_t * /* output_name */ ); -typedef OM_uint32 _gss_export_name_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_export_name_t (OM_uint32 *, /* minor_status */ const gss_name_t, /* input_name */ gss_buffer_t /* exported_name */ ); -typedef OM_uint32 _gss_release_name_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_release_name_t (OM_uint32 *, /* minor_status */ gss_name_t * /* input_name */ ); -typedef OM_uint32 _gss_inquire_cred_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_t (OM_uint32 *, /* minor_status */ const gss_cred_id_t, /* cred_handle */ gss_name_t *, /* name */ @@ -187,7 +187,7 @@ typedef OM_uint32 _gss_inquire_cred_t gss_OID_set * /* mechanisms */ ); -typedef OM_uint32 _gss_inquire_context_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_context_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ gss_name_t *, /* src_name */ @@ -199,7 +199,7 @@ typedef OM_uint32 _gss_inquire_context_t int * /* open */ ); -typedef OM_uint32 _gss_wrap_size_limit_t +typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_size_limit_t (OM_uint32 *, /* minor_status */ const gss_ctx_id_t, /* context_handle */ int, /* conf_req_flag */ @@ -208,7 +208,7 @@ typedef OM_uint32 _gss_wrap_size_limit_t OM_uint32 * /* max_input_size */ ); -typedef OM_uint32 _gss_add_cred_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_add_cred_t ( OM_uint32 *, /* minor_status */ const gss_cred_id_t, /* input_cred_handle */ const gss_name_t, /* desired_name */ @@ -222,7 +222,7 @@ typedef OM_uint32 _gss_add_cred_t ( OM_uint32 * /* acceptor_time_rec */ ); -typedef OM_uint32 _gss_inquire_cred_by_mech_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_by_mech_t ( OM_uint32 *, /* minor_status */ const gss_cred_id_t, /* cred_handle */ const gss_OID, /* mech_type */ @@ -232,65 +232,65 @@ typedef OM_uint32 _gss_inquire_cred_by_mech_t ( gss_cred_usage_t * /* cred_usage */ ); -typedef OM_uint32 _gss_export_sec_context_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_export_sec_context_t ( OM_uint32 *, /* minor_status */ gss_ctx_id_t *, /* context_handle */ gss_buffer_t /* interprocess_token */ ); -typedef OM_uint32 _gss_import_sec_context_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_import_sec_context_t ( OM_uint32 *, /* minor_status */ const gss_buffer_t, /* interprocess_token */ gss_ctx_id_t * /* context_handle */ ); -typedef OM_uint32 _gss_inquire_names_for_mech_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_names_for_mech_t ( OM_uint32 *, /* minor_status */ const gss_OID, /* mechanism */ gss_OID_set * /* name_types */ ); -typedef OM_uint32 _gss_inquire_mechs_for_name_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_mechs_for_name_t ( OM_uint32 *, /* minor_status */ const gss_name_t, /* input_name */ gss_OID_set * /* mech_types */ ); -typedef OM_uint32 _gss_canonicalize_name_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_canonicalize_name_t ( OM_uint32 *, /* minor_status */ const gss_name_t, /* input_name */ const gss_OID, /* mech_type */ gss_name_t * /* output_name */ ); -typedef OM_uint32 _gss_duplicate_name_t ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_duplicate_name_t ( OM_uint32 *, /* minor_status */ const gss_name_t, /* src_name */ gss_name_t * /* dest_name */ ); -typedef OM_uint32 _gss_inquire_sec_context_by_oid ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_sec_context_by_oid ( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_OID desired_object, gss_buffer_set_t *data_set ); -typedef OM_uint32 _gss_inquire_cred_by_oid ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_inquire_cred_by_oid ( OM_uint32 *minor_status, const gss_cred_id_t cred, const gss_OID desired_object, gss_buffer_set_t *data_set ); -typedef OM_uint32 _gss_set_sec_context_option ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_set_sec_context_option ( OM_uint32 *minor_status, gss_ctx_id_t *cred_handle, const gss_OID desired_object, const gss_buffer_t value ); -typedef OM_uint32 _gss_set_cred_option ( +typedef OM_uint32 GSSAPI_CALLCONV _gss_set_cred_option ( OM_uint32 *minor_status, gss_cred_id_t *cred_handle, const gss_OID desired_object, @@ -298,7 +298,7 @@ typedef OM_uint32 _gss_set_cred_option ( ); -typedef OM_uint32 _gss_pseudo_random( +typedef OM_uint32 GSSAPI_CALLCONV _gss_pseudo_random( OM_uint32 *minor_status, gss_ctx_id_t context, int prf_key, @@ -307,7 +307,7 @@ typedef OM_uint32 _gss_pseudo_random( gss_buffer_t prf_out ); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_iov_t(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -316,7 +316,7 @@ _gss_wrap_iov_t(OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_unwrap_iov_t(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, @@ -324,7 +324,7 @@ _gss_unwrap_iov_t(OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_wrap_iov_length_t(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -333,7 +333,7 @@ _gss_wrap_iov_length_t(OM_uint32 * minor_status, gss_iov_buffer_desc *iov, int iov_count); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_store_cred_t(OM_uint32 *minor_status, gss_cred_id_t input_cred_handle, gss_cred_usage_t cred_usage, @@ -343,12 +343,12 @@ _gss_store_cred_t(OM_uint32 *minor_status, gss_OID_set *elements_stored, gss_cred_usage_t *cred_usage_stored); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_export_cred_t(OM_uint32 *minor_status, gss_cred_id_t cred_handle, gss_buffer_t cred_token); -typedef OM_uint32 +typedef OM_uint32 GSSAPI_CALLCONV _gss_import_cred_t(OM_uint32 * minor_status, gss_buffer_t cred_token, gss_cred_id_t * cred_handle); diff --git a/lib/gssapi/krb5/accept_sec_context.c b/lib/gssapi/krb5/accept_sec_context.c index e96361ffb..8ec3a65a3 100644 --- a/lib/gssapi/krb5/accept_sec_context.c +++ b/lib/gssapi/krb5/accept_sec_context.c @@ -800,7 +800,7 @@ acceptor_wait_for_dcestyle(OM_uint32 * minor_status, } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_accept_sec_context(OM_uint32 * minor_status, gss_ctx_id_t * context_handle, const gss_cred_id_t acceptor_cred_handle, diff --git a/lib/gssapi/krb5/acquire_cred.c b/lib/gssapi/krb5/acquire_cred.c index 7e448dcfb..584ce7711 100644 --- a/lib/gssapi/krb5/acquire_cred.c +++ b/lib/gssapi/krb5/acquire_cred.c @@ -288,7 +288,7 @@ end: return (ret); } -OM_uint32 _gsskrb5_acquire_cred +OM_uint32 GSSAPI_CALLCONV _gsskrb5_acquire_cred (OM_uint32 * minor_status, const gss_name_t desired_name, OM_uint32 time_req, diff --git a/lib/gssapi/krb5/add_cred.c b/lib/gssapi/krb5/add_cred.c index 0bd2e557c..a326613ed 100644 --- a/lib/gssapi/krb5/add_cred.c +++ b/lib/gssapi/krb5/add_cred.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_add_cred ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_add_cred ( OM_uint32 *minor_status, const gss_cred_id_t input_cred_handle, const gss_name_t desired_name, diff --git a/lib/gssapi/krb5/aeap.c b/lib/gssapi/krb5/aeap.c index f1aee4bbb..040cd3ee7 100644 --- a/lib/gssapi/krb5/aeap.c +++ b/lib/gssapi/krb5/aeap.c @@ -35,7 +35,7 @@ #include -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gk_wrap_iov(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -57,7 +57,7 @@ _gk_wrap_iov(OM_uint32 * minor_status, return GSS_S_FAILURE; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gk_unwrap_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, @@ -77,7 +77,7 @@ _gk_unwrap_iov(OM_uint32 *minor_status, return GSS_S_FAILURE; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gk_wrap_iov_length(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, diff --git a/lib/gssapi/krb5/canonicalize_name.c b/lib/gssapi/krb5/canonicalize_name.c index 3de55d6e3..7fc921bac 100644 --- a/lib/gssapi/krb5/canonicalize_name.c +++ b/lib/gssapi/krb5/canonicalize_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_canonicalize_name ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_canonicalize_name ( OM_uint32 * minor_status, const gss_name_t input_name, const gss_OID mech_type, diff --git a/lib/gssapi/krb5/compare_name.c b/lib/gssapi/krb5/compare_name.c index f45e4df3e..7409d45fc 100644 --- a/lib/gssapi/krb5/compare_name.c +++ b/lib/gssapi/krb5/compare_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_compare_name +OM_uint32 GSSAPI_CALLCONV _gsskrb5_compare_name (OM_uint32 * minor_status, const gss_name_t name1, const gss_name_t name2, diff --git a/lib/gssapi/krb5/context_time.c b/lib/gssapi/krb5/context_time.c index 987ceea4a..7b27906b5 100644 --- a/lib/gssapi/krb5/context_time.c +++ b/lib/gssapi/krb5/context_time.c @@ -62,7 +62,7 @@ _gsskrb5_lifetime_left(OM_uint32 *minor_status, } -OM_uint32 _gsskrb5_context_time +OM_uint32 GSSAPI_CALLCONV _gsskrb5_context_time (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, OM_uint32 * time_rec diff --git a/lib/gssapi/krb5/creds.c b/lib/gssapi/krb5/creds.c index fd4061704..d2c253e84 100644 --- a/lib/gssapi/krb5/creds.c +++ b/lib/gssapi/krb5/creds.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_export_cred(OM_uint32 *minor_status, gss_cred_id_t cred_handle, gss_buffer_t cred_token) @@ -154,7 +154,7 @@ _gsskrb5_export_cred(OM_uint32 *minor_status, return GSS_S_COMPLETE; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_import_cred(OM_uint32 * minor_status, gss_buffer_t cred_token, gss_cred_id_t * cred_handle) diff --git a/lib/gssapi/krb5/delete_sec_context.c b/lib/gssapi/krb5/delete_sec_context.c index b3d436ea0..7a9855881 100644 --- a/lib/gssapi/krb5/delete_sec_context.c +++ b/lib/gssapi/krb5/delete_sec_context.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_delete_sec_context(OM_uint32 * minor_status, gss_ctx_id_t * context_handle, gss_buffer_t output_token) diff --git a/lib/gssapi/krb5/display_name.c b/lib/gssapi/krb5/display_name.c index 6487d8488..a296399ce 100644 --- a/lib/gssapi/krb5/display_name.c +++ b/lib/gssapi/krb5/display_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_display_name +OM_uint32 GSSAPI_CALLCONV _gsskrb5_display_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t output_name_buffer, diff --git a/lib/gssapi/krb5/display_status.c b/lib/gssapi/krb5/display_status.c index c3d4021bd..c50200672 100644 --- a/lib/gssapi/krb5/display_status.c +++ b/lib/gssapi/krb5/display_status.c @@ -139,7 +139,7 @@ _gsskrb5_set_status (int ret, const char *fmt, ...) } } -OM_uint32 _gsskrb5_display_status +OM_uint32 GSSAPI_CALLCONV _gsskrb5_display_status (OM_uint32 *minor_status, OM_uint32 status_value, int status_type, diff --git a/lib/gssapi/krb5/duplicate_name.c b/lib/gssapi/krb5/duplicate_name.c index b0188acd5..0bc57e8a0 100644 --- a/lib/gssapi/krb5/duplicate_name.c +++ b/lib/gssapi/krb5/duplicate_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_duplicate_name ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_duplicate_name ( OM_uint32 * minor_status, const gss_name_t src_name, gss_name_t * dest_name diff --git a/lib/gssapi/krb5/export_name.c b/lib/gssapi/krb5/export_name.c index 705bb70d9..32368d3cc 100644 --- a/lib/gssapi/krb5/export_name.c +++ b/lib/gssapi/krb5/export_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_export_name +OM_uint32 GSSAPI_CALLCONV _gsskrb5_export_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t exported_name diff --git a/lib/gssapi/krb5/export_sec_context.c b/lib/gssapi/krb5/export_sec_context.c index 3d3870a6b..eeb2743b4 100644 --- a/lib/gssapi/krb5/export_sec_context.c +++ b/lib/gssapi/krb5/export_sec_context.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_export_sec_context ( OM_uint32 * minor_status, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/krb5/get_mic.c b/lib/gssapi/krb5/get_mic.c index f3f7fff8a..0109ca7c6 100644 --- a/lib/gssapi/krb5/get_mic.c +++ b/lib/gssapi/krb5/get_mic.c @@ -273,7 +273,7 @@ mic_des3 return GSS_S_COMPLETE; } -OM_uint32 _gsskrb5_get_mic +OM_uint32 GSSAPI_CALLCONV _gsskrb5_get_mic (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_qop_t qop_req, diff --git a/lib/gssapi/krb5/import_name.c b/lib/gssapi/krb5/import_name.c index d78bb2d3a..2a071a305 100644 --- a/lib/gssapi/krb5/import_name.c +++ b/lib/gssapi/krb5/import_name.c @@ -215,7 +215,7 @@ import_export_name (OM_uint32 *minor_status, return ret; } -OM_uint32 _gsskrb5_import_name +OM_uint32 GSSAPI_CALLCONV _gsskrb5_import_name (OM_uint32 * minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, diff --git a/lib/gssapi/krb5/import_sec_context.c b/lib/gssapi/krb5/import_sec_context.c index 2af942338..c873da9ba 100644 --- a/lib/gssapi/krb5/import_sec_context.c +++ b/lib/gssapi/krb5/import_sec_context.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_import_sec_context ( OM_uint32 * minor_status, const gss_buffer_t interprocess_token, diff --git a/lib/gssapi/krb5/indicate_mechs.c b/lib/gssapi/krb5/indicate_mechs.c index b1d18bd24..620137884 100644 --- a/lib/gssapi/krb5/indicate_mechs.c +++ b/lib/gssapi/krb5/indicate_mechs.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_indicate_mechs +OM_uint32 GSSAPI_CALLCONV _gsskrb5_indicate_mechs (OM_uint32 * minor_status, gss_OID_set * mech_set ) diff --git a/lib/gssapi/krb5/init_sec_context.c b/lib/gssapi/krb5/init_sec_context.c index fd9934a9e..c2bd31dad 100644 --- a/lib/gssapi/krb5/init_sec_context.c +++ b/lib/gssapi/krb5/init_sec_context.c @@ -806,7 +806,7 @@ repl_mutual * gss_init_sec_context */ -OM_uint32 _gsskrb5_init_sec_context +OM_uint32 GSSAPI_CALLCONV _gsskrb5_init_sec_context (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/krb5/inquire_context.c b/lib/gssapi/krb5/inquire_context.c index 381ffc9e6..ade8ec4b9 100644 --- a/lib/gssapi/krb5/inquire_context.c +++ b/lib/gssapi/krb5/inquire_context.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_inquire_context ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_context ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_name_t * src_name, diff --git a/lib/gssapi/krb5/inquire_cred.c b/lib/gssapi/krb5/inquire_cred.c index 518736d78..d3798623f 100644 --- a/lib/gssapi/krb5/inquire_cred.c +++ b/lib/gssapi/krb5/inquire_cred.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_inquire_cred +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_cred (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, gss_name_t * output_name, diff --git a/lib/gssapi/krb5/inquire_cred_by_mech.c b/lib/gssapi/krb5/inquire_cred_by_mech.c index 9da1ac43f..7bd9c11c6 100644 --- a/lib/gssapi/krb5/inquire_cred_by_mech.c +++ b/lib/gssapi/krb5/inquire_cred_by_mech.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_inquire_cred_by_mech ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_cred_by_mech ( OM_uint32 * minor_status, const gss_cred_id_t cred_handle, const gss_OID mech_type, diff --git a/lib/gssapi/krb5/inquire_cred_by_oid.c b/lib/gssapi/krb5/inquire_cred_by_oid.c index f32342f1d..d560ed4ba 100644 --- a/lib/gssapi/krb5/inquire_cred_by_oid.c +++ b/lib/gssapi/krb5/inquire_cred_by_oid.c @@ -32,7 +32,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_inquire_cred_by_oid +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_cred_by_oid (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, const gss_OID desired_object, diff --git a/lib/gssapi/krb5/inquire_mechs_for_name.c b/lib/gssapi/krb5/inquire_mechs_for_name.c index 5fa3c302a..6197a81b4 100644 --- a/lib/gssapi/krb5/inquire_mechs_for_name.c +++ b/lib/gssapi/krb5/inquire_mechs_for_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_inquire_mechs_for_name ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_mechs_for_name ( OM_uint32 * minor_status, const gss_name_t input_name, gss_OID_set * mech_types diff --git a/lib/gssapi/krb5/inquire_names_for_mech.c b/lib/gssapi/krb5/inquire_names_for_mech.c index 105f91240..dc02b9985 100644 --- a/lib/gssapi/krb5/inquire_names_for_mech.c +++ b/lib/gssapi/krb5/inquire_names_for_mech.c @@ -41,7 +41,7 @@ static gss_OID name_list[] = { NULL }; -OM_uint32 _gsskrb5_inquire_names_for_mech ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_names_for_mech ( OM_uint32 * minor_status, const gss_OID mechanism, gss_OID_set * name_types diff --git a/lib/gssapi/krb5/inquire_sec_context_by_oid.c b/lib/gssapi/krb5/inquire_sec_context_by_oid.c index e0b555392..14816e7a0 100644 --- a/lib/gssapi/krb5/inquire_sec_context_by_oid.c +++ b/lib/gssapi/krb5/inquire_sec_context_by_oid.c @@ -487,7 +487,7 @@ out: * */ -OM_uint32 _gsskrb5_inquire_sec_context_by_oid +OM_uint32 GSSAPI_CALLCONV _gsskrb5_inquire_sec_context_by_oid (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_OID desired_object, diff --git a/lib/gssapi/krb5/prf.c b/lib/gssapi/krb5/prf.c index 737ccb683..323b4cc72 100644 --- a/lib/gssapi/krb5/prf.c +++ b/lib/gssapi/krb5/prf.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_pseudo_random(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int prf_key, diff --git a/lib/gssapi/krb5/process_context_token.c b/lib/gssapi/krb5/process_context_token.c index 1c9d44588..4feda0de0 100644 --- a/lib/gssapi/krb5/process_context_token.c +++ b/lib/gssapi/krb5/process_context_token.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_process_context_token ( +OM_uint32 GSSAPI_CALLCONV _gsskrb5_process_context_token ( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t token_buffer diff --git a/lib/gssapi/krb5/release_cred.c b/lib/gssapi/krb5/release_cred.c index 5eec3c48c..105a7a6eb 100644 --- a/lib/gssapi/krb5/release_cred.c +++ b/lib/gssapi/krb5/release_cred.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_release_cred +OM_uint32 GSSAPI_CALLCONV _gsskrb5_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle ) diff --git a/lib/gssapi/krb5/release_name.c b/lib/gssapi/krb5/release_name.c index 0fafc275d..57fc8a4e4 100644 --- a/lib/gssapi/krb5/release_name.c +++ b/lib/gssapi/krb5/release_name.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 _gsskrb5_release_name +OM_uint32 GSSAPI_CALLCONV _gsskrb5_release_name (OM_uint32 * minor_status, gss_name_t * input_name ) diff --git a/lib/gssapi/krb5/set_cred_option.c b/lib/gssapi/krb5/set_cred_option.c index 7c99f13fd..d6255bacb 100644 --- a/lib/gssapi/krb5/set_cred_option.c +++ b/lib/gssapi/krb5/set_cred_option.c @@ -225,7 +225,7 @@ no_ci_flags(OM_uint32 *minor_status, } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_set_cred_option (OM_uint32 *minor_status, gss_cred_id_t *cred_handle, diff --git a/lib/gssapi/krb5/set_sec_context_option.c b/lib/gssapi/krb5/set_sec_context_option.c index 096e83504..237af1a52 100644 --- a/lib/gssapi/krb5/set_sec_context_option.c +++ b/lib/gssapi/krb5/set_sec_context_option.c @@ -98,7 +98,7 @@ set_int32(OM_uint32 *minor_status, return GSS_S_COMPLETE; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_set_sec_context_option (OM_uint32 *minor_status, gss_ctx_id_t *context_handle, diff --git a/lib/gssapi/krb5/store_cred.c b/lib/gssapi/krb5/store_cred.c index 675a1d8e9..21f9f6e8a 100644 --- a/lib/gssapi/krb5/store_cred.c +++ b/lib/gssapi/krb5/store_cred.c @@ -33,7 +33,7 @@ #include "gsskrb5_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_store_cred(OM_uint32 *minor_status, gss_cred_id_t input_cred_handle, gss_cred_usage_t cred_usage, diff --git a/lib/gssapi/krb5/unwrap.c b/lib/gssapi/krb5/unwrap.c index 5e0042e28..7620d691b 100644 --- a/lib/gssapi/krb5/unwrap.c +++ b/lib/gssapi/krb5/unwrap.c @@ -379,7 +379,7 @@ unwrap_des3 return GSS_S_COMPLETE; } -OM_uint32 _gsskrb5_unwrap +OM_uint32 GSSAPI_CALLCONV _gsskrb5_unwrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t input_message_buffer, diff --git a/lib/gssapi/krb5/verify_mic.c b/lib/gssapi/krb5/verify_mic.c index 0b5b6e1cc..9a5445698 100644 --- a/lib/gssapi/krb5/verify_mic.c +++ b/lib/gssapi/krb5/verify_mic.c @@ -327,7 +327,7 @@ _gsskrb5_verify_mic_internal return ret; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_verify_mic (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, diff --git a/lib/gssapi/krb5/wrap.c b/lib/gssapi/krb5/wrap.c index 9078fb3dd..54f92df60 100644 --- a/lib/gssapi/krb5/wrap.c +++ b/lib/gssapi/krb5/wrap.c @@ -134,7 +134,7 @@ sub_wrap_size ( return GSS_S_COMPLETE; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gsskrb5_wrap_size_limit ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, @@ -524,7 +524,8 @@ wrap_des3 return GSS_S_COMPLETE; } -OM_uint32 _gsskrb5_wrap +OM_uint32 GSSAPI_CALLCONV +_gsskrb5_wrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, diff --git a/lib/gssapi/libgssapi-exports.def b/lib/gssapi/libgssapi-exports.def index 0ba34c861..11daffdd0 100644 --- a/lib/gssapi/libgssapi-exports.def +++ b/lib/gssapi/libgssapi-exports.def @@ -1,19 +1,18 @@ EXPORTS - GSS_KRB5_MECHANISM - GSS_NTLM_MECHANISM - GSS_SPNEGO_MECHANISM - GSS_SASL_DIGEST_MD5_MECHANISM - GSS_C_NT_ANONYMOUS - GSS_C_NT_EXPORT_NAME - GSS_C_NT_HOSTBASED_SERVICE - GSS_C_NT_HOSTBASED_SERVICE_X - GSS_C_NT_MACHINE_UID_NAME - GSS_C_NT_STRING_UID_NAME - GSS_C_NT_USER_NAME - GSS_KRB5_NT_PRINCIPAL_NAME - GSS_KRB5_NT_USER_NAME - GSS_KRB5_NT_MACHINE_UID_NAME - GSS_KRB5_NT_STRING_UID_NAME + __gss_krb5_mechanism_oid_desc + __gss_ntlm_mechanism_oid_desc + __gss_spnego_mechanism_oid_desc + __gss_sasl_digest_md5_mechanism_oid_desc + __gss_c_nt_anonymous_oid_desc + __gss_c_nt_export_name_oid_desc + __gss_c_nt_hostbased_service_oid_desc + __gss_c_nt_hostbased_service_x_oid_desc + __gss_c_nt_machine_uid_name_oid_desc + __gss_c_nt_string_uid_name_oid_desc + __gss_c_nt_user_name_oid_desc + __gss_krb5_cred_no_ci_flags_x_oid_desc + __gss_krb5_nt_principal_name_oid_desc + __gss_c_attr_stream_sizes_oid_desc gss_accept_sec_context gss_acquire_cred gss_add_buffer_set_member diff --git a/lib/gssapi/libgssapi-version.rc b/lib/gssapi/libgssapi-version.rc new file mode 100644 index 000000000..074066f06 --- /dev/null +++ b/lib/gssapi/libgssapi-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Generic Security Service Application Program Interface library" +#define RC_FILE_ORIG_0409 "gssapi.dll" + +#include "../../windows/version.rc" diff --git a/lib/gssapi/mech/gss_accept_sec_context.c b/lib/gssapi/mech/gss_accept_sec_context.c index 5775db837..19f3bc4bf 100644 --- a/lib/gssapi/mech/gss_accept_sec_context.c +++ b/lib/gssapi/mech/gss_accept_sec_context.c @@ -141,7 +141,8 @@ choose_mech(const gss_buffer_t input, gss_OID mech_oid) } -OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status, +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL +gss_accept_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, const gss_cred_id_t acceptor_cred_handle, const gss_buffer_t input_token, diff --git a/lib/gssapi/mech/gss_acquire_cred.c b/lib/gssapi/mech/gss_acquire_cred.c index 75a7978d8..416407a7b 100644 --- a/lib/gssapi/mech/gss_acquire_cred.c +++ b/lib/gssapi/mech/gss_acquire_cred.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_acquire_cred(OM_uint32 *minor_status, const gss_name_t desired_name, OM_uint32 time_req, diff --git a/lib/gssapi/mech/gss_add_cred.c b/lib/gssapi/mech/gss_add_cred.c index 08c788278..56fb8ec6a 100644 --- a/lib/gssapi/mech/gss_add_cred.c +++ b/lib/gssapi/mech/gss_add_cred.c @@ -70,7 +70,7 @@ _gss_copy_cred(struct _gss_mechanism_cred *mc) return (new_mc); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_cred(OM_uint32 *minor_status, const gss_cred_id_t input_cred_handle, const gss_name_t desired_name, diff --git a/lib/gssapi/mech/gss_add_oid_set_member.c b/lib/gssapi/mech/gss_add_oid_set_member.c index b86612529..191a4a305 100644 --- a/lib/gssapi/mech/gss_add_oid_set_member.c +++ b/lib/gssapi/mech/gss_add_oid_set_member.c @@ -51,7 +51,7 @@ * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member (OM_uint32 * minor_status, const gss_OID member_oid, gss_OID_set * oid_set) diff --git a/lib/gssapi/mech/gss_aeap.c b/lib/gssapi/mech/gss_aeap.c index 9d0c67177..e98ba970d 100644 --- a/lib/gssapi/mech/gss_aeap.c +++ b/lib/gssapi/mech/gss_aeap.c @@ -43,7 +43,7 @@ */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -81,7 +81,7 @@ gss_wrap_iov(OM_uint32 * minor_status, * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, @@ -124,7 +124,7 @@ gss_unwrap_iov(OM_uint32 *minor_status, * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov_length(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -162,7 +162,7 @@ gss_wrap_iov_length(OM_uint32 * minor_status, * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_iov_buffer(OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count) @@ -197,7 +197,7 @@ gss_release_iov_buffer(OM_uint32 *minor_status, gss_OID_desc GSSAPI_LIB_FUNCTION __gss_c_attr_stream_sizes_oid_desc = {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03")}; -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_query_attributes(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_OID attribute, diff --git a/lib/gssapi/mech/gss_buffer_set.c b/lib/gssapi/mech/gss_buffer_set.c index 58863c311..3099b163b 100644 --- a/lib/gssapi/mech/gss_buffer_set.c +++ b/lib/gssapi/mech/gss_buffer_set.c @@ -32,7 +32,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_buffer_set (OM_uint32 * minor_status, gss_buffer_set_t *buffer_set) @@ -54,7 +54,7 @@ gss_create_empty_buffer_set return GSS_S_COMPLETE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_buffer_set_member (OM_uint32 * minor_status, const gss_buffer_t member_buffer, @@ -96,7 +96,7 @@ gss_add_buffer_set_member return GSS_S_COMPLETE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer_set(OM_uint32 * minor_status, gss_buffer_set_t *buffer_set) { diff --git a/lib/gssapi/mech/gss_canonicalize_name.c b/lib/gssapi/mech/gss_canonicalize_name.c index 1bb94b346..fba35c537 100644 --- a/lib/gssapi/mech/gss_canonicalize_name.c +++ b/lib/gssapi/mech/gss_canonicalize_name.c @@ -52,7 +52,7 @@ * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name(OM_uint32 *minor_status, const gss_name_t input_name, const gss_OID mech_type, diff --git a/lib/gssapi/mech/gss_compare_name.c b/lib/gssapi/mech/gss_compare_name.c index 9481218de..14593f6de 100644 --- a/lib/gssapi/mech/gss_compare_name.c +++ b/lib/gssapi/mech/gss_compare_name.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_compare_name(OM_uint32 *minor_status, const gss_name_t name1_arg, const gss_name_t name2_arg, diff --git a/lib/gssapi/mech/gss_context_time.c b/lib/gssapi/mech/gss_context_time.c index d99f71f77..69434ee89 100644 --- a/lib/gssapi/mech/gss_context_time.c +++ b/lib/gssapi/mech/gss_context_time.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_context_time(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, OM_uint32 *time_rec) diff --git a/lib/gssapi/mech/gss_create_empty_oid_set.c b/lib/gssapi/mech/gss_create_empty_oid_set.c index 36337a543..8d880f551 100644 --- a/lib/gssapi/mech/gss_create_empty_oid_set.c +++ b/lib/gssapi/mech/gss_create_empty_oid_set.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_create_empty_oid_set(OM_uint32 *minor_status, gss_OID_set *oid_set) { diff --git a/lib/gssapi/mech/gss_cred.c b/lib/gssapi/mech/gss_cred.c index 66df50b55..b52015b6d 100644 --- a/lib/gssapi/mech/gss_cred.c +++ b/lib/gssapi/mech/gss_cred.c @@ -42,7 +42,7 @@ * cred-data char * (not alligned) */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_cred(OM_uint32 * minor_status, gss_cred_id_t cred_handle, gss_buffer_t token) @@ -107,7 +107,7 @@ gss_export_cred(OM_uint32 * minor_status, return GSS_S_COMPLETE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_cred(OM_uint32 * minor_status, gss_buffer_t token, gss_cred_id_t * cred_handle) diff --git a/lib/gssapi/mech/gss_decapsulate_token.c b/lib/gssapi/mech/gss_decapsulate_token.c index 95a6c6844..0fe3b4f5a 100644 --- a/lib/gssapi/mech/gss_decapsulate_token.c +++ b/lib/gssapi/mech/gss_decapsulate_token.c @@ -33,7 +33,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_decapsulate_token(const gss_buffer_t input_token, const gss_OID oid, gss_buffer_t output_token) diff --git a/lib/gssapi/mech/gss_delete_sec_context.c b/lib/gssapi/mech/gss_delete_sec_context.c index c2575927c..ce57a7668 100644 --- a/lib/gssapi/mech/gss_delete_sec_context.c +++ b/lib/gssapi/mech/gss_delete_sec_context.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_buffer_t output_token) diff --git a/lib/gssapi/mech/gss_display_name.c b/lib/gssapi/mech/gss_display_name.c index 0b7559224..599e79861 100644 --- a/lib/gssapi/mech/gss_display_name.c +++ b/lib/gssapi/mech/gss_display_name.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_name(OM_uint32 *minor_status, const gss_name_t input_name, gss_buffer_t output_name_buffer, diff --git a/lib/gssapi/mech/gss_display_status.c b/lib/gssapi/mech/gss_display_status.c index 89a05a870..d6aaf9882 100644 --- a/lib/gssapi/mech/gss_display_status.c +++ b/lib/gssapi/mech/gss_display_status.c @@ -135,7 +135,7 @@ supplementary_error(OM_uint32 v) } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_display_status(OM_uint32 *minor_status, OM_uint32 status_value, int status_type, diff --git a/lib/gssapi/mech/gss_duplicate_name.c b/lib/gssapi/mech/gss_duplicate_name.c index 87775878e..3d3a56802 100644 --- a/lib/gssapi/mech/gss_duplicate_name.c +++ b/lib/gssapi/mech/gss_duplicate_name.c @@ -28,7 +28,8 @@ #include "mech_locl.h" -OM_uint32 gss_duplicate_name(OM_uint32 *minor_status, +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL +gss_duplicate_name(OM_uint32 *minor_status, const gss_name_t src_name, gss_name_t *dest_name) { diff --git a/lib/gssapi/mech/gss_duplicate_oid.c b/lib/gssapi/mech/gss_duplicate_oid.c index 165b07e5a..10a200048 100644 --- a/lib/gssapi/mech/gss_duplicate_oid.c +++ b/lib/gssapi/mech/gss_duplicate_oid.c @@ -33,7 +33,8 @@ #include "mech_locl.h" -OM_uint32 gss_duplicate_oid ( +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL +gss_duplicate_oid ( OM_uint32 *minor_status, gss_OID src_oid, gss_OID *dest_oid diff --git a/lib/gssapi/mech/gss_encapsulate_token.c b/lib/gssapi/mech/gss_encapsulate_token.c index 7a3e16536..fc0ec736b 100644 --- a/lib/gssapi/mech/gss_encapsulate_token.c +++ b/lib/gssapi/mech/gss_encapsulate_token.c @@ -33,7 +33,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_encapsulate_token(const gss_buffer_t input_token, const gss_OID oid, gss_buffer_t output_token) diff --git a/lib/gssapi/mech/gss_export_name.c b/lib/gssapi/mech/gss_export_name.c index 7f7c1afe6..6bc5ee8d1 100644 --- a/lib/gssapi/mech/gss_export_name.c +++ b/lib/gssapi/mech/gss_export_name.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_name(OM_uint32 *minor_status, const gss_name_t input_name, gss_buffer_t exported_name) diff --git a/lib/gssapi/mech/gss_export_sec_context.c b/lib/gssapi/mech/gss_export_sec_context.c index 0fc19e2af..babc8ebdf 100644 --- a/lib/gssapi/mech/gss_export_sec_context.c +++ b/lib/gssapi/mech/gss_export_sec_context.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_export_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_buffer_t interprocess_token) diff --git a/lib/gssapi/mech/gss_get_mic.c b/lib/gssapi/mech/gss_get_mic.c index f4921b60d..6eebfe0bb 100644 --- a/lib/gssapi/mech/gss_get_mic.c +++ b/lib/gssapi/mech/gss_get_mic.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_get_mic(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, gss_qop_t qop_req, diff --git a/lib/gssapi/mech/gss_import_name.c b/lib/gssapi/mech/gss_import_name.c index 6ae2302ab..90dc0c1e9 100644 --- a/lib/gssapi/mech/gss_import_name.c +++ b/lib/gssapi/mech/gss_import_name.c @@ -163,7 +163,7 @@ _gss_import_export_name(OM_uint32 *minor_status, * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name(OM_uint32 *minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, diff --git a/lib/gssapi/mech/gss_import_sec_context.c b/lib/gssapi/mech/gss_import_sec_context.c index e08d3b7af..2a376fefe 100644 --- a/lib/gssapi/mech/gss_import_sec_context.c +++ b/lib/gssapi/mech/gss_import_sec_context.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_sec_context(OM_uint32 *minor_status, const gss_buffer_t interprocess_token, gss_ctx_id_t *context_handle) diff --git a/lib/gssapi/mech/gss_indicate_mechs.c b/lib/gssapi/mech/gss_indicate_mechs.c index ab95a18ee..8560bc7c4 100644 --- a/lib/gssapi/mech/gss_indicate_mechs.c +++ b/lib/gssapi/mech/gss_indicate_mechs.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_indicate_mechs(OM_uint32 *minor_status, gss_OID_set *mech_set) { diff --git a/lib/gssapi/mech/gss_init_sec_context.c b/lib/gssapi/mech/gss_init_sec_context.c index 9a4215d0c..5da035d15 100644 --- a/lib/gssapi/mech/gss_init_sec_context.c +++ b/lib/gssapi/mech/gss_init_sec_context.c @@ -105,7 +105,7 @@ _gss_mech_cred_find(gss_cred_id_t cred_handle, gss_OID mech_type) -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context(OM_uint32 * minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/mech/gss_inquire_context.c b/lib/gssapi/mech/gss_inquire_context.c index e000af00e..0658267b2 100644 --- a/lib/gssapi/mech/gss_inquire_context.c +++ b/lib/gssapi/mech/gss_inquire_context.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_context(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, gss_name_t *src_name, diff --git a/lib/gssapi/mech/gss_inquire_cred.c b/lib/gssapi/mech/gss_inquire_cred.c index e5faf5876..50d9c0b8d 100644 --- a/lib/gssapi/mech/gss_inquire_cred.c +++ b/lib/gssapi/mech/gss_inquire_cred.c @@ -42,7 +42,7 @@ updateusage(gss_cred_usage_t usage, int *usagemask) *usagemask |= IUSAGE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred(OM_uint32 *minor_status, const gss_cred_id_t cred_handle, gss_name_t *name_ret, diff --git a/lib/gssapi/mech/gss_inquire_cred_by_mech.c b/lib/gssapi/mech/gss_inquire_cred_by_mech.c index 39c5e711b..f71bd6993 100644 --- a/lib/gssapi/mech/gss_inquire_cred_by_mech.c +++ b/lib/gssapi/mech/gss_inquire_cred_by_mech.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_mech(OM_uint32 *minor_status, const gss_cred_id_t cred_handle, const gss_OID mech_type, diff --git a/lib/gssapi/mech/gss_inquire_cred_by_oid.c b/lib/gssapi/mech/gss_inquire_cred_by_oid.c index 3b821ce82..72d304803 100644 --- a/lib/gssapi/mech/gss_inquire_cred_by_oid.c +++ b/lib/gssapi/mech/gss_inquire_cred_by_oid.c @@ -32,7 +32,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_cred_by_oid (OM_uint32 *minor_status, const gss_cred_id_t cred_handle, const gss_OID desired_object, diff --git a/lib/gssapi/mech/gss_inquire_mechs_for_name.c b/lib/gssapi/mech/gss_inquire_mechs_for_name.c index f0e23e664..1ad7b58db 100644 --- a/lib/gssapi/mech/gss_inquire_mechs_for_name.c +++ b/lib/gssapi/mech/gss_inquire_mechs_for_name.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_mechs_for_name(OM_uint32 *minor_status, const gss_name_t input_name, gss_OID_set *mech_types) diff --git a/lib/gssapi/mech/gss_inquire_names_for_mech.c b/lib/gssapi/mech/gss_inquire_names_for_mech.c index c796f0522..595ab737f 100644 --- a/lib/gssapi/mech/gss_inquire_names_for_mech.c +++ b/lib/gssapi/mech/gss_inquire_names_for_mech.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_names_for_mech(OM_uint32 *minor_status, const gss_OID mechanism, gss_OID_set *name_types) diff --git a/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c b/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c index ffa0c44fa..cc6e5c9cb 100644 --- a/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c +++ b/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c @@ -32,7 +32,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_sec_context_by_oid (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_OID desired_object, diff --git a/lib/gssapi/mech/gss_krb5.c b/lib/gssapi/mech/gss_krb5.c index 6042d1ea7..f4290a2a5 100644 --- a/lib/gssapi/mech/gss_krb5.c +++ b/lib/gssapi/mech/gss_krb5.c @@ -32,7 +32,7 @@ #include -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_copy_ccache(OM_uint32 *minor_status, gss_cred_id_t cred, krb5_ccache out) @@ -90,7 +90,7 @@ gss_krb5_copy_ccache(OM_uint32 *minor_status, return ret; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_import_cred(OM_uint32 *minor_status, krb5_ccache id, krb5_principal keytab_principal, @@ -185,7 +185,7 @@ out: return major_status; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_register_acceptor_identity(const char *identity) { struct _gss_mech_switch *m; @@ -207,14 +207,14 @@ gsskrb5_register_acceptor_identity(const char *identity) return (GSS_S_COMPLETE); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL krb5_gss_register_acceptor_identity(const char *identity) { return gsskrb5_register_acceptor_identity(identity); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_dns_canonicalize(int flag) { struct _gss_mech_switch *m; @@ -259,7 +259,7 @@ free_key(gss_krb5_lucid_key_t *key) memset(key, 0, sizeof(*key)); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_export_lucid_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, OM_uint32 version, @@ -402,7 +402,7 @@ out: return GSS_S_COMPLETE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_free_lucid_sec_context(OM_uint32 *minor_status, void *c) { gss_krb5_lucid_context_v1_t *ctx = c; @@ -430,7 +430,7 @@ gss_krb5_free_lucid_sec_context(OM_uint32 *minor_status, void *c) * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_set_allowable_enctypes(OM_uint32 *minor_status, gss_cred_id_t cred, OM_uint32 num_enctypes, @@ -484,7 +484,7 @@ out: * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_send_to_kdc(struct gsskrb5_send_to_kdc *c) { struct _gss_mech_switch *m; @@ -515,7 +515,7 @@ gsskrb5_set_send_to_kdc(struct gsskrb5_send_to_kdc *c) * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_ccache_name(OM_uint32 *minor_status, const char *name, const char **out_name) @@ -547,7 +547,7 @@ gss_krb5_ccache_name(OM_uint32 *minor_status, * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_authtime_from_sec_context(OM_uint32 *minor_status, gss_ctx_id_t context_handle, time_t *authtime) @@ -602,7 +602,7 @@ gsskrb5_extract_authtime_from_sec_context(OM_uint32 *minor_status, * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_authz_data_from_sec_context(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int ad_type, @@ -775,7 +775,7 @@ out: * */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_extract_service_keyblock(OM_uint32 *minor_status, gss_ctx_id_t context_handle, krb5_keyblock **keyblock) @@ -786,7 +786,7 @@ gsskrb5_extract_service_keyblock(OM_uint32 *minor_status, keyblock); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_initiator_subkey(OM_uint32 *minor_status, gss_ctx_id_t context_handle, krb5_keyblock **keyblock) @@ -797,7 +797,7 @@ gsskrb5_get_initiator_subkey(OM_uint32 *minor_status, keyblock); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_subkey(OM_uint32 *minor_status, gss_ctx_id_t context_handle, krb5_keyblock **keyblock) @@ -808,7 +808,7 @@ gsskrb5_get_subkey(OM_uint32 *minor_status, keyblock); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_default_realm(const char *realm) { struct _gss_mech_switch *m; @@ -830,7 +830,7 @@ gsskrb5_set_default_realm(const char *realm) return (GSS_S_COMPLETE); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_krb5_get_tkt_flags(OM_uint32 *minor_status, gss_ctx_id_t context_handle, OM_uint32 *tkt_flags) @@ -869,7 +869,7 @@ gss_krb5_get_tkt_flags(OM_uint32 *minor_status, return GSS_S_COMPLETE; } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_set_time_offset(int offset) { struct _gss_mech_switch *m; @@ -892,7 +892,7 @@ gsskrb5_set_time_offset(int offset) return (GSS_S_COMPLETE); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_get_time_offset(int *offset) { struct _gss_mech_switch *m; @@ -920,7 +920,7 @@ gsskrb5_get_time_offset(int *offset) return (GSS_S_UNAVAILABLE); } -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gsskrb5_plugin_register(struct gsskrb5_krb5_plugin *c) { struct _gss_mech_switch *m; diff --git a/lib/gssapi/mech/gss_oid_equal.c b/lib/gssapi/mech/gss_oid_equal.c index b022ffe1a..3e6413508 100644 --- a/lib/gssapi/mech/gss_oid_equal.c +++ b/lib/gssapi/mech/gss_oid_equal.c @@ -47,7 +47,7 @@ * @ingroup gssapi */ -int GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL gss_oid_equal(const gss_OID a, const gss_OID b) { if (a == b && a != GSS_C_NO_OID) diff --git a/lib/gssapi/mech/gss_oid_to_str.c b/lib/gssapi/mech/gss_oid_to_str.c index 114e7d63e..d8e188da0 100644 --- a/lib/gssapi/mech/gss_oid_to_str.c +++ b/lib/gssapi/mech/gss_oid_to_str.c @@ -33,7 +33,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_oid_to_str(OM_uint32 *minor_status, gss_OID oid, gss_buffer_t oid_str) { int ret; diff --git a/lib/gssapi/mech/gss_process_context_token.c b/lib/gssapi/mech/gss_process_context_token.c index 738ff7d8e..e8e9b56cd 100644 --- a/lib/gssapi/mech/gss_process_context_token.c +++ b/lib/gssapi/mech/gss_process_context_token.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_process_context_token(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t token_buffer) diff --git a/lib/gssapi/mech/gss_pseudo_random.c b/lib/gssapi/mech/gss_pseudo_random.c index 96b40a6af..ce4f9a413 100644 --- a/lib/gssapi/mech/gss_pseudo_random.c +++ b/lib/gssapi/mech/gss_pseudo_random.c @@ -35,7 +35,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_pseudo_random(OM_uint32 *minor_status, gss_ctx_id_t context, int prf_key, diff --git a/lib/gssapi/mech/gss_release_buffer.c b/lib/gssapi/mech/gss_release_buffer.c index 9aad034ab..c3dd4575b 100644 --- a/lib/gssapi/mech/gss_release_buffer.c +++ b/lib/gssapi/mech/gss_release_buffer.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_buffer(OM_uint32 *minor_status, gss_buffer_t buffer) { diff --git a/lib/gssapi/mech/gss_release_cred.c b/lib/gssapi/mech/gss_release_cred.c index 463fddb2b..591ef49ab 100644 --- a/lib/gssapi/mech/gss_release_cred.c +++ b/lib/gssapi/mech/gss_release_cred.c @@ -50,7 +50,7 @@ * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) { struct _gss_cred *cred = (struct _gss_cred *) *cred_handle; diff --git a/lib/gssapi/mech/gss_release_name.c b/lib/gssapi/mech/gss_release_name.c index 47786725a..28fb75d96 100644 --- a/lib/gssapi/mech/gss_release_name.c +++ b/lib/gssapi/mech/gss_release_name.c @@ -43,7 +43,7 @@ * * @ingroup gssapi */ -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name) { diff --git a/lib/gssapi/mech/gss_release_oid.c b/lib/gssapi/mech/gss_release_oid.c index 458e94d71..610daf229 100644 --- a/lib/gssapi/mech/gss_release_oid.c +++ b/lib/gssapi/mech/gss_release_oid.c @@ -34,7 +34,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid(OM_uint32 *minor_status, gss_OID *oid) { gss_OID o = *oid; diff --git a/lib/gssapi/mech/gss_release_oid_set.c b/lib/gssapi/mech/gss_release_oid_set.c index f875d39d0..183ddf8c7 100644 --- a/lib/gssapi/mech/gss_release_oid_set.c +++ b/lib/gssapi/mech/gss_release_oid_set.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_oid_set(OM_uint32 *minor_status, gss_OID_set *set) { diff --git a/lib/gssapi/mech/gss_seal.c b/lib/gssapi/mech/gss_seal.c index 8c1e9eba1..26c65dafc 100644 --- a/lib/gssapi/mech/gss_seal.c +++ b/lib/gssapi/mech/gss_seal.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_seal(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, diff --git a/lib/gssapi/mech/gss_set_cred_option.c b/lib/gssapi/mech/gss_set_cred_option.c index 86a136159..adae7a622 100644 --- a/lib/gssapi/mech/gss_set_cred_option.c +++ b/lib/gssapi/mech/gss_set_cred_option.c @@ -32,7 +32,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_cred_option (OM_uint32 *minor_status, gss_cred_id_t *cred_handle, const gss_OID object, diff --git a/lib/gssapi/mech/gss_set_sec_context_option.c b/lib/gssapi/mech/gss_set_sec_context_option.c index ca0ec00ef..6efe1a0b1 100644 --- a/lib/gssapi/mech/gss_set_sec_context_option.c +++ b/lib/gssapi/mech/gss_set_sec_context_option.c @@ -32,7 +32,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_set_sec_context_option (OM_uint32 *minor_status, gss_ctx_id_t *context_handle, const gss_OID object, diff --git a/lib/gssapi/mech/gss_sign.c b/lib/gssapi/mech/gss_sign.c index 8a1b1e363..4ef99c198 100644 --- a/lib/gssapi/mech/gss_sign.c +++ b/lib/gssapi/mech/gss_sign.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_sign(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int qop_req, diff --git a/lib/gssapi/mech/gss_store_cred.c b/lib/gssapi/mech/gss_store_cred.c index dea3bf767..24da9a95d 100644 --- a/lib/gssapi/mech/gss_store_cred.c +++ b/lib/gssapi/mech/gss_store_cred.c @@ -33,7 +33,7 @@ #include "mech_locl.h" -OM_uint32 +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_store_cred(OM_uint32 *minor_status, gss_cred_id_t input_cred_handle, gss_cred_usage_t cred_usage, diff --git a/lib/gssapi/mech/gss_test_oid_set_member.c b/lib/gssapi/mech/gss_test_oid_set_member.c index 7995f4df0..4c4d34904 100644 --- a/lib/gssapi/mech/gss_test_oid_set_member.c +++ b/lib/gssapi/mech/gss_test_oid_set_member.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_test_oid_set_member(OM_uint32 *minor_status, const gss_OID member, const gss_OID_set set, diff --git a/lib/gssapi/mech/gss_unseal.c b/lib/gssapi/mech/gss_unseal.c index 881579057..0add03d4d 100644 --- a/lib/gssapi/mech/gss_unseal.c +++ b/lib/gssapi/mech/gss_unseal.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unseal(OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_buffer_t input_message_buffer, diff --git a/lib/gssapi/mech/gss_unwrap.c b/lib/gssapi/mech/gss_unwrap.c index 7285e4659..d0d18aca2 100644 --- a/lib/gssapi/mech/gss_unwrap.c +++ b/lib/gssapi/mech/gss_unwrap.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t input_message_buffer, diff --git a/lib/gssapi/mech/gss_verify.c b/lib/gssapi/mech/gss_verify.c index e60d6507b..dd53ddbae 100644 --- a/lib/gssapi/mech/gss_verify.c +++ b/lib/gssapi/mech/gss_verify.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify(OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_buffer_t message_buffer, diff --git a/lib/gssapi/mech/gss_verify_mic.c b/lib/gssapi/mech/gss_verify_mic.c index c535e3ffc..a791dc732 100644 --- a/lib/gssapi/mech/gss_verify_mic.c +++ b/lib/gssapi/mech/gss_verify_mic.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_verify_mic(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t message_buffer, diff --git a/lib/gssapi/mech/gss_wrap.c b/lib/gssapi/mech/gss_wrap.c index fb8a17bbe..dcbb4fcdf 100644 --- a/lib/gssapi/mech/gss_wrap.c +++ b/lib/gssapi/mech/gss_wrap.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, diff --git a/lib/gssapi/mech/gss_wrap_size_limit.c b/lib/gssapi/mech/gss_wrap_size_limit.c index 49af36466..e79814aea 100644 --- a/lib/gssapi/mech/gss_wrap_size_limit.c +++ b/lib/gssapi/mech/gss_wrap_size_limit.c @@ -28,7 +28,7 @@ #include "mech_locl.h" -OM_uint32 GSSAPI_LIB_FUNCTION +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_size_limit(OM_uint32 *minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, diff --git a/lib/gssapi/ntlm/accept_sec_context.c b/lib/gssapi/ntlm/accept_sec_context.c index 93abe317e..f65ed7606 100644 --- a/lib/gssapi/ntlm/accept_sec_context.c +++ b/lib/gssapi/ntlm/accept_sec_context.c @@ -64,7 +64,7 @@ _gss_ntlm_allocate_ctx(OM_uint32 *minor_status, ntlm_ctx *ctx) * */ -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_accept_sec_context (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/ntlm/acquire_cred.c b/lib/gssapi/ntlm/acquire_cred.c index 3b4ed01eb..37e2c68a1 100644 --- a/lib/gssapi/ntlm/acquire_cred.c +++ b/lib/gssapi/ntlm/acquire_cred.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_acquire_cred +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_acquire_cred (OM_uint32 * min_stat, const gss_name_t desired_name, OM_uint32 time_req, diff --git a/lib/gssapi/ntlm/add_cred.c b/lib/gssapi/ntlm/add_cred.c index 4bb7f2c1f..7c6b5ba25 100644 --- a/lib/gssapi/ntlm/add_cred.c +++ b/lib/gssapi/ntlm/add_cred.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_add_cred ( +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_add_cred ( OM_uint32 *minor_status, const gss_cred_id_t input_cred_handle, const gss_name_t desired_name, diff --git a/lib/gssapi/ntlm/canonicalize_name.c b/lib/gssapi/ntlm/canonicalize_name.c index d70018f44..0ea64299d 100644 --- a/lib/gssapi/ntlm/canonicalize_name.c +++ b/lib/gssapi/ntlm/canonicalize_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_canonicalize_name ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_canonicalize_name ( OM_uint32 * minor_status, const gss_name_t input_name, const gss_OID mech_type, diff --git a/lib/gssapi/ntlm/compare_name.c b/lib/gssapi/ntlm/compare_name.c index f987c8ddd..6e095bdee 100644 --- a/lib/gssapi/ntlm/compare_name.c +++ b/lib/gssapi/ntlm/compare_name.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_compare_name +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_compare_name (OM_uint32 * minor_status, const gss_name_t name1, const gss_name_t name2, diff --git a/lib/gssapi/ntlm/context_time.c b/lib/gssapi/ntlm/context_time.c index a877c4426..73debda48 100644 --- a/lib/gssapi/ntlm/context_time.c +++ b/lib/gssapi/ntlm/context_time.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_context_time +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_context_time (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, OM_uint32 * time_rec diff --git a/lib/gssapi/ntlm/crypto.c b/lib/gssapi/ntlm/crypto.c index 0e43f8858..a7b487fb9 100644 --- a/lib/gssapi/ntlm/crypto.c +++ b/lib/gssapi/ntlm/crypto.c @@ -260,7 +260,8 @@ v2_unseal_message(gss_buffer_t in, * */ -OM_uint32 _gss_ntlm_get_mic +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_get_mic (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_qop_t qop_req, @@ -334,7 +335,7 @@ OM_uint32 _gss_ntlm_get_mic * */ -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_verify_mic (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, @@ -420,7 +421,7 @@ _gss_ntlm_verify_mic * */ -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_wrap_size_limit ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, @@ -451,7 +452,8 @@ _gss_ntlm_wrap_size_limit ( * */ -OM_uint32 _gss_ntlm_wrap +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_wrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, @@ -521,7 +523,8 @@ OM_uint32 _gss_ntlm_wrap * */ -OM_uint32 _gss_ntlm_unwrap +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_unwrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t input_message_buffer, diff --git a/lib/gssapi/ntlm/delete_sec_context.c b/lib/gssapi/ntlm/delete_sec_context.c index ee5c2fc7f..41c30b76f 100644 --- a/lib/gssapi/ntlm/delete_sec_context.c +++ b/lib/gssapi/ntlm/delete_sec_context.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_delete_sec_context +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_delete_sec_context (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, gss_buffer_t output_token diff --git a/lib/gssapi/ntlm/display_name.c b/lib/gssapi/ntlm/display_name.c index 0b242f7f5..ef2337d7d 100644 --- a/lib/gssapi/ntlm/display_name.c +++ b/lib/gssapi/ntlm/display_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_display_name +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_display_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t output_name_buffer, diff --git a/lib/gssapi/ntlm/display_status.c b/lib/gssapi/ntlm/display_status.c index f0b6ae6ee..c9e1792d3 100644 --- a/lib/gssapi/ntlm/display_status.c +++ b/lib/gssapi/ntlm/display_status.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_display_status +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_display_status (OM_uint32 *minor_status, OM_uint32 status_value, int status_type, diff --git a/lib/gssapi/ntlm/duplicate_name.c b/lib/gssapi/ntlm/duplicate_name.c index 6b40837b9..4ef574fb5 100644 --- a/lib/gssapi/ntlm/duplicate_name.c +++ b/lib/gssapi/ntlm/duplicate_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_duplicate_name ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_duplicate_name ( OM_uint32 * minor_status, const gss_name_t src_name, gss_name_t * dest_name diff --git a/lib/gssapi/ntlm/export_name.c b/lib/gssapi/ntlm/export_name.c index e8f9aba61..8fe69aaaf 100644 --- a/lib/gssapi/ntlm/export_name.c +++ b/lib/gssapi/ntlm/export_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_export_name +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_export_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t exported_name diff --git a/lib/gssapi/ntlm/export_sec_context.c b/lib/gssapi/ntlm/export_sec_context.c index 66ee09999..027a9210e 100644 --- a/lib/gssapi/ntlm/export_sec_context.c +++ b/lib/gssapi/ntlm/export_sec_context.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_export_sec_context ( OM_uint32 * minor_status, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/ntlm/import_name.c b/lib/gssapi/ntlm/import_name.c index cec60f1d1..befd89d51 100644 --- a/lib/gssapi/ntlm/import_name.c +++ b/lib/gssapi/ntlm/import_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_import_name +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_import_name (OM_uint32 * minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, diff --git a/lib/gssapi/ntlm/import_sec_context.c b/lib/gssapi/ntlm/import_sec_context.c index adf563571..fe637c077 100644 --- a/lib/gssapi/ntlm/import_sec_context.c +++ b/lib/gssapi/ntlm/import_sec_context.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_import_sec_context ( OM_uint32 * minor_status, const gss_buffer_t interprocess_token, diff --git a/lib/gssapi/ntlm/init_sec_context.c b/lib/gssapi/ntlm/init_sec_context.c index 4ede05ed2..2bff45e49 100644 --- a/lib/gssapi/ntlm/init_sec_context.c +++ b/lib/gssapi/ntlm/init_sec_context.c @@ -213,7 +213,7 @@ _gss_copy_cred(ntlm_cred from, ntlm_cred *to) return 0; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_init_sec_context (OM_uint32 * minor_status, const gss_cred_id_t initiator_cred_handle, diff --git a/lib/gssapi/ntlm/inquire_context.c b/lib/gssapi/ntlm/inquire_context.c index 23c834f20..fd0cb8799 100644 --- a/lib/gssapi/ntlm/inquire_context.c +++ b/lib/gssapi/ntlm/inquire_context.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_inquire_context ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_inquire_context ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_name_t * src_name, diff --git a/lib/gssapi/ntlm/inquire_cred.c b/lib/gssapi/ntlm/inquire_cred.c index f37b453bb..5465590ec 100644 --- a/lib/gssapi/ntlm/inquire_cred.c +++ b/lib/gssapi/ntlm/inquire_cred.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_inquire_cred +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_inquire_cred (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, gss_name_t * name, diff --git a/lib/gssapi/ntlm/inquire_cred_by_mech.c b/lib/gssapi/ntlm/inquire_cred_by_mech.c index 34f6494ea..b5976b99d 100644 --- a/lib/gssapi/ntlm/inquire_cred_by_mech.c +++ b/lib/gssapi/ntlm/inquire_cred_by_mech.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_inquire_cred_by_mech ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_inquire_cred_by_mech ( OM_uint32 * minor_status, const gss_cred_id_t cred_handle, const gss_OID mech_type, diff --git a/lib/gssapi/ntlm/inquire_mechs_for_name.c b/lib/gssapi/ntlm/inquire_mechs_for_name.c index 09e764cd0..4fd538094 100644 --- a/lib/gssapi/ntlm/inquire_mechs_for_name.c +++ b/lib/gssapi/ntlm/inquire_mechs_for_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_inquire_mechs_for_name ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_inquire_mechs_for_name ( OM_uint32 * minor_status, const gss_name_t input_name, gss_OID_set * mech_types diff --git a/lib/gssapi/ntlm/inquire_names_for_mech.c b/lib/gssapi/ntlm/inquire_names_for_mech.c index adac960a6..7f49b33ca 100644 --- a/lib/gssapi/ntlm/inquire_names_for_mech.c +++ b/lib/gssapi/ntlm/inquire_names_for_mech.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_inquire_names_for_mech ( +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_inquire_names_for_mech ( OM_uint32 * minor_status, const gss_OID mechanism, gss_OID_set * name_types diff --git a/lib/gssapi/ntlm/process_context_token.c b/lib/gssapi/ntlm/process_context_token.c index a0d7c8999..16efcd152 100644 --- a/lib/gssapi/ntlm/process_context_token.c +++ b/lib/gssapi/ntlm/process_context_token.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_process_context_token ( +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_process_context_token ( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t token_buffer diff --git a/lib/gssapi/ntlm/release_cred.c b/lib/gssapi/ntlm/release_cred.c index 1350f21c0..49d88a2b2 100644 --- a/lib/gssapi/ntlm/release_cred.c +++ b/lib/gssapi/ntlm/release_cred.c @@ -33,7 +33,7 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_release_cred +OM_uint32 GSSAPI_CALLCONV _gss_ntlm_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle ) diff --git a/lib/gssapi/ntlm/release_name.c b/lib/gssapi/ntlm/release_name.c index 41045c0c2..86c1da364 100644 --- a/lib/gssapi/ntlm/release_name.c +++ b/lib/gssapi/ntlm/release_name.c @@ -33,7 +33,8 @@ #include "ntlm.h" -OM_uint32 _gss_ntlm_release_name +OM_uint32 GSSAPI_CALLCONV +_gss_ntlm_release_name (OM_uint32 * minor_status, gss_name_t * input_name ) diff --git a/lib/gssapi/spnego/accept_sec_context.c b/lib/gssapi/spnego/accept_sec_context.c index 7c9d4c517..35bc56fbb 100644 --- a/lib/gssapi/spnego/accept_sec_context.c +++ b/lib/gssapi/spnego/accept_sec_context.c @@ -472,7 +472,7 @@ acceptor_complete(OM_uint32 * minor_status, } -static OM_uint32 +static OM_uint32 GSSAPI_CALLCONV acceptor_start (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, @@ -689,7 +689,7 @@ out: } -static OM_uint32 +static OM_uint32 GSSAPI_CALLCONV acceptor_continue (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, @@ -876,7 +876,7 @@ acceptor_continue return ret; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_accept_sec_context (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, diff --git a/lib/gssapi/spnego/compat.c b/lib/gssapi/spnego/compat.c index 673a5df66..b23658cfd 100644 --- a/lib/gssapi/spnego/compat.c +++ b/lib/gssapi/spnego/compat.c @@ -49,8 +49,9 @@ gss_OID_desc _gss_spnego_krb5_mechanism_oid_desc = /* * Allocate a SPNEGO context handle */ -OM_uint32 _gss_spnego_alloc_sec_context (OM_uint32 * minor_status, - gss_ctx_id_t *context_handle) +OM_uint32 GSSAPI_CALLCONV +_gss_spnego_alloc_sec_context (OM_uint32 * minor_status, + gss_ctx_id_t *context_handle) { gssspnego_ctx ctx; @@ -91,7 +92,7 @@ OM_uint32 _gss_spnego_alloc_sec_context (OM_uint32 * minor_status, * Free a SPNEGO context handle. The caller must have acquired * the lock before this is called. */ -OM_uint32 _gss_spnego_internal_delete_sec_context +OM_uint32 GSSAPI_CALLCONV _gss_spnego_internal_delete_sec_context (OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_buffer_t output_token @@ -150,7 +151,7 @@ OM_uint32 _gss_spnego_internal_delete_sec_context * a non-preferred mechanism was negotiated */ -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_require_mechlist_mic(OM_uint32 *minor_status, gssspnego_ctx ctx, int *require_mic) @@ -228,7 +229,7 @@ add_mech_type(gss_OID mech_type, } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_indicate_mechtypelist (OM_uint32 *minor_status, gss_name_t target_name, OM_uint32 (*func)(gss_name_t, gss_OID), diff --git a/lib/gssapi/spnego/context_stubs.c b/lib/gssapi/spnego/context_stubs.c index 98ab91945..18c13fe29 100644 --- a/lib/gssapi/spnego/context_stubs.c +++ b/lib/gssapi/spnego/context_stubs.c @@ -66,7 +66,7 @@ spnego_supported_mechs(OM_uint32 *minor_status, gss_OID_set *mechs) -OM_uint32 _gss_spnego_process_context_token +OM_uint32 GSSAPI_CALLCONV _gss_spnego_process_context_token (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t token_buffer @@ -99,7 +99,7 @@ OM_uint32 _gss_spnego_process_context_token GSS_C_NO_BUFFER); } -OM_uint32 _gss_spnego_delete_sec_context +OM_uint32 GSSAPI_CALLCONV _gss_spnego_delete_sec_context (OM_uint32 *minor_status, gss_ctx_id_t *context_handle, gss_buffer_t output_token @@ -119,7 +119,7 @@ OM_uint32 _gss_spnego_delete_sec_context output_token); } -OM_uint32 _gss_spnego_context_time +OM_uint32 GSSAPI_CALLCONV _gss_spnego_context_time (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, OM_uint32 *time_rec @@ -143,7 +143,7 @@ OM_uint32 _gss_spnego_context_time time_rec); } -OM_uint32 _gss_spnego_get_mic +OM_uint32 GSSAPI_CALLCONV _gss_spnego_get_mic (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, gss_qop_t qop_req, @@ -169,7 +169,7 @@ OM_uint32 _gss_spnego_get_mic qop_req, message_buffer, message_token); } -OM_uint32 _gss_spnego_verify_mic +OM_uint32 GSSAPI_CALLCONV _gss_spnego_verify_mic (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t message_buffer, @@ -198,7 +198,7 @@ OM_uint32 _gss_spnego_verify_mic qop_state); } -OM_uint32 _gss_spnego_wrap +OM_uint32 GSSAPI_CALLCONV _gss_spnego_wrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, @@ -231,7 +231,7 @@ OM_uint32 _gss_spnego_wrap output_message_buffer); } -OM_uint32 _gss_spnego_unwrap +OM_uint32 GSSAPI_CALLCONV _gss_spnego_unwrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t input_message_buffer, @@ -262,7 +262,7 @@ OM_uint32 _gss_spnego_unwrap qop_state); } -OM_uint32 _gss_spnego_compare_name +OM_uint32 GSSAPI_CALLCONV _gss_spnego_compare_name (OM_uint32 *minor_status, const gss_name_t name1, const gss_name_t name2, @@ -286,7 +286,7 @@ OM_uint32 _gss_spnego_compare_name return GSS_S_COMPLETE; } -OM_uint32 _gss_spnego_display_name +OM_uint32 GSSAPI_CALLCONV _gss_spnego_display_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t output_name_buffer, @@ -304,7 +304,7 @@ OM_uint32 _gss_spnego_display_name output_name_buffer, output_name_type); } -OM_uint32 _gss_spnego_import_name +OM_uint32 GSSAPI_CALLCONV _gss_spnego_import_name (OM_uint32 * minor_status, const gss_buffer_t name_buffer, const gss_OID name_type, @@ -340,7 +340,7 @@ OM_uint32 _gss_spnego_import_name return GSS_S_COMPLETE; } -OM_uint32 _gss_spnego_export_name +OM_uint32 GSSAPI_CALLCONV _gss_spnego_export_name (OM_uint32 * minor_status, const gss_name_t input_name, gss_buffer_t exported_name @@ -359,7 +359,7 @@ OM_uint32 _gss_spnego_export_name return gss_export_name(minor_status, name->mech, exported_name); } -OM_uint32 _gss_spnego_release_name +OM_uint32 GSSAPI_CALLCONV _gss_spnego_release_name (OM_uint32 * minor_status, gss_name_t * input_name ) @@ -380,7 +380,7 @@ OM_uint32 _gss_spnego_release_name return GSS_S_COMPLETE; } -OM_uint32 _gss_spnego_inquire_context ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_context ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_name_t * src_name, @@ -447,7 +447,7 @@ enomem: return GSS_S_FAILURE; } -OM_uint32 _gss_spnego_wrap_size_limit ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_wrap_size_limit ( OM_uint32 * minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, @@ -478,7 +478,7 @@ OM_uint32 _gss_spnego_wrap_size_limit ( max_input_size); } -OM_uint32 _gss_spnego_export_sec_context ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_export_sec_context ( OM_uint32 * minor_status, gss_ctx_id_t * context_handle, gss_buffer_t interprocess_token @@ -521,7 +521,7 @@ OM_uint32 _gss_spnego_export_sec_context ( return ret; } -OM_uint32 _gss_spnego_import_sec_context ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_import_sec_context ( OM_uint32 * minor_status, const gss_buffer_t interprocess_token, gss_ctx_id_t *context_handle @@ -557,7 +557,7 @@ OM_uint32 _gss_spnego_import_sec_context ( return GSS_S_COMPLETE; } -OM_uint32 _gss_spnego_inquire_names_for_mech ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_names_for_mech ( OM_uint32 * minor_status, const gss_OID mechanism, gss_OID_set * name_types @@ -600,7 +600,7 @@ out: return ret; } -OM_uint32 _gss_spnego_inquire_mechs_for_name ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_mechs_for_name ( OM_uint32 * minor_status, const gss_name_t input_name, gss_OID_set * mech_types @@ -621,7 +621,7 @@ OM_uint32 _gss_spnego_inquire_mechs_for_name ( return ret; } -OM_uint32 _gss_spnego_canonicalize_name ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_canonicalize_name ( OM_uint32 * minor_status, const gss_name_t input_name, const gss_OID mech_type, @@ -632,7 +632,7 @@ OM_uint32 _gss_spnego_canonicalize_name ( return gss_duplicate_name(minor_status, input_name, output_name); } -OM_uint32 _gss_spnego_duplicate_name ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_duplicate_name ( OM_uint32 * minor_status, const gss_name_t src_name, gss_name_t * dest_name @@ -641,7 +641,7 @@ OM_uint32 _gss_spnego_duplicate_name ( return gss_duplicate_name(minor_status, src_name, dest_name); } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_wrap_iov(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -662,7 +662,7 @@ _gss_spnego_wrap_iov(OM_uint32 * minor_status, iov, iov_count); } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_unwrap_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, @@ -683,7 +683,7 @@ _gss_spnego_unwrap_iov(OM_uint32 *minor_status, iov, iov_count); } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_wrap_iov_length(OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, @@ -705,7 +705,7 @@ _gss_spnego_wrap_iov_length(OM_uint32 * minor_status, } #if 0 -OM_uint32 _gss_spnego_complete_auth_token +OM_uint32 GSSAPI_CALLCONV _gss_spnego_complete_auth_token (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, gss_buffer_t input_message_buffer) @@ -730,7 +730,7 @@ OM_uint32 _gss_spnego_complete_auth_token } #endif -OM_uint32 _gss_spnego_inquire_sec_context_by_oid +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_sec_context_by_oid (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, const gss_OID desired_object, @@ -756,7 +756,7 @@ OM_uint32 _gss_spnego_inquire_sec_context_by_oid data_set); } -OM_uint32 _gss_spnego_set_sec_context_option +OM_uint32 GSSAPI_CALLCONV _gss_spnego_set_sec_context_option (OM_uint32 * minor_status, gss_ctx_id_t * context_handle, const gss_OID desired_object, @@ -783,7 +783,7 @@ OM_uint32 _gss_spnego_set_sec_context_option } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_pseudo_random(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int prf_key, diff --git a/lib/gssapi/spnego/cred_stubs.c b/lib/gssapi/spnego/cred_stubs.c index f15069362..2920f3d9b 100644 --- a/lib/gssapi/spnego/cred_stubs.c +++ b/lib/gssapi/spnego/cred_stubs.c @@ -32,7 +32,7 @@ #include "spnego_locl.h" -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) { OM_uint32 ret; @@ -54,7 +54,7 @@ _gss_spnego_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) * we support gss_{get,set}_neg_mechs() we will need to expose * more functionality. */ -OM_uint32 _gss_spnego_acquire_cred +OM_uint32 GSSAPI_CALLCONV _gss_spnego_acquire_cred (OM_uint32 *minor_status, const gss_name_t desired_name, OM_uint32 time_req, @@ -127,7 +127,7 @@ out: return ret; } -OM_uint32 _gss_spnego_inquire_cred +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_cred (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, gss_name_t * name, @@ -169,7 +169,7 @@ OM_uint32 _gss_spnego_inquire_cred return ret; } -OM_uint32 _gss_spnego_inquire_cred_by_mech ( +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_cred_by_mech ( OM_uint32 * minor_status, const gss_cred_id_t cred_handle, const gss_OID mech_type, @@ -214,7 +214,7 @@ OM_uint32 _gss_spnego_inquire_cred_by_mech ( return GSS_S_COMPLETE; } -OM_uint32 _gss_spnego_inquire_cred_by_oid +OM_uint32 GSSAPI_CALLCONV _gss_spnego_inquire_cred_by_oid (OM_uint32 * minor_status, const gss_cred_id_t cred_handle, const gss_OID desired_object, @@ -235,7 +235,7 @@ OM_uint32 _gss_spnego_inquire_cred_by_oid return ret; } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_set_cred_option (OM_uint32 *minor_status, gss_cred_id_t *cred_handle, const gss_OID object, @@ -253,7 +253,7 @@ _gss_spnego_set_cred_option (OM_uint32 *minor_status, } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_export_cred (OM_uint32 *minor_status, gss_cred_id_t cred_handle, gss_buffer_t value) @@ -261,7 +261,7 @@ _gss_spnego_export_cred (OM_uint32 *minor_status, return gss_export_cred(minor_status, cred_handle, value); } -OM_uint32 +OM_uint32 GSSAPI_CALLCONV _gss_spnego_import_cred (OM_uint32 *minor_status, gss_buffer_t value, gss_cred_id_t *cred_handle) diff --git a/lib/gssapi/spnego/init_sec_context.c b/lib/gssapi/spnego/init_sec_context.c index 75a925497..c9e182129 100644 --- a/lib/gssapi/spnego/init_sec_context.c +++ b/lib/gssapi/spnego/init_sec_context.c @@ -609,7 +609,8 @@ spnego_reply return ret; } -OM_uint32 _gss_spnego_init_sec_context +OM_uint32 GSSAPI_CALLCONV +_gss_spnego_init_sec_context (OM_uint32 * minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t * context_handle, diff --git a/lib/hcrypto/NTMakefile b/lib/hcrypto/NTMakefile index 6f6b8c10b..1b2c166a1 100644 --- a/lib/hcrypto/NTMakefile +++ b/lib/hcrypto/NTMakefile @@ -33,7 +33,7 @@ SUBDIRS=libtommath RELDIR=lib\hcrypto -AUXCFLAGS=$(AUXCFLAGS) -DKRB5 -I$(HCRYPTOINCLUDEDIR) +intcflags=-DKRB5 -DASN1_LIB -I$(HCRYPTOINCLUDEDIR) -DUSE_HCRYPTO_IMATH=1 !include ../../windows/NTMakefile.w32 @@ -96,6 +96,7 @@ libhcrypto_OBJs = \ $(OBJ)\bn.obj \ $(OBJ)\camellia.obj \ $(OBJ)\camellia-ntt.obj \ + $(OBJ)\common.obj \ $(OBJ)\des.obj \ $(OBJ)\dh.obj \ $(OBJ)\dh-imath.obj \ @@ -124,23 +125,11 @@ libhcrypto_OBJs = \ $(OBJ)\sha256.obj \ $(OBJ)\ui.obj -!ifndef STATICLIBS - -$(LIBHCRYPTO): $(BINDIR)\libhcrypto.dll - -$(BINDIR)\libhcrypto.dll: $(libhcrypto_OBJs) $(LIBROKEN) $(LIBASN1) $(LIBTFM) - $(DLLGUILINK) -def:libhcrypto-exports.def -implib:$(LIBHCRYPTO) - $(DLLPREP) - -!else - $(LIBHCRYPTO): $(libhcrypto_OBJs) $(LIBCON) -!endif - -{imath/}.c{$(OBJ)}.obj: - $(C2OBJ) +{imath/}.c{$(OBJ)}.obj:: + $(C2OBJ_P) all:: $(LIBHCRYPTO) @@ -177,80 +166,75 @@ test-binaries: \ $(OBJ)\destest.exe: $(OBJ)\destest.obj $(TESTLIB) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) - -$(OBJ)\mdtest.exe: $(OBJ)\mdtest.obj $(LIBHCRYPTO) $(LIBROKEN) +$(OBJ)\example_evp_cipher.exe: $(OBJ)\example_evp_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\rc2test.exe: $(OBJ)\rc2test.obj $(LIBHCRYPTO) $(LIBROKEN) +$(OBJ)\mdtest.exe: $(OBJ)\mdtest.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\rctest.exe: $(OBJ)\rctest.obj $(LIBHCRYPTO) $(LIBROKEN) +$(OBJ)\rc2test.exe: $(OBJ)\rc2test.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_bn.exe: $(OBJ)\test_bn.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBASN1) +$(OBJ)\rctest.exe: $(OBJ)\rctest.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_cipher.exe: $(OBJ)\test_cipher.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBVERS) +$(OBJ)\test_bn.exe: $(OBJ)\test_bn.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_engine_dso.exe: $(OBJ)\test_engine_dso.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBASN1) $(LIBVERS) +$(OBJ)\test_cipher.exe: $(OBJ)\test_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_hmac.exe: $(OBJ)\test_hmac.obj $(LIBHCRYPTO) +$(OBJ)\test_engine_dso.exe: $(OBJ)\test_engine_dso.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) + +$(OBJ)\test_hmac.exe: $(OBJ)\test_hmac.obj $(LIBHEIMDAL) + $(EXECONLINK) + $(EXEPREP_NODIST) $(OBJ)\test_imath.exe: $(OBJ)\test_imath.obj $(TESTLIB) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_pkcs5.exe: $(OBJ)\test_pkcs5.obj $(LIBHCRYPTO) $(LIBROKEN) +$(OBJ)\test_pkcs5.exe: $(OBJ)\test_pkcs5.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_pkcs12.exe: $(OBJ)\test_pkcs12.obj $(LIBHCRYPTO) $(LIBASN1) $(LIBROKEN) +$(OBJ)\test_pkcs12.exe: $(OBJ)\test_pkcs12.obj $(LIBHEIMDAL) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_rsa.exe: $(OBJ)\test_rsa.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBASN1) $(LIBVERS) +$(OBJ)\test_rsa.exe: $(OBJ)\test_rsa.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_dh.exe: $(OBJ)\test_dh.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBASN1) $(LIBVERS) +$(OBJ)\test_dh.exe: $(OBJ)\test_dh.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) -$(OBJ)\test_rand.exe: $(OBJ)\test_rand.obj $(LIBHCRYPTO) $(LIBROKEN) $(LIBASN1) $(LIBVERS) +$(OBJ)\test_rand.exe: $(OBJ)\test_rand.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) + +SRCDIR1=$(SRCDIR:\=/) +SRCDIR2=$(SRCDIR1::=) $(OBJ)\test_crypto.sh: test_crypto.in NTMakefile - $(SED) -e "s,[@]srcdir[@],$(SRCDIR),g" -e "s,[@]exeext[@],.exe,g" < test_crypto.in > $@ + $(SED) -e "s,[@]srcdir[@],/$(SRCDIR2),g" -e "s,[@]exeext[@],.exe,g" < test_crypto.in > $@ || $(RM) $@ test-run: cd $(OBJ) +!ifdef SH + $(SH) test_crypto.sh +!endif destest.exe mdtest.exe rc2test.exe @@ -262,12 +246,13 @@ test-run: test_imath.exe test_pkcs5.exe test_pkcs12.exe -# test_rsa.exe -# test_dh.exe -!ifdef SH - $(SH) test_crypto.sh -!endif + test_rsa.exe + test_dh.exe cd $(SRCDIR) test:: $(TESTLIB) test-binaries test-run +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhcrypto-exports.def + +test:: test-exports diff --git a/lib/hcrypto/camellia.h b/lib/hcrypto/camellia.h index feabae1aa..6661f3bf0 100644 --- a/lib/hcrypto/camellia.h +++ b/lib/hcrypto/camellia.h @@ -66,7 +66,7 @@ void CAMELLIA_decrypt(const unsigned char *, unsigned char *, const CAMELLIA_KEY *); void CAMELLIA_cbc_encrypt(const unsigned char *, unsigned char *, - const unsigned long, const CAMELLIA_KEY *, + unsigned long, const CAMELLIA_KEY *, unsigned char *, int); #endif /* HEIM_CAMELLIA_H */ diff --git a/lib/hcrypto/common.c b/lib/hcrypto/common.c index 70a68356a..136bf1db1 100644 --- a/lib/hcrypto/common.c +++ b/lib/hcrypto/common.c @@ -35,7 +35,7 @@ #include -#include +#include #include #include diff --git a/lib/hcrypto/imath/imath.c b/lib/hcrypto/imath/imath.c index 4e47a76ce..0079bafd0 100644 --- a/lib/hcrypto/imath/imath.c +++ b/lib/hcrypto/imath/imath.c @@ -3016,7 +3016,7 @@ STATIC mp_result s_embar(mp_int a, mp_int b, mp_int m, mp_int mu, mp_int c) { mp_digit *db, *dbt, umu, d; mpz_t temp[3]; - mp_result res; + mp_result res = 0; int last = 0; umu = MP_USED(mu); db = MP_DIGITS(b); dbt = db + MP_USED(b) - 1; diff --git a/lib/hcrypto/libhcrypto-exports.def b/lib/hcrypto/libhcrypto-exports.def index 3b596abaa..2c80ee1b0 100644 --- a/lib/hcrypto/libhcrypto-exports.def +++ b/lib/hcrypto/libhcrypto-exports.def @@ -44,7 +44,7 @@ EXPORTS hc_DES_init_random_number_generator hc_DES_is_weak_key hc_DES_key_sched -; hc_DES_mem_rand8 +;! hc_DES_mem_rand8 hc_DES_new_random_key hc_DES_pcbc_encrypt hc_DES_rand_data @@ -87,6 +87,7 @@ EXPORTS hc_ENGINE_by_dso hc_ENGINE_by_id hc_ENGINE_finish + hc_ENGINE_free hc_ENGINE_get_DH hc_ENGINE_get_RAND hc_ENGINE_get_RSA @@ -95,6 +96,7 @@ EXPORTS hc_ENGINE_get_id hc_ENGINE_get_name hc_ENGINE_load_builtin_engines + hc_ENGINE_new hc_ENGINE_set_DH hc_ENGINE_set_RSA hc_ENGINE_set_default_DH @@ -125,20 +127,19 @@ EXPORTS hc_EVP_DigestUpdate hc_EVP_MD_CTX_block_size hc_EVP_MD_CTX_cleanup - hc_EVP_MD_CTX_cleanup - hc_EVP_MD_CTX_create hc_EVP_MD_CTX_create hc_EVP_MD_CTX_destroy - hc_EVP_MD_CTX_destroy - hc_EVP_MD_CTX_init hc_EVP_MD_CTX_init hc_EVP_MD_CTX_md hc_EVP_MD_CTX_size hc_EVP_MD_block_size hc_EVP_MD_size hc_EVP_aes_128_cbc + hc_EVP_aes_128_cfb8 hc_EVP_aes_192_cbc + hc_EVP_aes_192_cfb8 hc_EVP_aes_256_cbc + hc_EVP_aes_256_cfb8 hc_EVP_des_cbc hc_EVP_des_ede3_cbc hc_EVP_camellia_128_cbc @@ -159,15 +160,18 @@ EXPORTS hc_EVP_sha1 hc_EVP_sha256 -; hc_EVP_cc_md2 -; hc_EVP_cc_md4 -; hc_EVP_cc_md5 -; hc_EVP_cc_sha1 -; hc_EVP_cc_sha256 -; hc_EVP_cc_des_ede3_cbc -; hc_EVP_cc_aes_128_cbc -; hc_EVP_cc_aes_192_cbc -; hc_EVP_cc_aes_256_cbc +;! hc_EVP_cc_md2 +;! hc_EVP_cc_md4 +;! hc_EVP_cc_md5 +;! hc_EVP_cc_sha1 +;! hc_EVP_cc_sha256 +;! hc_EVP_cc_des_ede3_cbc +;! hc_EVP_cc_aes_128_cbc +;! hc_EVP_cc_aes_192_cbc +;! hc_EVP_cc_aes_256_cbc +;! hc_EVP_cc_aes_128_cfb8 +;! hc_EVP_cc_aes_192_cfb8 +;! hc_EVP_cc_aes_256_cfb8 hc_EVP_hcrypto_md2 hc_EVP_hcrypto_md4 @@ -181,9 +185,13 @@ EXPORTS hc_EVP_hcrypto_rc4 hc_EVP_hcrypto_rc4_40 -; hc_EVP_hcrypto_aes_128_cts -; hc_EVP_hcrypto_aes_192_cts -; hc_EVP_hcrypto_aes_256_cts + hc_EVP_hcrypto_aes_128_cfb8 + hc_EVP_hcrypto_aes_192_cfb8 + hc_EVP_hcrypto_aes_256_cfb8 + +;! hc_EVP_hcrypto_aes_128_cts +;! hc_EVP_hcrypto_aes_192_cts +;! hc_EVP_hcrypto_aes_256_cts hc_HMAC hc_HMAC_CTX_cleanup @@ -209,11 +217,11 @@ EXPORTS hc_RAND_add hc_RAND_bytes hc_RAND_cleanup -; hc_RAND_egd -; hc_RAND_egd_bytes -; hc_RAND_egd_method +;! hc_RAND_egd +;! hc_RAND_egd_bytes +;! hc_RAND_egd_method hc_RAND_file_name -; hc_RAND_fortuna_method +;! hc_RAND_fortuna_method hc_RAND_get_rand_method hc_RAND_load_file hc_RAND_pseudo_bytes @@ -221,9 +229,9 @@ EXPORTS hc_RAND_set_rand_engine hc_RAND_set_rand_method hc_RAND_status -; hc_RAND_unix_method -; hc_RAND_timer_method - hc_RAND_w32crypto_method +;! hc_RAND_unix_method +;! hc_RAND_timer_method + hc_RAND_w32crypto_method ;! hc_RAND_write_file hc_RC2_cbc_encrypt hc_RC2_decryptc @@ -260,7 +268,6 @@ EXPORTS hc_SHA256_Init hc_SHA256_Update hc_UI_UTIL_read_pw_string - hc_UI_UTIL_read_pw_string hc_d2i_RSAPrivateKey hc_i2d_RSAPrivateKey hc_i2d_RSAPublicKey diff --git a/lib/hcrypto/libtommath/NTMakefile b/lib/hcrypto/libtommath/NTMakefile index 22592df10..ed577e567 100644 --- a/lib/hcrypto/libtommath/NTMakefile +++ b/lib/hcrypto/libtommath/NTMakefile @@ -33,7 +33,10 @@ RELDIR=lib\hcrypto\libtommath !include ../../../windows/NTMakefile.w32 -INCFILES=$(INCDIR)\tommath.h +INCFILES= \ + $(INCDIR)\tommath.h \ + $(INCDIR)\tommath_class.h \ + $(INCDIR)\tommath_superclass.h libltm_OBJs= \ $(OBJ)\bncore.obj \ @@ -163,9 +166,3 @@ $(LIBLTM): $(libltm_OBJs) $(LIBCON) all:: $(INCFILES) $(LIBLTM) - -{}.obj{$(OBJ)}.obj: - $(C2OBJ) - -{$(OBJ)}.obj{$(OBJ)}.obj: - $(C2OBJ) diff --git a/lib/hcrypto/rand-w32.c b/lib/hcrypto/rand-w32.c index e4d8442f8..07f52ca4c 100644 --- a/lib/hcrypto/rand-w32.c +++ b/lib/hcrypto/rand-w32.c @@ -66,7 +66,8 @@ _hc_CryptProvider(void) } if (rv && - InterlockedCompareExchangePointer(&g_cryptprovider, cryptprovider, 0) != 0) { + InterlockedCompareExchangePointer((PVOID *) &g_cryptprovider, + (PVOID) cryptprovider, 0) != 0) { CryptReleaseContext(cryptprovider, 0); cryptprovider = g_cryptprovider; diff --git a/lib/hcrypto/rand.c b/lib/hcrypto/rand.c index b02f938c5..d5c1f687b 100644 --- a/lib/hcrypto/rand.c +++ b/lib/hcrypto/rand.c @@ -46,6 +46,10 @@ #define O_BINARY 0 #endif +#ifdef _WIN32 +#include +#endif + /** * @page page_rand RAND - random number * @@ -352,6 +356,8 @@ RAND_file_name(char *filename, size_t size) if (e) pathp = 1; } + +#ifndef _WIN32 /* * Here we really want to call getpwuid(getuid()) but this will * cause recursive lookups if the nss library uses @@ -359,7 +365,6 @@ RAND_file_name(char *filename, size_t size) * * So at least return the unix /dev/random if we have one */ -#ifndef _WIN32 if (e == NULL) { int fd; @@ -367,7 +372,22 @@ RAND_file_name(char *filename, size_t size) if (fd >= 0) close(fd); } +#else /* Win32 */ + + if (e == NULL) { + char profile[MAX_PATH]; + + if (SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, + SHGFP_TYPE_CURRENT, profile) == S_OK) { + ret = snprintf(filename, size, "%s\\.rnd", profile); + + if (ret > 0 && ret < size) + return filename; + } + } + #endif + if (e == NULL) return NULL; diff --git a/lib/hcrypto/rand.h b/lib/hcrypto/rand.h index 923d4adb7..590bd8cf1 100644 --- a/lib/hcrypto/rand.h +++ b/lib/hcrypto/rand.h @@ -104,5 +104,6 @@ int RAND_egd_bytes(const char *, int); const RAND_METHOD * RAND_fortuna_method(void); const RAND_METHOD * RAND_unix_method(void); const RAND_METHOD * RAND_egd_method(void); +const RAND_METHOD * RAND_w32crypto_method(void); #endif /* _HEIM_RAND_H */ diff --git a/lib/hcrypto/rsa-imath.c b/lib/hcrypto/rsa-imath.c index 901e9c359..23d535270 100644 --- a/lib/hcrypto/rsa-imath.c +++ b/lib/hcrypto/rsa-imath.c @@ -408,7 +408,7 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from, { unsigned char *ptr; mp_result res; - size_t size; + int size; mpz_t in, out, n, e, b, bi; int blinding = (rsa->flags & RSA_FLAG_NO_BLINDING) == 0; int do_unblind = 0; diff --git a/lib/hcrypto/rsa-tfm.c b/lib/hcrypto/rsa-tfm.c index 796985f8b..32c118c45 100644 --- a/lib/hcrypto/rsa-tfm.c +++ b/lib/hcrypto/rsa-tfm.c @@ -321,7 +321,7 @@ tfm_rsa_private_decrypt(int flen, const unsigned char* from, { unsigned char *ptr; int res; - size_t size; + int size; fp_int in, out, n, e; if (padding != RSA_PKCS1_PADDING) diff --git a/lib/hcrypto/test_crypto.in b/lib/hcrypto/test_crypto.in index 8cc779b32..64ecd077d 100644 --- a/lib/hcrypto/test_crypto.in +++ b/lib/hcrypto/test_crypto.in @@ -56,7 +56,7 @@ ${engine} --rsa=${srcdir}/rsakey.der || \ ${rsa} --loops=4 || { echo "rsa test for 4 loops failed" ; exit 1; } -for a in unix fortuna egd ;do +for a in unix fortuna egd w32crypto ;do ${rand} --method=${a} --file=crypto-test 2>error res=$? if test "X$res" != X0 ; then diff --git a/lib/hcrypto/test_engine_dso.c b/lib/hcrypto/test_engine_dso.c index f0cb7d417..e3d7d1bc5 100644 --- a/lib/hcrypto/test_engine_dso.c +++ b/lib/hcrypto/test_engine_dso.c @@ -199,7 +199,7 @@ main(int argc, char **argv) RSA *rsa; FILE *f; - f = fopen(rsa_flag, "r"); + f = fopen(rsa_flag, "rb"); if (f == NULL) err(1, "could not open file %s", rsa_flag); diff --git a/lib/hcrypto/test_rand.c b/lib/hcrypto/test_rand.c index aec538f4d..dc98218d9 100644 --- a/lib/hcrypto/test_rand.c +++ b/lib/hcrypto/test_rand.c @@ -126,9 +126,13 @@ main(int argc, char **argv) #ifndef NO_RAND_EGD_METHOD else if (strcasecmp(rand_method, "egd") == 0) RAND_set_rand_method(RAND_egd_method()); +#endif +#ifdef WIN32 + else if (strcasecmp(rand_method, "w32crypto") == 0) + RAND_set_rand_method(RAND_w32crypto_method()); #endif else - errx(1, "unknown method %s", rand_method); + errx(0, "unknown method %s", rand_method); } if (RAND_file_name(path, sizeof(path)) == NULL) diff --git a/lib/hcrypto/test_rsa.c b/lib/hcrypto/test_rsa.c index 510f951b1..1f7c0efab 100644 --- a/lib/hcrypto/test_rsa.c +++ b/lib/hcrypto/test_rsa.c @@ -157,7 +157,7 @@ read_key(ENGINE *engine, const char *rsa_key) RSA *rsa; FILE *f; - f = fopen(rsa_key, "r"); + f = fopen(rsa_key, "rb"); if (f == NULL) err(1, "could not open file %s", rsa_key); rk_cloexec_file(f); diff --git a/lib/hdb/NTMakefile b/lib/hdb/NTMakefile index dd5dd3b9d..4b1acea84 100644 --- a/lib/hdb/NTMakefile +++ b/lib/hdb/NTMakefile @@ -67,9 +67,7 @@ ldap_objs = $(OBJ)\hdb-ldap.obj $(ldap_dll): $(ldap_objs) $(DLLGUILINK) -implib:$(ldap_lib) - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(DLLPREP) clean:: -$(RM) $(ldap_dll) @@ -142,9 +140,11 @@ INCFILES= \ !ifndef STATICLIBS +RES=$(OBJ)\libhdb-version.res + $(LIBHDB): $(BINDIR)\libhdb.dll -$(BINDIR)\libhdb.dll: $(libhdb_OBJs) $(ldap_lib) $(LIBKRB5) $(LIBASN1) $(LIBSQLITE) $(LIBCOMERR) $(LIBROKEN) +$(BINDIR)\libhdb.dll: $(libhdb_OBJs) $(ldap_lib) $(LIBHEIMDAL) $(LIBSQLITE) $(LIBCOMERR) $(LIBROKEN) $(RES) $(DLLGUILINK) -def:libhdb-exports.def -implib:$(LIBHDB) $(DLLPREP) @@ -165,13 +165,13 @@ test:: test-binaries test-run test-binaries: $(OBJ)\test_dbinfo.exe $(OBJ)\test_hdbkeys.exe -$(OBJ)\test_dbinfo.exe: $(OBJ)\test_dbinfo.obj $(LIBHDB) $(LIBKRB5) $(LIBROKEN) $(LIBVERS) +$(OBJ)\test_dbinfo.exe: $(OBJ)\test_dbinfo.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) + $(EXEPREP_NODIST) -$(OBJ)\test_hdbkeys.exe: $(OBJ)\test_hdbkeys.obj $(LIBHDB) $(LIBKRB5) $(LIBROKEN) $(LIBASN1) $(LIBVERS) +$(OBJ)\test_hdbkeys.exe: $(OBJ)\test_hdbkeys.obj $(LIBHDB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) + $(EXEPREP_NODIST) test-run: cd $(OBJ) @@ -187,9 +187,13 @@ openldap_inc_flag= hdb_cflags=$(openldap_inc_flag) -I$(OBJ) -{}.c{$(OBJ)}.obj: - $(C2OBJ) $(hdb_cflags) +{}.c{$(OBJ)}.obj:: + $(C2OBJ_P) $(hdb_cflags) -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) $(hdb_cflags) +{$(OBJ)}.c{$(OBJ)}.obj:: + $(C2OBJ_P) $(hdb_cflags) +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhdb-exports.def + +test:: test-exports diff --git a/lib/hdb/hdb-sqlite.c b/lib/hdb/hdb-sqlite.c index ee3e88186..ac12bd808 100644 --- a/lib/hdb/hdb-sqlite.c +++ b/lib/hdb/hdb-sqlite.c @@ -482,7 +482,7 @@ hdb_sqlite_store(krb5_context context, HDB *db, unsigned flags, int ret; int i; sqlite_int64 entry_id; - char *principal_string; + char *principal_string = NULL; char *alias_string; const HDB_Ext_Aliases *aliases; diff --git a/lib/hdb/keytab.c b/lib/hdb/keytab.c index 925ff67c5..9e0d8ded1 100644 --- a/lib/hdb/keytab.c +++ b/lib/hdb/keytab.c @@ -52,7 +52,7 @@ struct hdb_cursor { * HDB:[HDBFORMAT:database-specific-data[:mkey=mkey-file]] */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV hdb_resolve(krb5_context context, const char *name, krb5_keytab id) { struct hdb_data *d; @@ -99,7 +99,7 @@ hdb_resolve(krb5_context context, const char *name, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV hdb_close(krb5_context context, krb5_keytab id) { struct hdb_data *d = id->data; @@ -110,7 +110,7 @@ hdb_close(krb5_context context, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV hdb_get_name(krb5_context context, krb5_keytab id, char *name, @@ -169,7 +169,7 @@ find_db (krb5_context context, * it in `entry'. return 0 or an error code */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV hdb_get_entry(krb5_context context, krb5_keytab id, krb5_const_principal principal, @@ -256,7 +256,7 @@ hdb_get_entry(krb5_context context, * it in `entry'. return 0 or an error code */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV hdb_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) @@ -309,7 +309,7 @@ hdb_start_seq_get(krb5_context context, return ret; } -static int +static int KRB5_CALLCONV hdb_next_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, @@ -391,7 +391,7 @@ hdb_next_entry(krb5_context context, } -static int +static int KRB5_CALLCONV hdb_end_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) diff --git a/lib/hdb/libhdb-version.rc b/lib/hdb/libhdb-version.rc new file mode 100644 index 000000000..b0d417b37 --- /dev/null +++ b/lib/hdb/libhdb-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Heimdal DB Library" +#define RC_FILE_ORIG_0409 "libhdb.dll" + +#include "../../windows/version.rc" diff --git a/lib/heimdal/NTMakefile b/lib/heimdal/NTMakefile new file mode 100644 index 000000000..752c7a44f --- /dev/null +++ b/lib/heimdal/NTMakefile @@ -0,0 +1,91 @@ +######################################################################## +# +# Copyright (c) 2009, 2010 Secure Endpoints Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +RELDIR = lib\heimdal + +!include ../../windows/NTMakefile.w32 + +!ifndef STATICLIBS + +DLLDEPS= \ + $(LIBASN1) \ + $(LIBCOMERR) \ + $(LIBHCRYPTO) \ + $(LIBHX509) \ + $(LIBKRB5) \ + $(LIBROKEN) \ + $(LIBSQLITE) \ + $(LIBWIND) \ + $(LIBLTM) + +DLLSDKDEPS= \ + $(PTHREAD_LIB) \ + secur32.lib \ + shell32.lib \ + dnsapi.lib + +DEF=$(OBJ)\heimdal.def + +RES=$(OBJ)\heimdal-version.res + +DEFSRC= ..\asn1\libasn1-exports.def \ + ..\wind\libwind-exports.def \ + ..\hcrypto\libhcrypto-exports.def \ + ..\hx509\libhx509-exports.def \ + $(OBJDIR)\lib\krb5\libkrb5-exports.def + +$(DEF): $(DEFSRC) + copy $(DEFSRC: = + ) $(DEF) + +DLL=$(BINDIR)\heimdal.dll + +$(LIBHEIMDAL): $(BINDIR)\heimdal.dll + +$(DLL): $(DLLDEPS) $(DEF) $(RES) + $(DLLGUILINK_C) $(DLLDEPS) $(DLLSDKDEPS) $(RES) \ + -def:$(DEF) -out:$(DLL) \ + -implib:$(LIBHEIMDAL) + $(DLLPREP) + +clean:: + -$(RM) $(BINDIR)\heimdal.dll + +!else + +$(LIBHEIMDAL): $(LIBASN1) $(LIBWIND) $(LIBHCRYPTO) $(LIBHX509) $(LIBKRB5) + $(LIBCON) + +!endif + +all:: $(LIBHEIMDAL) + +clean:: + -$(RM) $(LIBHEIMDAL) diff --git a/lib/heimdal/dllmain.c b/lib/heimdal/dllmain.c new file mode 100644 index 000000000..4b34e7ef5 --- /dev/null +++ b/lib/heimdal/dllmain.c @@ -0,0 +1,40 @@ +/*********************************************************************** + * Copyright (c) 2009, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#include + +BOOL WINAPI +DllMain(__in HINSTANCE hinstDLL, + __in DWORD fdwReason, + __in LPVOID lpvReserved) +{ + return TRUE; +} diff --git a/lib/heimdal/heimdal-version.rc b/lib/heimdal/heimdal-version.rc new file mode 100644 index 000000000..1da512cfb --- /dev/null +++ b/lib/heimdal/heimdal-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Heimdal Kerberos Library" +#define RC_FILE_ORIG_0409 "heimdal.dll" + +#include "../../windows/version.rc" diff --git a/lib/hx509/NTMakefile b/lib/hx509/NTMakefile index 0a36acc50..77edf6446 100644 --- a/lib/hx509/NTMakefile +++ b/lib/hx509/NTMakefile @@ -30,6 +30,7 @@ # RELDIR=lib\hx509 +intcflags=-DASN1_LIB !include ../../windows/NTMakefile.w32 @@ -103,21 +104,9 @@ libhx509_la_OBJS = \ $(gen_files_ocsp:.x=.obj) \ $(gen_files_pkcs10:.x=.obj) -!ifndef STATICLIBS - -$(LIBHX509): $(BINDIR)\libhx509.dll - -$(BINDIR)\libhx509.dll: $(libhx509_la_OBJS) $(LIBHCRYPTO) $(LIBASN1) $(LIBWIND) $(LIBROKEN) $(LIBCOMERR) - $(DLLGUILINK) -def:libhx509-exports.def -implib:$(LIBHX509) shell32.lib - $(DLLPREP) - -!else - $(LIBHX509): $(libhx509_la_OBJS) $(LIBCON) -!endif - dist_libhx509_la_SOURCES = \ $(SRCDIR)\ca.c \ $(SRCDIR)\cert.c \ @@ -206,11 +195,9 @@ $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC) $(SLC) hxtool-commands.in cd $(SRCDIR) -$(BINDIR)\hxtool.exe: $(OBJ)\hxtool.obj $(OBJ)\hxtool-commands.obj $(LIBHX509) - $(EXECONLINK) $(LIBASN1) $(LIBHCRYPTO) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBWIND) $(LIBCOMERR) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) +$(BINDIR)\hxtool.exe: $(OBJ)\hxtool.obj $(OBJ)\hxtool-commands.obj $(LIBHEIMDAL) $(OBJ)\hxtool-version.res + $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBCOMERR) + $(EXEPREP) $(OBJ)\hx509-protos.h: cd $(OBJ) @@ -239,7 +226,9 @@ $(OBJ)\sel-gram.c: sel-gram.y $(OBJ)\sel-lex.c: sel-lex.l $(LEX) -o$@ sel-lex.l -all:: $(INCFILES) $(LIBHX509) $(BINDIR)\hxtool.exe +all:: $(INCFILES) $(LIBHX509) + +all-tools:: $(BINDIR)\hxtool.exe clean:: -$(RM) $(BINDIR)\hxtool.exe diff --git a/lib/hx509/hxtool-version.rc b/lib/hx509/hxtool-version.rc new file mode 100644 index 000000000..7e5197cc4 --- /dev/null +++ b/lib/hx509/hxtool-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Heimdal X.509 Certificate Tool" +#define RC_FILE_ORIG_0409 "hxtool.exe" + +#include "../../windows/version.rc" diff --git a/lib/hx509/ks_p11.c b/lib/hx509/ks_p11.c index 8258bd2e0..23f6a4826 100644 --- a/lib/hx509/ks_p11.c +++ b/lib/hx509/ks_p11.c @@ -835,7 +835,7 @@ p11_init(hx509_context context, goto out; } - getFuncs = dlsym(p->dl_handle, "C_GetFunctionList"); + getFuncs = (CK_C_GetFunctionList) dlsym(p->dl_handle, "C_GetFunctionList"); if (getFuncs == NULL) { ret = HX509_PKCS11_LOAD; hx509_set_error_string(context, 0, ret, diff --git a/lib/hx509/sel.c b/lib/hx509/sel.c index 5932ce84c..561818c9f 100644 --- a/lib/hx509/sel.c +++ b/lib/hx509/sel.c @@ -175,6 +175,7 @@ _hx509_expr_eval(hx509_context context, hx509_env env, struct hx_expr *expr) return eval_comp(context, env, expr->arg1); default: _hx509_abort("hx509 eval expr with unknown op: %d", (int)expr->op); + UNREACHABLE(return 0); } } diff --git a/lib/hx509/softp11.c b/lib/hx509/softp11.c index 98ab500d9..0496b35b7 100644 --- a/lib/hx509/softp11.c +++ b/lib/hx509/softp11.c @@ -810,9 +810,11 @@ func_not_supported(void) static char * get_config_file_for_user(void) { - char *fn = NULL, *home = NULL; + char *fn = NULL; #ifndef _WIN32 + char *home = NULL; + if (!issuid()) { fn = getenv("SOFTPKCS11RC"); if (fn) diff --git a/lib/kadm5/NTMakefile b/lib/kadm5/NTMakefile index 029893d0d..3ec50ff9b 100644 --- a/lib/kadm5/NTMakefile +++ b/lib/kadm5/NTMakefile @@ -187,42 +187,38 @@ LIBEXECPROGRAMS=$(LIBEXECDIR)\ipropd-master.exe $(LIBEXECDIR)\ipropd-slave.exe EXELIBDEPS= \ $(LIBKADM5SRV) \ $(LIBROKEN) \ - $(LIBKRB5) \ + $(LIBHEIMDAL) \ $(LIBHDB) \ - $(LIBASN1) \ $(LIBSQLITE) \ $(LIBSL) \ $(LIBCOMERR) \ $(LIBVERS) -$(SBINDIR)\iprop-log.exe: $(OBJ)\iprop-log.obj $(OBJ)\iprop-commands.obj $(EXELIBDEPS) +$(SBINDIR)\iprop-log.exe: $(OBJ)\iprop-log.obj $(OBJ)\iprop-commands.obj $(EXELIBDEPS) \ + $(OBJ)\iprop-log-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(LIBEXECDIR)\ipropd-master.exe: $(OBJ)\ipropd_master.obj $(OBJ)\ipropd_common.obj $(EXELIBDEPS) +$(LIBEXECDIR)\ipropd-master.exe: $(OBJ)\ipropd_master.obj $(OBJ)\ipropd_common.obj \ + $(EXELIBDEPS) $(OBJ)\ipropd-master-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -$(LIBEXECDIR)\ipropd-slave.exe: $(OBJ)\ipropd_slave.obj $(OBJ)\ipropd_common.obj $(EXELIBDEPS) +$(LIBEXECDIR)\ipropd-slave.exe: $(OBJ)\ipropd_slave.obj $(OBJ)\ipropd_common.obj \ + $(EXELIBDEPS) $(OBJ)\ipropd-slave-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) $(LIBKADM5CLNT): $(LIBKADM5CLNT_OBJS) $(LIBCON) +LIBKADM5SRVRES=$(OBJ)\libkadm5srv-version.res + $(LIBKADM5SRV): $(BINDIR)\libkadm5srv.dll -$(BINDIR)\libkadm5srv.dll: $(LIBKADM5SRV_OBJS) $(LIBKRB5) $(LIBROKEN) $(LIBHDB) $(LIBCOMERR) $(LIBASN1) $(LIBSQLITE) +$(BINDIR)\libkadm5srv.dll: $(LIBKADM5SRV_OBJS) $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB) $(LIBCOMERR) $(LIBSQLITE) $(LIBKADM5SRVRES) $(DLLGUILINK) -implib:$(LIBKADM5SRV) -def:libkadm5srv-exports.def - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(DLLPREP) all:: $(INCFILES) $(LIBKADM5SRV) $(LIBKADM5CLNT) $(SBINPROGRAMS) $(LIBEXECPROGRAMS) @@ -243,13 +239,11 @@ test-binaries: \ $(OBJ)\default_keys.exe: $(OBJ)\default_keys.obj $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) $(OBJ)\sample_passwd_check.dll: $(OBJ)\sample_passwd_check.obj $(DLLGUILINK) #TODO: Define exports - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) + $(DLLPREP_NODIST) test-run: @@ -259,5 +253,10 @@ test-run: {}.h{$(KADM5INCDIR)}.h: $(CP) $< $@ -{}.c{$(OBJ)}.obj: - $(C2OBJ) -I$(OBJ) -I$(KADM5INCDIR) \ No newline at end of file +{}.c{$(OBJ)}.obj:: + $(C2OBJ_P) -I$(OBJ) -I$(KADM5INCDIR) + +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkadm5srv-exports.def + +test:: test-exports diff --git a/lib/kadm5/init_c.c b/lib/kadm5/init_c.c index ca7efa18a..ad4f78166 100644 --- a/lib/kadm5/init_c.c +++ b/lib/kadm5/init_c.c @@ -408,7 +408,7 @@ kadm_connect(kadm5_client_context *ctx) kadm5_ret_t ret; krb5_principal server; krb5_ccache cc; - int s; + rk_socket_t s = rk_INVALID_SOCKET; struct addrinfo *ai, *a; struct addrinfo hints; int error; @@ -441,7 +441,7 @@ kadm_connect(kadm5_client_context *ctx) if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { krb5_clear_error_message(context); krb5_warn (context, errno, "connect(%s)", hostname); - close (s); + rk_closesocket (s); continue; } break; @@ -460,7 +460,7 @@ kadm_connect(kadm5_client_context *ctx) if(ret) { freeaddrinfo (ai); - close(s); + rk_closesocket(s); return ret; } @@ -471,7 +471,7 @@ kadm_connect(kadm5_client_context *ctx) if (service_name == NULL) { freeaddrinfo (ai); - close(s); + rk_closesocket(s); krb5_clear_error_message(context); return ENOMEM; } @@ -482,7 +482,7 @@ kadm_connect(kadm5_client_context *ctx) freeaddrinfo (ai); if(ctx->ccache == NULL) krb5_cc_close(context, cc); - close(s); + rk_closesocket(s); return ret; } ctx->ac = NULL; @@ -505,13 +505,13 @@ kadm_connect(kadm5_client_context *ctx) krb5_data_free(¶ms); if(ret) { freeaddrinfo (ai); - close(s); + rk_closesocket(s); if(ctx->ccache == NULL) krb5_cc_close(context, cc); return ret; } } else if(ret == KRB5_SENDAUTH_BADAPPLVERS) { - close(s); + rk_closesocket(s); s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); if (s < 0) { @@ -520,7 +520,7 @@ kadm_connect(kadm5_client_context *ctx) return errno; } if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - close (s); + rk_closesocket (s); freeaddrinfo (ai); krb5_clear_error_message(context); return errno; @@ -532,7 +532,7 @@ kadm_connect(kadm5_client_context *ctx) } freeaddrinfo (ai); if(ret) { - close(s); + rk_closesocket(s); return ret; } diff --git a/lib/kadm5/iprop-log-version.rc b/lib/kadm5/iprop-log-version.rc new file mode 100644 index 000000000..b8a229577 --- /dev/null +++ b/lib/kadm5/iprop-log-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "IProp Log Tool" +#define RC_FILE_ORIG_0409 "iprop-log.exe" + +#include "../../windows/version.rc" diff --git a/lib/kadm5/ipropd-master-version.rc b/lib/kadm5/ipropd-master-version.rc new file mode 100644 index 000000000..f51a89168 --- /dev/null +++ b/lib/kadm5/ipropd-master-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "IProp Master" +#define RC_FILE_ORIG_0409 "ipropd-master.exe" + +#include "../../windows/version.rc" diff --git a/lib/kadm5/ipropd-slave-version.rc b/lib/kadm5/ipropd-slave-version.rc new file mode 100644 index 000000000..a1cee87e1 --- /dev/null +++ b/lib/kadm5/ipropd-slave-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "IProp Slave" +#define RC_FILE_ORIG_0409 "ipropd-slave.exe" + +#include "../../windows/version.rc" diff --git a/lib/kadm5/libkadm5srv-version.rc b/lib/kadm5/libkadm5srv-version.rc new file mode 100644 index 000000000..065c18f95 --- /dev/null +++ b/lib/kadm5/libkadm5srv-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Heimdal Kerberos v5 Administration Library" +#define RC_FILE_ORIG_0409 "libkadm5srv.dll" + +#include "../../windows/version.rc" diff --git a/lib/krb5/NTMakefile b/lib/krb5/NTMakefile index 5ac2b6a59..c1a9088b6 100644 --- a/lib/krb5/NTMakefile +++ b/lib/krb5/NTMakefile @@ -90,13 +90,13 @@ libkrb5_OBJS = \ $(OBJ)\log.obj \ $(OBJ)\mcache.obj \ $(OBJ)\misc.obj \ + $(OBJ)\mit_glue.obj \ $(OBJ)\mk_error.obj \ $(OBJ)\mk_priv.obj \ $(OBJ)\mk_rep.obj \ $(OBJ)\mk_req.obj \ $(OBJ)\mk_req_ext.obj \ $(OBJ)\mk_safe.obj \ - $(OBJ)\mit_glue.obj \ $(OBJ)\net_read.obj \ $(OBJ)\net_write.obj \ $(OBJ)\n-fold.obj \ @@ -293,8 +293,6 @@ $(OBJ)\k524_err.c $(OBJ)\k524_err.h: k524_err.et #---------------------------------------------------------------------- # libkrb5 -!ifdef STATICLIBS - $(LIBKRB5): $(libkrb5_OBJS) $(libkrb5_gen_OBJS) $(LIBCON) @@ -303,64 +301,28 @@ all:: $(LIBKRB5) clean:: -$(RM) $(LIBKRB5) -!else - -DLLDEPS= \ - $(LIBROKEN) \ - $(LIBASN1) \ - $(LIBSQLITE) \ - $(LIBCOMERR) \ - $(LIBHCRYPTO) \ - $(LIBHX509) \ - $(LIBWIND) - -DLLSDKDEPS= \ - $(PTHREAD_LIB) \ - secur32.lib \ - shell32.lib \ - dnsapi.lib - -$(LIBKRB5): $(BINDIR)\libkrb5.dll - $(OBJ)\libkrb5-exports.def: libkrb5-exports.def.in $(INCDIR)\config.h $(CPREPROCESSOUT) libkrb5-exports.def.in > $@ || $(RM) $@ -$(BINDIR)\libkrb5.dll: $(libkrb5_OBJS) $(libkrb5_gen_OBJS) $(DLLDEPS) $(OBJ)\libkrb5-exports.def - $(DLLGUILINK_C) -out:$(BINDIR)\libkrb5.dll -implib:$(LIBKRB5) \ - $(DLLDEPS) $(DLLSDKDEPS) -def:$(OBJ)\libkrb5-exports.def @<< -$(libkrb5_OBJS: = -) -$(libkrb5_gen_OBJS: = -) -<< - $(_VC_MANIFEST_EMBED_DLL) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) - -all:: $(BINDIR)\libkrb5.dll +all:: $(OBJ)\libkrb5-exports.def clean:: - -$(RM) $(BINDIR)\libkrb5.dll - -$(RM) $(LIBKRB5) + -$(RM) $(OBJ)\libkrb5-exports.def -!endif - -all:: $(BINDIR)\verify_krb5_conf.exe +all-tools:: $(BINDIR)\verify_krb5_conf.exe clean:: -$(RM) $(BINDIR)\verify_krb5_conf.exe -$(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBKRB5) $(LIBROKEN) $(LIBVERS) +$(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(OBJ)\verify_krb5_conf-version.res $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) - $(_CODESIGN) + $(EXEPREP) -{}.c{$(OBJ)}.obj: - $(C2OBJ) -DBUILD_KRB5_LIB +{}.c{$(OBJ)}.obj:: + $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) -DBUILD_KRB5_LIB +{$(OBJ)}.c{$(OBJ)}.obj:: + $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB #---------------------------------------------------------------------- # Tests @@ -432,11 +394,13 @@ test-run: cd $(SRCDIR) $(test_binaries): $$(@R).obj - $(EXECONLINK) $(LIBKRB5) $(LIBVERS) $(LIBROKEN) $(LIBHCRYPTO) $(LIBASN1) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXECONLINK) $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) + $(EXEPREP_NODIST) $(test_binaries:.exe=.obj): $$(@B).c $(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** -DBlah +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkrb5-exports.def.in +test:: test-exports diff --git a/lib/krb5/acache.c b/lib/krb5/acache.c index d06a6eaa6..6c6f2fe93 100644 --- a/lib/krb5/acache.c +++ b/lib/krb5/acache.c @@ -43,8 +43,8 @@ static HEIMDAL_MUTEX acc_mutex = HEIMDAL_MUTEX_INITIALIZER; static cc_initialize_func init_func; -static void (*set_target_uid)(uid_t); -static void (*clear_target)(void); +static void (KRB5_CALLCONV *set_target_uid)(uid_t); +static void (KRB5_CALLCONV *clear_target)(void); #ifdef HAVE_DLOPEN static void *cc_handle; @@ -56,7 +56,7 @@ typedef struct krb5_acc { cc_ccache_t ccache; } krb5_acc; -static krb5_error_code acc_close(krb5_context, krb5_ccache); +static krb5_error_code KRB5_CALLCONV acc_close(krb5_context, krb5_ccache); #define ACACHE(X) ((krb5_acc *)(X)->data.data) @@ -144,8 +144,10 @@ init_ccapi(krb5_context context) } init_func = (cc_initialize_func)dlsym(cc_handle, "cc_initialize"); - set_target_uid = dlsym(cc_handle, "krb5_ipc_client_set_target_uid"); - clear_target = dlsym(cc_handle, "krb5_ipc_client_clear_target"); + set_target_uid = (void (KRB5_CALLCONV *)(uid_t)) + dlsym(cc_handle, "krb5_ipc_client_set_target_uid"); + clear_target = (void (KRB5_CALLCONV *)(void)) + dlsym(cc_handle, "krb5_ipc_client_clear_target"); HEIMDAL_MUTEX_unlock(&acc_mutex); if (init_func == NULL) { if (context) @@ -449,7 +451,7 @@ get_cc_name(krb5_acc *a) } -static const char* +static const char* KRB5_CALLCONV acc_get_name(krb5_context context, krb5_ccache id) { @@ -486,7 +488,7 @@ acc_get_name(krb5_context context, return a->cache_name; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_alloc(krb5_context context, krb5_ccache *id) { krb5_error_code ret; @@ -516,7 +518,7 @@ acc_alloc(krb5_context context, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_resolve(krb5_context context, krb5_ccache *id, const char *res) { krb5_error_code ret; @@ -556,7 +558,7 @@ acc_resolve(krb5_context context, krb5_ccache *id, const char *res) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_gen_new(krb5_context context, krb5_ccache *id) { krb5_error_code ret; @@ -574,7 +576,7 @@ acc_gen_new(krb5_context context, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_initialize(krb5_context context, krb5_ccache id, krb5_principal primary_principal) @@ -628,7 +630,7 @@ acc_initialize(krb5_context context, return translate_cc_error(context, error); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_close(krb5_context context, krb5_ccache id) { @@ -650,7 +652,7 @@ acc_close(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_destroy(krb5_context context, krb5_ccache id) { @@ -668,7 +670,7 @@ acc_destroy(krb5_context context, return translate_cc_error(context, error); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_store_cred(krb5_context context, krb5_ccache id, krb5_creds *creds) @@ -703,7 +705,7 @@ acc_store_cred(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *principal) @@ -731,7 +733,7 @@ acc_get_principal(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_first (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -756,7 +758,7 @@ acc_get_first (krb5_context context, } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_next (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, @@ -783,7 +785,7 @@ acc_get_next (krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -793,7 +795,7 @@ acc_end_get (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_remove_cred(krb5_context context, krb5_ccache id, krb5_flags which, @@ -869,7 +871,7 @@ acc_remove_cred(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) @@ -877,7 +879,7 @@ acc_set_flags(krb5_context context, return 0; } -static int +static int KRB5_CALLCONV acc_get_version(krb5_context context, krb5_ccache id) { @@ -889,7 +891,7 @@ struct cache_iter { cc_ccache_iterator_t iter; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) { struct cache_iter *iter; @@ -923,7 +925,7 @@ acc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) { struct cache_iter *iter = cursor; @@ -961,7 +963,7 @@ acc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) { struct cache_iter *iter = cursor; @@ -974,7 +976,7 @@ acc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_move(krb5_context context, krb5_ccache from, krb5_ccache to) { krb5_acc *afrom = ACACHE(from); @@ -1006,7 +1008,7 @@ acc_move(krb5_context context, krb5_ccache from, krb5_ccache to) return translate_cc_error(context, error); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_get_default_name(krb5_context context, char **str) { krb5_error_code ret; @@ -1039,7 +1041,7 @@ acc_get_default_name(krb5_context context, char **str) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_set_default(krb5_context context, krb5_ccache id) { krb5_acc *a = ACACHE(id); @@ -1058,7 +1060,7 @@ acc_set_default(krb5_context context, krb5_ccache id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV acc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) { krb5_acc *a = ACACHE(id); diff --git a/lib/krb5/cache.c b/lib/krb5/cache.c index f5bec46cf..09fbe1d96 100644 --- a/lib/krb5/cache.c +++ b/lib/krb5/cache.c @@ -477,7 +477,7 @@ KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_default_name(krb5_context context, const char *name) { krb5_error_code ret = 0; - char *p, *exp_p = NULL; + char *p = NULL, *exp_p = NULL; if (name == NULL) { const char *e = NULL; diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index ed8765542..4674af976 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -96,11 +96,11 @@ struct checksum_type { size_t blocksize; size_t checksumsize; unsigned flags; - krb5_enctype (*checksum)(krb5_context context, - struct key_data *key, - const void *buf, size_t len, - unsigned usage, - Checksum *csum); + krb5_error_code (*checksum)(krb5_context context, + struct key_data *key, + const void *buf, size_t len, + unsigned usage, + Checksum *csum); krb5_error_code (*verify)(krb5_context context, struct key_data *key, const void *buf, size_t len, diff --git a/lib/krb5/deprecated.c b/lib/krb5/deprecated.c index 93e7b53b6..5a36f5291 100644 --- a/lib/krb5/deprecated.c +++ b/lib/krb5/deprecated.c @@ -185,7 +185,7 @@ krb5_string_to_keytype(krb5_context context, */ KRB5_DEPRECATED -KRB5_LIB_FUNCTION krb5_error_code +KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_password_key_proc (krb5_context context, krb5_enctype type, krb5_salt salt, @@ -246,7 +246,7 @@ krb5_get_in_tkt_with_password (krb5_context context, ret_as_reply); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV krb5_skey_key_proc (krb5_context context, krb5_enctype type, krb5_salt salt, @@ -306,7 +306,7 @@ krb5_get_in_tkt_with_skey (krb5_context context, */ KRB5_DEPRECATED -KRB5_LIB_FUNCTION krb5_error_code +KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_keytab_key_proc (krb5_context context, krb5_enctype enctype, krb5_salt salt, @@ -632,7 +632,7 @@ krb5_get_cred_from_kdc(krb5_context context, */ KRB5_DEPRECATED -void KRB5_LIB_FUNCTION +KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_unparsed_name(krb5_context context, char *str) { krb5_xfree(str); diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index fb03474af..85c95bd5e 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -58,7 +58,7 @@ struct fcc_cursor { #define FCC_CURSOR(C) ((struct fcc_cursor*)(C)) -static const char* +static const char* KRB5_CALLCONV fcc_get_name(krb5_context context, krb5_ccache id) { @@ -167,20 +167,20 @@ write_storage(krb5_context context, krb5_storage *sp, int fd) } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_lock(krb5_context context, krb5_ccache id, int fd, krb5_boolean exclusive) { return _krb5_xlock(context, fd, exclusive, fcc_get_name(context, id)); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_unlock(krb5_context context, int fd) { return _krb5_xunlock(context, fd); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_resolve(krb5_context context, krb5_ccache *id, const char *res) { krb5_fcache *f; @@ -304,7 +304,7 @@ _krb5_erase_file(krb5_context context, const char *filename) return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_gen_new(krb5_context context, krb5_ccache *id) { char *file = NULL, *exp_file = NULL; @@ -373,7 +373,7 @@ storage_set_flags(krb5_context context, krb5_storage *sp, int vno) krb5_storage_set_flags(sp, flags); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_open(krb5_context context, krb5_ccache id, int *fd_ret, @@ -404,7 +404,7 @@ fcc_open(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_initialize(krb5_context context, krb5_ccache id, krb5_principal primary_principal) @@ -460,7 +460,7 @@ fcc_initialize(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_close(krb5_context context, krb5_ccache id) { @@ -469,7 +469,7 @@ fcc_close(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_destroy(krb5_context context, krb5_ccache id) { @@ -477,7 +477,7 @@ fcc_destroy(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_store_cred(krb5_context context, krb5_ccache id, krb5_creds *creds) @@ -667,7 +667,7 @@ init_fcc (krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *principal) @@ -688,12 +688,12 @@ fcc_get_principal(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor); -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_first (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -726,7 +726,7 @@ fcc_get_first (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_next (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, @@ -744,7 +744,7 @@ fcc_get_next (krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -756,7 +756,7 @@ fcc_end_get (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_remove_cred(krb5_context context, krb5_ccache id, krb5_flags which, @@ -822,7 +822,7 @@ fcc_remove_cred(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) @@ -830,7 +830,7 @@ fcc_set_flags(krb5_context context, return 0; /* XXX */ } -static int +static int KRB5_CALLCONV fcc_get_version(krb5_context context, krb5_ccache id) { @@ -841,7 +841,7 @@ struct fcache_iter { int first; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) { struct fcache_iter *iter; @@ -856,7 +856,7 @@ fcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) { struct fcache_iter *iter = cursor; @@ -896,7 +896,7 @@ fcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) { struct fcache_iter *iter = cursor; @@ -904,7 +904,7 @@ fcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) { krb5_error_code ret = 0; @@ -995,7 +995,7 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_default_name(krb5_context context, char **str) { return _krb5_expand_default_cc_name(context, @@ -1003,7 +1003,7 @@ fcc_get_default_name(krb5_context context, char **str) str); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) { krb5_error_code ret; @@ -1024,13 +1024,13 @@ fcc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) { return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset) { krb5_error_code ret; diff --git a/lib/krb5/get_cred.c b/lib/krb5/get_cred.c index 4e5bb479a..8f9d46219 100644 --- a/lib/krb5/get_cred.c +++ b/lib/krb5/get_cred.c @@ -314,7 +314,7 @@ _krb5_get_krbtgt(krb5_context context, } /* DCE compatible decrypt proc */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV decrypt_tkt_with_subkey (krb5_context context, krb5_keyblock *key, krb5_key_usage usage, diff --git a/lib/krb5/get_default_principal.c b/lib/krb5/get_default_principal.c index 539dedfa4..ba4301ce2 100644 --- a/lib/krb5/get_default_principal.c +++ b/lib/krb5/get_default_principal.c @@ -104,8 +104,6 @@ krb5_error_code _krb5_get_default_principal_local(krb5_context context, krb5_principal *princ) { - krb5_error_code ret = 0; - /* See if we can get the principal first. We only expect this to work if logged into a domain. */ { diff --git a/lib/krb5/init_creds_pw.c b/lib/krb5/init_creds_pw.c index 5c57e9a12..869687aa6 100644 --- a/lib/krb5/init_creds_pw.c +++ b/lib/krb5/init_creds_pw.c @@ -94,7 +94,7 @@ free_paid(krb5_context context, struct pa_info_data *ppaid) krb5_free_data(context, ppaid->s2kparams); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV default_s2k_func(krb5_context context, krb5_enctype type, krb5_const_pointer keyseed, krb5_salt salt, krb5_data *s2kparms, @@ -1459,7 +1459,7 @@ krb5_init_creds_set_password(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV keytab_key_proc(krb5_context context, krb5_enctype enctype, krb5_const_pointer keyseed, krb5_salt salt, krb5_data *s2kparms, @@ -1586,7 +1586,7 @@ krb5_init_creds_set_keytab(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV keyblock_key_proc(krb5_context context, krb5_enctype enctype, krb5_const_pointer keyseed, krb5_salt salt, krb5_data *s2kparms, diff --git a/lib/krb5/keytab_any.c b/lib/krb5/keytab_any.c index 02de8c802..d05696476 100644 --- a/lib/krb5/keytab_any.c +++ b/lib/krb5/keytab_any.c @@ -53,7 +53,7 @@ free_list (krb5_context context, struct any_data *a) } } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_resolve(krb5_context context, const char *name, krb5_keytab id) { struct any_data *a, *a0 = NULL, *prev = NULL; @@ -95,7 +95,7 @@ any_resolve(krb5_context context, const char *name, krb5_keytab id) return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_get_name (krb5_context context, krb5_keytab id, char *name, @@ -106,7 +106,7 @@ any_get_name (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_close (krb5_context context, krb5_keytab id) { @@ -121,7 +121,7 @@ struct any_cursor_extra_data { krb5_kt_cursor cursor; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *c) @@ -150,7 +150,7 @@ any_start_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_next_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, @@ -182,7 +182,7 @@ any_next_entry (krb5_context context, } while (1); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_end_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) @@ -198,7 +198,7 @@ any_end_seq_get(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_add_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) @@ -218,7 +218,7 @@ any_add_entry(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV any_remove_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) diff --git a/lib/krb5/keytab_file.c b/lib/krb5/keytab_file.c index 9a21db0cb..2b9ea7f11 100644 --- a/lib/krb5/keytab_file.c +++ b/lib/krb5/keytab_file.c @@ -286,7 +286,7 @@ krb5_kt_store_principal(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_resolve(krb5_context context, const char *name, krb5_keytab id) { struct fkt_data *d; @@ -307,7 +307,7 @@ fkt_resolve(krb5_context context, const char *name, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_resolve_java14(krb5_context context, const char *name, krb5_keytab id) { krb5_error_code ret; @@ -320,7 +320,7 @@ fkt_resolve_java14(krb5_context context, const char *name, krb5_keytab id) return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_close(krb5_context context, krb5_keytab id) { struct fkt_data *d = id->data; @@ -329,7 +329,7 @@ fkt_close(krb5_context context, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_destroy(krb5_context context, krb5_keytab id) { struct fkt_data *d = id->data; @@ -337,7 +337,7 @@ fkt_destroy(krb5_context context, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_get_name(krb5_context context, krb5_keytab id, char *name, @@ -430,7 +430,7 @@ fkt_start_seq_get_int(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *c) @@ -503,7 +503,7 @@ loop: return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_next_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, @@ -512,7 +512,7 @@ fkt_next_entry(krb5_context context, return fkt_next_entry_int(context, id, entry, cursor, NULL, NULL); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_end_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) @@ -523,7 +523,7 @@ fkt_end_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_setup_keytab(krb5_context context, krb5_keytab id, krb5_storage *sp) @@ -537,7 +537,7 @@ fkt_setup_keytab(krb5_context context, return krb5_store_int8 (sp, id->version); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_add_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) @@ -723,7 +723,7 @@ fkt_add_entry(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV fkt_remove_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) diff --git a/lib/krb5/keytab_keyfile.c b/lib/krb5/keytab_keyfile.c index 54666c7d4..28bbaeee8 100644 --- a/lib/krb5/keytab_keyfile.c +++ b/lib/krb5/keytab_keyfile.c @@ -128,7 +128,7 @@ get_cell_and_realm (krb5_context context, struct akf_data *d) * init and get filename */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_resolve(krb5_context context, const char *name, krb5_keytab id) { int ret; @@ -164,7 +164,7 @@ akf_resolve(krb5_context context, const char *name, krb5_keytab id) * cleanup */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_close(krb5_context context, krb5_keytab id) { struct akf_data *d = id->data; @@ -179,7 +179,7 @@ akf_close(krb5_context context, krb5_keytab id) * Return filename */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_get_name(krb5_context context, krb5_keytab id, char *name, @@ -195,7 +195,7 @@ akf_get_name(krb5_context context, * Init */ -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *c) @@ -226,7 +226,7 @@ akf_start_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_next_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, @@ -281,7 +281,7 @@ akf_next_entry(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_end_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) @@ -291,7 +291,7 @@ akf_end_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV akf_add_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) diff --git a/lib/krb5/keytab_memory.c b/lib/krb5/keytab_memory.c index 73ffa1c67..0ee684d36 100644 --- a/lib/krb5/keytab_memory.c +++ b/lib/krb5/keytab_memory.c @@ -50,7 +50,7 @@ static HEIMDAL_MUTEX mkt_mutex = HEIMDAL_MUTEX_INITIALIZER; static struct mkt_data *mkt_head; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_resolve(krb5_context context, const char *name, krb5_keytab id) { struct mkt_data *d; @@ -95,7 +95,7 @@ mkt_resolve(krb5_context context, const char *name, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_close(krb5_context context, krb5_keytab id) { struct mkt_data *d = id->data, **dp; @@ -126,7 +126,7 @@ mkt_close(krb5_context context, krb5_keytab id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_get_name(krb5_context context, krb5_keytab id, char *name, @@ -137,7 +137,7 @@ mkt_get_name(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *c) @@ -147,7 +147,7 @@ mkt_start_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_next_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, @@ -159,7 +159,7 @@ mkt_next_entry(krb5_context context, return krb5_kt_copy_entry_contents(context, &d->entries[c->fd++], entry); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_end_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor) @@ -167,7 +167,7 @@ mkt_end_seq_get(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_add_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) @@ -185,7 +185,7 @@ mkt_add_entry(krb5_context context, &d->entries[d->num_entries++]); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mkt_remove_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) diff --git a/lib/krb5/krb5.h b/lib/krb5/krb5.h index c48679eb1..ae269ba37 100644 --- a/lib/krb5/krb5.h +++ b/lib/krb5/krb5.h @@ -63,6 +63,12 @@ #endif #endif +#ifdef _WIN32 +#define KRB5_CALLCONV __stdcall +#else +#define KRB5_CALLCONV +#endif + /* simple constants */ #ifndef TRUE @@ -427,33 +433,34 @@ typedef struct krb5_cc_cache_cursor_data *krb5_cc_cache_cursor; typedef struct krb5_cc_ops { int version; const char *prefix; - const char* (*get_name)(krb5_context, krb5_ccache); - krb5_error_code (*resolve)(krb5_context, krb5_ccache *, const char *); - krb5_error_code (*gen_new)(krb5_context, krb5_ccache *); - krb5_error_code (*init)(krb5_context, krb5_ccache, krb5_principal); - krb5_error_code (*destroy)(krb5_context, krb5_ccache); - krb5_error_code (*close)(krb5_context, krb5_ccache); - krb5_error_code (*store)(krb5_context, krb5_ccache, krb5_creds*); - krb5_error_code (*retrieve)(krb5_context, krb5_ccache, - krb5_flags, const krb5_creds*, krb5_creds *); - krb5_error_code (*get_princ)(krb5_context, krb5_ccache, krb5_principal*); - krb5_error_code (*get_first)(krb5_context, krb5_ccache, krb5_cc_cursor *); - krb5_error_code (*get_next)(krb5_context, krb5_ccache, - krb5_cc_cursor*, krb5_creds*); - krb5_error_code (*end_get)(krb5_context, krb5_ccache, krb5_cc_cursor*); - krb5_error_code (*remove_cred)(krb5_context, krb5_ccache, - krb5_flags, krb5_creds*); - krb5_error_code (*set_flags)(krb5_context, krb5_ccache, krb5_flags); - int (*get_version)(krb5_context, krb5_ccache); - krb5_error_code (*get_cache_first)(krb5_context, krb5_cc_cursor *); - krb5_error_code (*get_cache_next)(krb5_context, krb5_cc_cursor, krb5_ccache *); - krb5_error_code (*end_cache_get)(krb5_context, krb5_cc_cursor); - krb5_error_code (*move)(krb5_context, krb5_ccache, krb5_ccache); - krb5_error_code (*get_default_name)(krb5_context, char **); - krb5_error_code (*set_default)(krb5_context, krb5_ccache); - krb5_error_code (*lastchange)(krb5_context, krb5_ccache, krb5_timestamp *); - krb5_error_code (*set_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat); - krb5_error_code (*get_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat *); + const char* (KRB5_CALLCONV * get_name)(krb5_context, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, krb5_ccache *, const char *); + krb5_error_code (KRB5_CALLCONV * gen_new)(krb5_context, krb5_ccache *); + krb5_error_code (KRB5_CALLCONV * init)(krb5_context, krb5_ccache, krb5_principal); + krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * store)(krb5_context, krb5_ccache, krb5_creds*); + krb5_error_code (KRB5_CALLCONV * retrieve)(krb5_context, krb5_ccache, + krb5_flags, const krb5_creds*, krb5_creds *); + krb5_error_code (KRB5_CALLCONV * get_princ)(krb5_context, krb5_ccache, krb5_principal*); + krb5_error_code (KRB5_CALLCONV * get_first)(krb5_context, krb5_ccache, krb5_cc_cursor *); + krb5_error_code (KRB5_CALLCONV * get_next)(krb5_context, krb5_ccache, + krb5_cc_cursor*, krb5_creds*); + krb5_error_code (KRB5_CALLCONV * end_get)(krb5_context, krb5_ccache, krb5_cc_cursor*); + krb5_error_code (KRB5_CALLCONV * remove_cred)(krb5_context, krb5_ccache, + krb5_flags, krb5_creds*); + krb5_error_code (KRB5_CALLCONV * set_flags)(krb5_context, krb5_ccache, krb5_flags); + int (KRB5_CALLCONV * get_version)(krb5_context, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * get_cache_first)(krb5_context, krb5_cc_cursor *); + krb5_error_code (KRB5_CALLCONV * get_cache_next)(krb5_context, krb5_cc_cursor, + krb5_ccache *); + krb5_error_code (KRB5_CALLCONV * end_cache_get)(krb5_context, krb5_cc_cursor); + krb5_error_code (KRB5_CALLCONV * move)(krb5_context, krb5_ccache, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * get_default_name)(krb5_context, char **); + krb5_error_code (KRB5_CALLCONV * set_default)(krb5_context, krb5_ccache); + krb5_error_code (KRB5_CALLCONV * lastchange)(krb5_context, krb5_ccache, krb5_timestamp *); + krb5_error_code (KRB5_CALLCONV * set_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat); + krb5_error_code (KRB5_CALLCONV * get_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat *); } krb5_cc_ops; struct krb5_log_facility; @@ -523,18 +530,18 @@ typedef struct krb5_keytab_data *krb5_keytab; struct krb5_keytab_data { const char *prefix; - krb5_error_code (*resolve)(krb5_context, const char*, krb5_keytab); - krb5_error_code (*get_name)(krb5_context, krb5_keytab, char*, size_t); - krb5_error_code (*close)(krb5_context, krb5_keytab); - krb5_error_code (*destroy)(krb5_context, krb5_keytab); - krb5_error_code (*get)(krb5_context, krb5_keytab, krb5_const_principal, - krb5_kvno, krb5_enctype, krb5_keytab_entry*); - krb5_error_code (*start_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); - krb5_error_code (*next_entry)(krb5_context, krb5_keytab, - krb5_keytab_entry*, krb5_kt_cursor*); - krb5_error_code (*end_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); - krb5_error_code (*add)(krb5_context, krb5_keytab, krb5_keytab_entry*); - krb5_error_code (*remove)(krb5_context, krb5_keytab, krb5_keytab_entry*); + krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, const char*, krb5_keytab); + krb5_error_code (KRB5_CALLCONV * get_name)(krb5_context, krb5_keytab, char*, size_t); + krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_keytab); + krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_keytab); + krb5_error_code (KRB5_CALLCONV * get)(krb5_context, krb5_keytab, krb5_const_principal, + krb5_kvno, krb5_enctype, krb5_keytab_entry*); + krb5_error_code (KRB5_CALLCONV * start_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); + krb5_error_code (KRB5_CALLCONV * next_entry)(krb5_context, krb5_keytab, + krb5_keytab_entry*, krb5_kt_cursor*); + krb5_error_code (KRB5_CALLCONV * end_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); + krb5_error_code (KRB5_CALLCONV * add)(krb5_context, krb5_keytab, krb5_keytab_entry*); + krb5_error_code (KRB5_CALLCONV * remove)(krb5_context, krb5_keytab, krb5_keytab_entry*); void *data; int32_t version; }; @@ -606,8 +613,8 @@ typedef struct { extern const char *heimdal_version, *heimdal_long_version; -typedef void (*krb5_log_log_func_t)(const char*, const char*, void*); -typedef void (*krb5_log_close_func_t)(void*); +typedef void (KRB5_CALLCONV * krb5_log_log_func_t)(const char*, const char*, void*); +typedef void (KRB5_CALLCONV * krb5_log_close_func_t)(void*); typedef struct krb5_log_facility { char *program; @@ -642,28 +649,28 @@ typedef struct _krb5_prompt { krb5_prompt_type type; } krb5_prompt; -typedef int (*krb5_prompter_fct)(krb5_context /*context*/, - void * /*data*/, - const char * /*name*/, - const char * /*banner*/, - int /*num_prompts*/, - krb5_prompt /*prompts*/[]); -typedef krb5_error_code (*krb5_key_proc)(krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_salt /*salt*/, - krb5_const_pointer /*keyseed*/, - krb5_keyblock ** /*key*/); -typedef krb5_error_code (*krb5_decrypt_proc)(krb5_context /*context*/, - krb5_keyblock * /*key*/, - krb5_key_usage /*usage*/, - krb5_const_pointer /*decrypt_arg*/, - krb5_kdc_rep * /*dec_rep*/); -typedef krb5_error_code (*krb5_s2k_proc)(krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_const_pointer /*keyseed*/, - krb5_salt /*salt*/, - krb5_data * /*s2kparms*/, - krb5_keyblock ** /*key*/); +typedef int (KRB5_CALLCONV * krb5_prompter_fct)(krb5_context /*context*/, + void * /*data*/, + const char * /*name*/, + const char * /*banner*/, + int /*num_prompts*/, + krb5_prompt /*prompts*/[]); +typedef krb5_error_code (KRB5_CALLCONV * krb5_key_proc)(krb5_context /*context*/, + krb5_enctype /*type*/, + krb5_salt /*salt*/, + krb5_const_pointer /*keyseed*/, + krb5_keyblock ** /*key*/); +typedef krb5_error_code (KRB5_CALLCONV * krb5_decrypt_proc)(krb5_context /*context*/, + krb5_keyblock * /*key*/, + krb5_key_usage /*usage*/, + krb5_const_pointer /*decrypt_arg*/, + krb5_kdc_rep * /*dec_rep*/); +typedef krb5_error_code (KRB5_CALLCONV * krb5_s2k_proc)(krb5_context /*context*/, + krb5_enctype /*type*/, + krb5_const_pointer /*keyseed*/, + krb5_salt /*salt*/, + krb5_data * /*s2kparms*/, + krb5_keyblock ** /*key*/); struct _krb5_get_init_creds_opt_private; @@ -760,12 +767,9 @@ enum { KRB5_KRBHST_FLAGS_LARGE_MSG = 2 }; -typedef krb5_error_code (*krb5_send_to_kdc_func)(krb5_context, - void *, - krb5_krbhst_info *, - time_t, - const krb5_data *, - krb5_data *); +typedef krb5_error_code +(KRB5_CALLCONV * krb5_send_to_kdc_func)(krb5_context, void *, krb5_krbhst_info *, time_t, + const krb5_data *, krb5_data *); /** flags for krb5_parse_name_flags */ enum { @@ -787,7 +791,9 @@ typedef struct krb5_sendto_ctx_data *krb5_sendto_ctx; #define KRB5_SENDTO_RESTART 1 #define KRB5_SENDTO_CONTINUE 2 -typedef krb5_error_code (*krb5_sendto_ctx_func)(krb5_context, krb5_sendto_ctx, void *, const krb5_data *, int *); +typedef krb5_error_code +(KRB5_CALLCONV * krb5_sendto_ctx_func)(krb5_context, krb5_sendto_ctx, void *, + const krb5_data *, int *); struct krb5_plugin; enum krb5_plugin_type { @@ -831,7 +837,7 @@ typedef struct { } krb5_last_req_entry; typedef krb5_error_code -(*krb5_gic_process_last_req)(krb5_context, krb5_last_req_entry **, void *); +(KRB5_CALLCONV * krb5_gic_process_last_req)(krb5_context, krb5_last_req_entry **, void *); /* * diff --git a/lib/krb5/libkrb5-exports.def.in b/lib/krb5/libkrb5-exports.def.in index 94c0a4f35..4cad0749e 100644 --- a/lib/krb5/libkrb5-exports.def.in +++ b/lib/krb5/libkrb5-exports.def.in @@ -41,6 +41,7 @@ EXPORTS krb5_auth_con_getlocalseqnumber krb5_auth_con_getlocalsubkey krb5_auth_con_getrcache + krb5_auth_con_getremoteseqnumber krb5_auth_con_getremotesubkey krb5_auth_con_init krb5_auth_con_removeflags @@ -87,6 +88,7 @@ EXPORTS krb5_cc_clear_mcred krb5_cc_close krb5_cc_copy_cache + krb5_cc_copy_creds krb5_cc_copy_match_f krb5_cc_default krb5_cc_default_name @@ -108,7 +110,7 @@ EXPORTS krb5_cc_move krb5_cc_new_unique krb5_cc_next_cred -; krb5_cc_next_cred_match +;! krb5_cc_next_cred_match krb5_cc_register krb5_cc_remove_cred krb5_cc_resolve @@ -138,13 +140,13 @@ EXPORTS krb5_compare_creds krb5_config_file_free krb5_config_free_strings - _krb5_config_get +; _krb5_config_get krb5_config_get_bool krb5_config_get_bool_default krb5_config_get_int krb5_config_get_int_default krb5_config_get_list - _krb5_config_get_next +; _krb5_config_get_next krb5_config_get_string krb5_config_get_string_default krb5_config_get_strings @@ -153,13 +155,13 @@ EXPORTS krb5_config_parse_file krb5_config_parse_file_multi krb5_config_parse_string_multi - _krb5_config_vget +; _krb5_config_vget krb5_config_vget_bool krb5_config_vget_bool_default krb5_config_vget_int krb5_config_vget_int_default krb5_config_vget_list - _krb5_config_vget_next +; _krb5_config_vget_next krb5_config_vget_string krb5_config_vget_string_default krb5_config_vget_strings @@ -333,12 +335,12 @@ EXPORTS krb5_get_host_realm krb5_get_ignore_addresses krb5_get_in_cred - krb5_cccol_last_change_time +; krb5_cccol_last_change_time krb5_get_in_tkt krb5_get_in_tkt_with_keytab krb5_get_in_tkt_with_password krb5_get_in_tkt_with_skey -; krb5_get_init_creds +;! krb5_get_init_creds krb5_get_init_creds_keyblock krb5_get_init_creds_keytab krb5_get_init_creds_opt_alloc @@ -483,8 +485,10 @@ EXPORTS krb5_principal_compare krb5_principal_compare_any_realm krb5_principal_get_comp_string + krb5_principal_get_num_comp krb5_principal_get_realm krb5_principal_get_type + krb5_principal_is_krbtgt krb5_principal_match krb5_principal_set_realm krb5_principal_set_type @@ -730,7 +734,6 @@ EXPORTS _krb5_krb_dest_tkt _krb5_krb_life_to_time _krb5_krb_decomp_ticket - _krb5_krb_decomp_ticket _krb5_krb_create_ticket _krb5_krb_create_ciph _krb5_krb_create_auth_reply @@ -758,13 +761,13 @@ EXPORTS _krb5_principalname2krb5_principal _krb5_put_int _krb5_s4u2self_to_checksumdata - _krb5_expand_path_tokens + _krb5_expand_path_tokens ;! ; kinit helper _krb5_get_init_creds_opt_set_pkinit_user_certs _krb5_pk_enterprise_cert ; testing -; _krb5_aes_cts_encrypt +;! _krb5_aes_cts_encrypt _krb5_n_fold _krb5_expand_default_cc_name diff --git a/lib/krb5/log.c b/lib/krb5/log.c index 5b518ac31..ca0756fdb 100644 --- a/lib/krb5/log.c +++ b/lib/krb5/log.c @@ -165,7 +165,7 @@ struct _heimdal_syslog_data{ int priority; }; -static void +static void KRB5_CALLCONV log_syslog(const char *timestr, const char *msg, void *data) @@ -175,7 +175,7 @@ log_syslog(const char *timestr, syslog(s->priority, "%s", msg); } -static void +static void KRB5_CALLCONV close_syslog(void *data) { free(data); @@ -215,7 +215,7 @@ struct file_data{ int keep_open; }; -static void +static void KRB5_CALLCONV log_file(const char *timestr, const char *msg, void *data) @@ -241,7 +241,7 @@ log_file(const char *timestr, } } -static void +static void KRB5_CALLCONV close_file(void *data) { struct file_data *f = data; diff --git a/lib/krb5/mcache.c b/lib/krb5/mcache.c index ee95b4f32..19e6b2345 100644 --- a/lib/krb5/mcache.c +++ b/lib/krb5/mcache.c @@ -56,14 +56,14 @@ static struct krb5_mcache *mcc_head; #define MISDEAD(X) ((X)->dead) -static const char* +static const char* KRB5_CALLCONV mcc_get_name(krb5_context context, krb5_ccache id) { return MCACHE(id)->name; } -static krb5_mcache * +static krb5_mcache * KRB5_CALLCONV mcc_alloc(const char *name) { krb5_mcache *m, *m_c; @@ -104,7 +104,7 @@ mcc_alloc(const char *name) return m; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_resolve(krb5_context context, krb5_ccache *id, const char *res) { krb5_mcache *m; @@ -136,7 +136,7 @@ mcc_resolve(krb5_context context, krb5_ccache *id, const char *res) } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_gen_new(krb5_context context, krb5_ccache *id) { krb5_mcache *m; @@ -155,7 +155,7 @@ mcc_gen_new(krb5_context context, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_initialize(krb5_context context, krb5_ccache id, krb5_principal primary_principal) @@ -181,7 +181,7 @@ mcc_close_internal(krb5_mcache *m) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_close(krb5_context context, krb5_ccache id) { @@ -190,7 +190,7 @@ mcc_close(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_destroy(krb5_context context, krb5_ccache id) { @@ -231,7 +231,7 @@ mcc_destroy(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_store_cred(krb5_context context, krb5_ccache id, krb5_creds *creds) @@ -262,7 +262,7 @@ mcc_store_cred(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *principal) @@ -276,7 +276,7 @@ mcc_get_principal(krb5_context context, principal); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_first (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -290,7 +290,7 @@ mcc_get_first (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_next (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, @@ -312,7 +312,7 @@ mcc_get_next (krb5_context context, return KRB5_CC_END; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -320,7 +320,7 @@ mcc_end_get (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_remove_cred(krb5_context context, krb5_ccache id, krb5_flags which, @@ -340,7 +340,7 @@ mcc_remove_cred(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) @@ -352,7 +352,7 @@ struct mcache_iter { krb5_mcache *cache; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) { struct mcache_iter *iter; @@ -374,7 +374,7 @@ mcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) { struct mcache_iter *iter = cursor; @@ -401,7 +401,7 @@ mcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) { struct mcache_iter *iter = cursor; @@ -413,7 +413,7 @@ mcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) { krb5_mcache *mfrom = MCACHE(from), *mto = MCACHE(to); @@ -448,7 +448,7 @@ mcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_default_name(krb5_context context, char **str) { *str = strdup("MEMORY:"); @@ -460,14 +460,14 @@ mcc_default_name(krb5_context context, char **str) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) { *mtime = MCACHE(id)->mtime; return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) { krb5_mcache *m = MCACHE(id); @@ -475,7 +475,7 @@ mcc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV mcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset) { krb5_mcache *m = MCACHE(id); diff --git a/lib/krb5/prompter_posix.c b/lib/krb5/prompter_posix.c index 875fd99c4..1bf748c51 100644 --- a/lib/krb5/prompter_posix.c +++ b/lib/krb5/prompter_posix.c @@ -33,7 +33,7 @@ #include "krb5_locl.h" -KRB5_LIB_FUNCTION int +KRB5_LIB_FUNCTION int KRB5_CALLCONV krb5_prompter_posix (krb5_context context, void *data, const char *name, diff --git a/lib/krb5/scache.c b/lib/krb5/scache.c index ae9a18279..cc65cb34c 100644 --- a/lib/krb5/scache.c +++ b/lib/krb5/scache.c @@ -293,7 +293,7 @@ out: -static krb5_scache * +static krb5_scache * KRB5_CALLCONV scc_alloc(krb5_context context, const char *name) { krb5_error_code ret; @@ -478,14 +478,14 @@ bind_principal(krb5_context context, * */ -static const char* +static const char* KRB5_CALLCONV scc_get_name(krb5_context context, krb5_ccache id) { return SCACHE(id)->name; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_resolve(krb5_context context, krb5_ccache *id, const char *res) { krb5_scache *s; @@ -536,7 +536,7 @@ scc_resolve(krb5_context context, krb5_ccache *id, const char *res) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_gen_new(krb5_context context, krb5_ccache *id) { krb5_scache *s; @@ -555,7 +555,7 @@ scc_gen_new(krb5_context context, krb5_ccache *id) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_initialize(krb5_context context, krb5_ccache id, krb5_principal primary_principal) @@ -619,7 +619,7 @@ rollback: } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_close(krb5_context context, krb5_ccache id) { @@ -627,7 +627,7 @@ scc_close(krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_destroy(krb5_context context, krb5_ccache id) { @@ -705,7 +705,7 @@ decode_creds(krb5_context context, const void *data, size_t length, } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_store_cred(krb5_context context, krb5_ccache id, krb5_creds *creds) @@ -813,7 +813,7 @@ rollback: return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *principal) @@ -869,7 +869,7 @@ struct cred_ctx { sqlite3_stmt *credstmt; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_first (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -975,7 +975,7 @@ scc_get_first (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_next (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor, @@ -1028,7 +1028,7 @@ next: return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_end_get (krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor) @@ -1047,7 +1047,7 @@ scc_end_get (krb5_context context, return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_remove_cred(krb5_context context, krb5_ccache id, krb5_flags which, @@ -1137,7 +1137,7 @@ scc_remove_cred(krb5_context context, return ret; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags) @@ -1151,7 +1151,7 @@ struct cache_iter { sqlite3_stmt *stmt; }; -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) { struct cache_iter *ctx; @@ -1242,7 +1242,7 @@ scc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) @@ -1277,7 +1277,7 @@ again: return scc_resolve(context, id, name); } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) { struct cache_iter *ctx = cursor; @@ -1290,7 +1290,7 @@ scc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_move(krb5_context context, krb5_ccache from, krb5_ccache to) { krb5_scache *sfrom = SCACHE(from); @@ -1359,7 +1359,7 @@ rollback: return KRB5_CC_IO; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_get_default_name(krb5_context context, char **str) { krb5_error_code ret; @@ -1381,7 +1381,7 @@ scc_get_default_name(krb5_context context, char **str) return 0; } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV scc_set_default(krb5_context context, krb5_ccache id) { krb5_scache *s = SCACHE(id); diff --git a/lib/krb5/send_to_kdc.c b/lib/krb5/send_to_kdc.c index 101f400d5..2ae8153c8 100644 --- a/lib/krb5/send_to_kdc.c +++ b/lib/krb5/send_to_kdc.c @@ -648,7 +648,7 @@ krb5_sendto_context(krb5_context context, return ret; } -krb5_error_code +krb5_error_code KRB5_CALLCONV _krb5_kdc_retry(krb5_context context, krb5_sendto_ctx ctx, void *data, const krb5_data *reply, int *action) { diff --git a/lib/krb5/ticket.c b/lib/krb5/ticket.c index 4fffc6bae..72e1f7b5e 100644 --- a/lib/krb5/ticket.c +++ b/lib/krb5/ticket.c @@ -602,7 +602,7 @@ noreferral: } -static krb5_error_code +static krb5_error_code KRB5_CALLCONV decrypt_tkt (krb5_context context, krb5_keyblock *key, krb5_key_usage usage, diff --git a/lib/krb5/verify_krb5_conf-version.rc b/lib/krb5/verify_krb5_conf-version.rc new file mode 100644 index 000000000..f7d90dfae --- /dev/null +++ b/lib/krb5/verify_krb5_conf-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_APP +#define RC_FILE_DESC_0409 "Krb5.conf Verification Tool" +#define RC_FILE_ORIG_0409 "verify_krb5_conf.exe" + +#include "../../windows/version.rc" diff --git a/lib/ntlm/NTMakefile b/lib/ntlm/NTMakefile index 029c3ff0c..dad338c43 100644 --- a/lib/ntlm/NTMakefile +++ b/lib/ntlm/NTMakefile @@ -44,9 +44,11 @@ $(OBJ)\heimntlm-protos.h: $(libheimntlm_la_SOURCES) !ifndef STATICLIBS +RES=$(OBJ)\libheimntlm-version.res + $(LIBHEIMNTLM): $(BINDIR)\libheimntlm.dll -$(BINDIR)\libheimntlm.dll: $(OBJ)\ntlm.obj $(LIBKRB5) $(LIBHCRYPTO) +$(BINDIR)\libheimntlm.dll: $(OBJ)\ntlm.obj $(LIBHEIMDAL) $(RES) $(DLLGUILINK) -def:libheimntlm-exports.def -implib:$(LIBHEIMNTLM) $(DLLPREP) @@ -67,9 +69,13 @@ test-run: test_ntlm.exe cd $(SRCDIR) -$(OBJ)\test_ntlm.exe: $(OBJ)\test_ntlm.obj $(LIBHEIMNTLM) $(LIBKRB5) $(LIBVERS) $(LIBROKEN) $(LIBHCRYPTO) $(LIBASN1) +$(OBJ)\test_ntlm.exe: $(OBJ)\test_ntlm.obj $(LIBHEIMNTLM) $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) test:: test-binaries test-run + +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libheimntlm-exports.def + +test:: test-exports diff --git a/lib/ntlm/libheimntlm-version.rc b/lib/ntlm/libheimntlm-version.rc new file mode 100644 index 000000000..2055c9d67 --- /dev/null +++ b/lib/ntlm/libheimntlm-version.rc @@ -0,0 +1,36 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +#define RC_FILE_TYPE VFT_DLL +#define RC_FILE_DESC_0409 "Heimdal NTLM Support Library" +#define RC_FILE_ORIG_0409 "libheimntlm.dll" + +#include "../../windows/version.rc" diff --git a/lib/ntlm/ntlm.c b/lib/ntlm/ntlm.c index 71f96bfce..8390d79ac 100644 --- a/lib/ntlm/ntlm.c +++ b/lib/ntlm/ntlm.c @@ -222,8 +222,6 @@ ret_string(krb5_storage *sp, int ucs2, struct sec_buffer *desc, char **s) ret = 0; out: return ret; - - return 0; } static krb5_error_code @@ -485,6 +483,10 @@ heim_ntlm_encode_type1(const struct ntlm_type1 *type1, struct ntlm_buf *data) domain.offset = base; domain.length = len_string(0, type1->domain); domain.allocated = domain.length; + } else { + domain.offset = 0; + domain.length = 0; + domain.allocated = 0; } if (type1->hostname) { hostname.offset = domain.allocated + domain.offset; diff --git a/lib/roken/NTMakefile b/lib/roken/NTMakefile index 2ae2aa0f8..3c626f79c 100644 --- a/lib/roken/NTMakefile +++ b/lib/roken/NTMakefile @@ -65,8 +65,6 @@ libroken_la_OBJS = \ $(OBJ)\hex.obj \ $(OBJ)\hostent_find_fqdn.obj \ $(OBJ)\inet_aton.obj \ - $(OBJ)\inet_ntop.obj \ - $(OBJ)\inet_pton.obj \ $(OBJ)\issuid.obj \ $(OBJ)\lstat.obj \ $(OBJ)\mini_inetd.obj \ @@ -112,8 +110,14 @@ libroken_la_OBJS = \ $(OBJ)\warnx.obj \ $(OBJ)\xfree.obj -{}.c{$(OBJ)}.obj: - $(C2OBJ) -DBUILD_ROKEN_LIB +!if $(NMAKE_WINVER) < 0x0600 +libroken_la_OBJS=$(libroken_la_OBJS) \ + $(OBJ)\inet_ntop.obj \ + $(OBJ)\inet_pton.obj +!endif + +{}.c{$(OBJ)}.obj:: + $(C2OBJ_P) -DBUILD_ROKEN_LIB $(LIBROKEN): $(libroken_la_OBJS) $(LIBCON_C) -out:$@ @<< @@ -196,7 +200,7 @@ $(OBJ)\resolve_test.obj: resolve.c $(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB $(OBJ)\parse_reply-test.exe: $(OBJ)\parse_reply-test.obj $(OBJ)\resolve_test.obj $(LIBROKEN) - $(EXECONLINK) + $(EXECONLINK) DnsAPI.lib $(OBJ)\test-readenv.exe: $(OBJ)\test-readenv.obj $(OBJ)\test-mem.obj $(LIBROKEN) $(EXECONLINK) @@ -217,7 +221,7 @@ $(OBJ)\snprintf-test.exe: $(OBJ)\snprintf-test.obj $(OBJ)\libtest.lib $(LIBROKEN $(EXECONLINK) $(OBJ)\resolve-test.exe: $(OBJ)\resolve-test.obj $(LIBROKEN) - $(EXECONLINK) + $(EXECONLINK) DnsAPI.lib $(OBJ)\base64-test.exe: $(OBJ)\base64-test.obj $(OBJ)\base64.obj $(EXECONLINK) diff --git a/lib/roken/base64.c b/lib/roken/base64.c index 4c06bd2d1..394e9841c 100644 --- a/lib/roken/base64.c +++ b/lib/roken/base64.c @@ -93,7 +93,7 @@ base64_encode(const void *data, int size, char **str) } *p = 0; *str = s; - return strlen(s); + return (int) strlen(s); } #define DECODE_ERROR 0xffffffff diff --git a/lib/roken/concat.c b/lib/roken/concat.c index 2ae777d5d..78d8b4f8e 100644 --- a/lib/roken/concat.c +++ b/lib/roken/concat.c @@ -100,7 +100,7 @@ roken_vmconcat (char **s, size_t max_len, va_list args) ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL roken_mconcat (char **s, size_t max_len, ...) { - int ret; + size_t ret; va_list args; va_start(args, max_len); diff --git a/lib/roken/dirent.c b/lib/roken/dirent.c index 7e16bc84d..a0301e207 100644 --- a/lib/roken/dirent.c +++ b/lib/roken/dirent.c @@ -87,7 +87,7 @@ opendir(const char * filespec) } do { - long len = strlen(fd.name); + size_t len = strlen(fd.name); struct dirent * e; if (dp->n_entries == dp->nc_entries) { diff --git a/lib/roken/dlfcn.h b/lib/roken/dlfcn.h index d0972573d..bca8cb054 100644 --- a/lib/roken/dlfcn.h +++ b/lib/roken/dlfcn.h @@ -42,7 +42,11 @@ #endif #endif +#ifdef _WIN32 +typedef int (__stdcall *DLSYM_RET_TYPE)(); +#else #define DLSYM_RET_TYPE void * +#endif #ifdef __cplusplus extern "C" diff --git a/lib/roken/dlfcn_w32.c b/lib/roken/dlfcn_w32.c index 713887330..08005f70c 100644 --- a/lib/roken/dlfcn_w32.c +++ b/lib/roken/dlfcn_w32.c @@ -91,6 +91,6 @@ dlsym(void * vhm, const char * func_name) { HMODULE hm = (HMODULE) vhm; - return GetProcAddress(hm, func_name); + return (DLSYM_RET_TYPE)(ULONG_PTR)GetProcAddress(hm, func_name); } diff --git a/lib/roken/getarg.c b/lib/roken/getarg.c index d182f0019..e7dc74b7b 100644 --- a/lib/roken/getarg.c +++ b/lib/roken/getarg.c @@ -223,7 +223,7 @@ arg_printusage_i18n (struct getargs *args, const char *usage, const char *progname, const char *extra_string, - char *(i18n)(const char *)) + char *(*i18n)(const char *)) { size_t i, max_len = 0; char buf[128]; @@ -475,9 +475,6 @@ arg_match_long(struct getargs *args, size_t num_args, abort (); UNREACHABLE(return 0); } - - /* not reached */ - return ARG_ERR_NO_MATCH; } static int diff --git a/lib/roken/getarg.h b/lib/roken/getarg.h index 79573a0ea..1065c7c66 100644 --- a/lib/roken/getarg.h +++ b/lib/roken/getarg.h @@ -104,7 +104,7 @@ arg_printusage_i18n (struct getargs *args, const char *usage, const char *progname, const char *extra_string, - char *(i18n)(const char *)); + char *(*i18n)(const char *)); ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL free_getarg_strings (getarg_strings *); diff --git a/lib/roken/getifaddrs_w32.c b/lib/roken/getifaddrs_w32.c index 96ab497fc..ff0250baa 100644 --- a/lib/roken/getifaddrs_w32.c +++ b/lib/roken/getifaddrs_w32.c @@ -77,7 +77,7 @@ rk_getifaddrs(struct ifaddrs **ifpp) ZeroMemory(il, il_len); if (WSAIoctl(s, SIO_GET_INTERFACE_LIST, NULL, 0, - (LPVOID) il, il_len, &cbret, + (LPVOID) il, (DWORD) il_len, &cbret, NULL, NULL) == 0) { il_len = cbret; break; diff --git a/lib/roken/inet_pton.c b/lib/roken/inet_pton.c index 3db1f49f2..e44fb1925 100644 --- a/lib/roken/inet_pton.c +++ b/lib/roken/inet_pton.c @@ -38,8 +38,15 @@ #ifdef HAVE_WINSOCK ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -inet_pton(int af, const char *src, void *dst) +inet_pton(int af, const char *csrc, void *dst) { + char * src; + + if (csrc == NULL || (src = strdup(csrc)) == NULL) { + _set_errno( ENOMEM ); + return 0; + } + switch (af) { case AF_INET: { @@ -49,6 +56,8 @@ inet_pton(int af, const char *src, void *dst) si4.sin_family = AF_INET; r = WSAStringToAddress(src, AF_INET, NULL, (LPSOCKADDR) &si4, &s); + free(src); + src = NULL; if (r == 0) { memcpy(dst, &si4.sin_addr, sizeof(si4.sin_addr)); @@ -65,6 +74,8 @@ inet_pton(int af, const char *src, void *dst) si6.sin6_family = AF_INET6; r = WSAStringToAddress(src, AF_INET6, NULL, (LPSOCKADDR) &si6, &s); + free(src); + src = NULL; if (r == 0) { memcpy(dst, &si6.sin6_addr, sizeof(si6.sin6_addr)); diff --git a/lib/roken/mini_inetd.c b/lib/roken/mini_inetd.c index 4d8ccb6e5..a9398f4fd 100644 --- a/lib/roken/mini_inetd.c +++ b/lib/roken/mini_inetd.c @@ -124,7 +124,7 @@ mini_inetd_addrinfo (struct addrinfo *ai, rk_socket_t *ret_socket) fds[i] = rk_INVALID_SOCKET; continue; } -#ifdef FD_SETSIZE +#ifndef NO_LIMIT_FD_SETSIZE if (fds[i] >= FD_SETSIZE) errx (1, "fd too large"); #endif diff --git a/lib/roken/parse_time-test.c b/lib/roken/parse_time-test.c index 10c0f6dea..83a18ed77 100644 --- a/lib/roken/parse_time-test.c +++ b/lib/roken/parse_time-test.c @@ -85,15 +85,15 @@ main(int argc, char **argv) buf = rk_test_mem_alloc(RK_TM_UNDERRUN, "underrun", NULL, tests[i].size); - sz = unparse_time(tests[i].val, buf, buf_sz); + sz = unparse_time(tests[i].val, buf, min(buf_sz, tests[i].size)); if (sz != tests[i].size) errx(1, "sz (%lu) != tests[%d].size (%lu) with insize %lu", (unsigned long)sz, i, (unsigned long)tests[i].size, (unsigned long)buf_sz); - if (buf_sz > 0 && strncmp(buf, tests[i].str, buf_sz - 1) != 0) + if (buf_sz > 0 && strncmp(buf, tests[i].str, min(buf_sz, tests[i].size) - 1) != 0) errx(1, "test %i wrong result %s vs %s", i, buf, tests[i].str); - if (buf_sz > 0 && buf[buf_sz - 1] != '\0') + if (buf_sz > 0 && buf[min(buf_sz, tests[i].size) - 1] != '\0') errx(1, "test %i not zero terminated", i); rk_test_mem_free("underrun"); } diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index e36b25f45..561257fff 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -68,7 +68,8 @@ typedef SOCKET rk_socket_t; #define rk_IS_BAD_SOCKET(s) ((s) == INVALID_SOCKET) #define rk_IS_SOCKET_ERROR(rv) ((rv) == SOCKET_ERROR) #define rk_SOCK_ERRNO WSAGetLastError() -#define rk_SOCK_IOCTL(s,c,a) ioctlsocket((s),(c),(a)) + +ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_SOCK_IOCTL(SOCKET s, long cmd, int * argp); #define ETIMEDOUT WSAETIMEDOUT #define EWOULDBLOCK WSAEWOULDBLOCK @@ -124,6 +125,32 @@ typedef uint64_t u_int64_t; #define UNREACHABLE(x) x #define UNUSED_ARGUMENT(x) ((void) x) +#define RETSIGTYPE void + +#define VOID_RETSIGTYPE 1 + +#ifdef VOID_RETSIGTYPE +#define SIGRETURN(x) return +#else +#define SIGRETURN(x) return (RETSIGTYPE)(x) +#endif + +#ifndef CPP_ONLY + +typedef int pid_t; + +typedef unsigned int gid_t; + +typedef unsigned int uid_t; + +typedef unsigned short mode_t; + +#endif + +#ifndef __cplusplus +#define inline __inline +#endif + #else #define UNREACHABLE(x) @@ -315,6 +342,32 @@ rk_vsnprintf (char *str, size_t sz, const char *format, va_list args); #endif /* _MSC_VER */ +#ifdef HAVE_WINSOCK + +/* While we are at it, define WinSock specific scatter gather socket + I/O. */ + +#define iovec _WSABUF +#define iov_base buf +#define iov_len len + +struct msghdr { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + size_t msg_iovlen; + void *msg_control; + socklen_t msg_controllen; + int msg_flags; +}; + +#define sendmsg sendmsg_w32 + +ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL +sendmsg_w32(rk_socket_t s, const struct msghdr * msg, int flags); + +#endif /* HAVE_WINSOCK */ + #ifndef HAVE_PUTENV #define putenv rk_putenv ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL putenv(const char *); @@ -824,32 +877,6 @@ ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL gai_strerror(int); #endif -#ifdef HAVE_WINSOCK - -/* While we are at it, define WinSock specific scatter gather socket - I/O. */ - -#define iovec _WSABUF -#define iov_base buf -#define iov_len len - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - size_t msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; -}; - -#define sendmsg sendmsg_w32 - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -sendmsg_w32(rk_socket_t s, const struct msghdr * msg, int flags); - -#endif - #ifdef NO_SLEEP ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL diff --git a/lib/roken/simple_exec_w32.c b/lib/roken/simple_exec_w32.c index ae778ce60..83ef6f9b5 100644 --- a/lib/roken/simple_exec_w32.c +++ b/lib/roken/simple_exec_w32.c @@ -80,7 +80,6 @@ wait_for_process_timed(pid_t pid, time_t (*func)(void *), hProcess = OpenProcess(SYNCHRONIZE, FALSE, pid); if (hProcess == NULL) { - DWORD dw = GetLastError(); return SE_E_WAITPIDFAILED; } diff --git a/lib/roken/snprintf.c b/lib/roken/snprintf.c index a20054672..5fffe63ee 100644 --- a/lib/roken/snprintf.c +++ b/lib/roken/snprintf.c @@ -498,7 +498,7 @@ xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap) break; } case 'p' : { - unsigned long arg = (unsigned long)va_arg(ap, void*); + u_longest arg = (u_longest)va_arg(ap, void*); len += append_number (state, arg, 0x10, "0123456789ABCDEF", width, prec, flags, 0); diff --git a/lib/roken/socket.c b/lib/roken/socket.c index bd800ac5a..ef594ffd0 100644 --- a/lib/roken/socket.c +++ b/lib/roken/socket.c @@ -316,6 +316,19 @@ socket_to_fd(rk_socket_t sock, int flags) #endif } +#ifdef HAVE_WINSOCK +ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL +rk_SOCK_IOCTL(SOCKET s, long cmd, int * argp) { + u_long ul = (argp)? *argp : 0; + int rv; + + rv = ioctlsocket(s, cmd, &ul); + if (argp) + *argp = (int) ul; + return rv; +} +#endif + #ifndef HEIMDAL_SMALLER #undef socket diff --git a/lib/roken/test-mini_inetd.c b/lib/roken/test-mini_inetd.c index 89571cd5b..04a72c58a 100644 --- a/lib/roken/test-mini_inetd.c +++ b/lib/roken/test-mini_inetd.c @@ -253,7 +253,7 @@ do_client(void) { int rv = 0; - SOCK_INIT; + rk_SOCK_INIT(); prog = "Client"; is_client = 1; @@ -262,7 +262,7 @@ do_client(void) rv = test_simple_echo_socket(); - SOCK_EXIT; + rk_SOCK_EXIT(); return rv; } @@ -272,7 +272,7 @@ do_server(void) { int rv = 0; - SOCK_INIT; + rk_SOCK_INIT(); prog = "Server"; @@ -280,7 +280,7 @@ do_server(void) rv = test_simple_echo_socket(); - SOCK_EXIT; + rk_SOCK_EXIT(); return rv; } diff --git a/lib/roken/unvis.c b/lib/roken/unvis.c index ed6ef9dfa..731dde06c 100644 --- a/lib/roken/unvis.c +++ b/lib/roken/unvis.c @@ -126,7 +126,7 @@ rk_unvis(char *cp, int c, int *astate, int flag) *astate = S_OCTAL2; return (0); case 'M': - *cp = (char)0200; + *cp = (u_char)0200; *astate = S_META; return (0); case '^': diff --git a/lib/sl/NTMakefile b/lib/sl/NTMakefile index 34ba643c1..46e32f3d9 100644 --- a/lib/sl/NTMakefile +++ b/lib/sl/NTMakefile @@ -40,8 +40,7 @@ $(LIBSL): $(OBJ)\sl.obj $(BINDIR)\slc.exe: $(OBJ)\slc-gram.obj $(OBJ)\slc-lex.obj $(EXECONLINK) $(LIBROKEN) $(LIBVERS) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP) $(OBJ)\slc-gram.c: slc-gram.y $(YACC) -o $@ --defines=$(@R).h slc-gram.y @@ -57,8 +56,7 @@ $(OBJ)\slc-lex.obj: $(OBJ)\slc-lex.c $(OBJ)\test_sl.exe: $(OBJ)\test_sl.obj $(EXECONLINK) $(LIBSL) $(LIBVERS) $(LIBROKEN) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) all:: $(INCFILES) $(LIBSL) $(BINDIR)\slc.exe diff --git a/lib/vers/NTMakefile b/lib/vers/NTMakefile index db885cf5c..2ae27f7a3 100644 --- a/lib/vers/NTMakefile +++ b/lib/vers/NTMakefile @@ -43,8 +43,7 @@ $(OBJ)\print_version.obj: print_version.c $(OBJ)\make-print-version.exe: $(OBJ)\make-print-version.obj $(EXECONLINK) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXEPREP_NODIST) $(OBJ)\print_version.h: $(OBJ)\make-print-version.exe $(OBJ)\make-print-version.exe $@ diff --git a/lib/wind/NTMakefile b/lib/wind/NTMakefile index 404626d57..a7a32e671 100644 --- a/lib/wind/NTMakefile +++ b/lib/wind/NTMakefile @@ -50,21 +50,9 @@ libwind_OBJs= \ $(OBJ)\wind_err.obj \ $(OBJ)\utf8.obj -!ifndef STATICLIBS - -$(LIBWIND): $(BINDIR)\libwind.dll - -$(BINDIR)\libwind.dll: $(libwind_OBJs) $(LIBCOMERR) - $(DLLGUILINK) -def:libwind-exports.def -implib:$(LIBWIND) - $(DLLPREP) - -!else - $(LIBWIND): $(libwind_OBJs) $(LIBCON) -!endif - INCFILES= \ $(INCDIR)\wind.h \ $(INCDIR)\wind_err.h \ @@ -120,13 +108,12 @@ TEST_BINARIES=\ $(OBJ)\test-ldap.exe \ $(OBJ)\test-utf8.exe -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) -I$(SRCDIR) +{$(OBJ)}.c{$(OBJ)}.obj:: + $(C2OBJ_P) -I$(SRCDIR) {$(OBJ)}.obj{$(OBJ)}.exe: - $(EXECONLINK) $(LIBWIND) $(LIBROKEN) - $(_VC_MANIFEST_EMBED_EXE) - $(_VC_MANIFEST_CLEAN) + $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) + $(EXEPREP_NODIST) $(OBJ)\test-bidi.exe: $(OBJ)\test-bidi.obj @@ -165,3 +152,8 @@ clean:: -$(RM) $(INCFILES) test:: test-binaries test-run + +test-exports: + $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libwind-exports.def + +test:: test-exports diff --git a/lib/wind/errorlist.c b/lib/wind/errorlist.c index b2e221049..c2907832a 100644 --- a/lib/wind/errorlist.c +++ b/lib/wind/errorlist.c @@ -49,7 +49,7 @@ error_entry_cmp(const void *a, const void *b) } int -_wind_stringprep_error(uint32_t cp, wind_profile_flags flags) +_wind_stringprep_error(const uint32_t cp, wind_profile_flags flags) { struct error_entry ee = {cp}; const struct error_entry *s; diff --git a/lib/wind/libwind-exports.def b/lib/wind/libwind-exports.def index 1cb104af9..5a86de1a4 100644 --- a/lib/wind/libwind-exports.def +++ b/lib/wind/libwind-exports.def @@ -20,4 +20,5 @@ EXPORTS _wind_stringprep_map _wind_stringprep_normalize _wind_ldap_case_exact_attribute +;! _wind_ucs2read diff --git a/lib/wind/normalize.c b/lib/wind/normalize.c index 102c577e6..3c68ea866 100644 --- a/lib/wind/normalize.c +++ b/lib/wind/normalize.c @@ -164,13 +164,32 @@ compat_decomp(const uint32_t *in, size_t in_len, return 0; } -static int -cc_cmp(const void *a, const void *b) +static void +swap_char(uint32_t * a, uint32_t * b) { - const uint32_t *ua = (const uint32_t *)a; - const uint32_t *ub = (const uint32_t *)b; + uint32_t t; + t = *a; + *a = *b; + *b = t; +} - return _wind_combining_class(*ua) - _wind_combining_class(*ub); +/* Unicode 5.2.0 D109 Canonical Ordering for a sequence of code points + * that all have Canonical_Combining_Class > 0 */ +static void +canonical_reorder_sequence(uint32_t * a, size_t len) +{ + size_t i, j; + + if (len <= 1) + return; + + for (i = 1; i < len; i++) { + for (j = i; + j > 0 && + _wind_combining_class(a[j]) < _wind_combining_class(a[j-1]); + j--) + swap_char(&a[j], &a[j-1]); + } } static void @@ -186,7 +205,7 @@ canonical_reorder(uint32_t *tmp, size_t tmp_len) j < tmp_len && _wind_combining_class(tmp[j]); ++j) ; - qsort(&tmp[i], j - i, sizeof(tmp[0]), cc_cmp); + canonical_reorder_sequence(&tmp[i], j - i); i = j; } } diff --git a/lib/wind/test-normalize.c b/lib/wind/test-normalize.c index 3c8f70fdd..df3438593 100644 --- a/lib/wind/test-normalize.c +++ b/lib/wind/test-normalize.c @@ -67,6 +67,18 @@ parse_vector(char *buf, uint32_t *v) return ret; } +static void +dump_vector(const char * msg, uint32_t * v, size_t len) +{ + size_t i; + + printf("%s: (%d) ", msg, len); + for (i=0; i < len; i++) { + printf("%s%x", (i > 0? " ":""), v[i]); + } + printf("\n"); +} + static int test(char *buf, unsigned lineno) { @@ -109,11 +121,15 @@ test(char *buf, unsigned lineno) } if (out_len != norm_len) { printf("%u: wrong out len (%s)\n", lineno, c); + dump_vector("Expected", out, out_len); + dump_vector("Received", tmp, norm_len); free(tmp); return 1; } if (memcmp(out, tmp, out_len * sizeof(uint32_t)) != 0) { printf("%u: wrong out data (%s)\n", lineno, c); + dump_vector("Expected", out, out_len); + dump_vector("Received", tmp, norm_len); free(tmp); return 1; } diff --git a/packages/NTMakefile b/packages/NTMakefile index 68fd8c0d8..5d1949851 100644 --- a/packages/NTMakefile +++ b/packages/NTMakefile @@ -1,20 +1,20 @@ ######################################################################## # -# Copyright (c) 2009, Secure Endpoints Inc. +# Copyright (c) 2010, Secure Endpoints Inc. # All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: -# +# # - Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. -# +# # - Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. -# +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -27,9 +27,10 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# +# -RELDIR=packages +RELDIR=packages +SUBDIRS=windows -!include ../windows/NTMakefile.w32 +!include ../windows/NTMakefile.w32 diff --git a/packages/windows/NTMakefile b/packages/windows/NTMakefile new file mode 100644 index 000000000..cb2fec6d8 --- /dev/null +++ b/packages/windows/NTMakefile @@ -0,0 +1,38 @@ +######################################################################## +# +# Copyright (c) 2009, Secure Endpoints Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +RELDIR=packages\windows +SUBDIRS=kfw_shim + +!include ../../windows/NTMakefile.w32 + +# Note: the assembly directory is built as a child of the \lib +# directory since the application manifest is required at that point. diff --git a/packages/windows/assembly/Heimdal.Application.manifest.in b/packages/windows/assembly/Heimdal.Application.manifest.in new file mode 100644 index 000000000..9a278f815 --- /dev/null +++ b/packages/windows/assembly/Heimdal.Application.manifest.in @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/packages/windows/assembly/Heimdal.GSSAPI.manifest.in b/packages/windows/assembly/Heimdal.GSSAPI.manifest.in new file mode 100644 index 000000000..4484debc9 --- /dev/null +++ b/packages/windows/assembly/Heimdal.GSSAPI.manifest.in @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/packages/windows/assembly/Heimdal.Kerberos.manifest.in b/packages/windows/assembly/Heimdal.Kerberos.manifest.in new file mode 100644 index 000000000..9d43c5532 --- /dev/null +++ b/packages/windows/assembly/Heimdal.Kerberos.manifest.in @@ -0,0 +1,9 @@ + + + + + + diff --git a/packages/windows/assembly/NTMakefile b/packages/windows/assembly/NTMakefile new file mode 100644 index 000000000..1e8f7b2bd --- /dev/null +++ b/packages/windows/assembly/NTMakefile @@ -0,0 +1,167 @@ +######################################################################## +# +# Copyright (c) 2010, Secure Endpoints Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +RELDIR=packages\windows\assembly + +!include ../../../windows/NTMakefile.w32 + +# CODESIGN_PKT should be set to the public key token of the code +# signing certificate in use. You can use : +# +# pktextract +# +# ..to derive the public key token. +# +!ifndef CODESIGN_PKT +! error CODESIGN_PKT should be set to the public key token for codesigning certificate +!endif + +prep:: mk-asm-dirs + +# ---------------------------------------------------------------------- +# Heimdal.Kerberos Assembly + +ASMKRBDIR=$(ASMDIR)\Heimdal.Kerberos +ASMKRBVER=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH) +ASMKRBMAN=$(ASMKRBNAME).manifest + +ASMKRBBINS=$(ASMKRBDIR)\heimdal.dll $(ASMKRBDIR)\com_err.dll + +$(ASMKRBDIR)\$(ASMKRBMAN).nohash: Heimdal.Kerberos.manifest.in + $(SED) -e "s,[@]name[@],$(ASMKRBNAME),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]version[@],$(ASMKRBVER),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@ + +$(ASMKRBDIR)\$(ASMKRBMAN) $(ASMKRBDIR)\$(ASMKRBMAN).cdf: \ + $(ASMKRBDIR)\$(ASMKRBMAN).nohash $(ASMKRBBINS) + $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN).nohash -out:$(ASMKRBDIR)\$(ASMKRBMAN) -hashupdate -makecdfs + +$(ASMKRBDIR)\$(ASMKRBNAME).cat: $(ASMKRBDIR)\$(ASMKRBMAN).cdf + cd $(ASMKRBDIR) + $(MAKECAT) $** + $(_CODESIGN) +# $(RM) $(ASMKRBMAN).cdf +# $(RM) $(ASMKRBMAN).nohash + cd $(SRCDIR) + +asm-krb: \ + $(ASMKRBBINS) \ + $(ASMKRBDIR)\$(ASMKRBMAN) \ + $(ASMKRBDIR)\$(ASMKRBNAME).cat + +all:: asm-krb + +clean:: + -$(RM) $(ASMKRBDIR)\*.* + +{$(BINDIR)}.dll{$(ASMKRBDIR)}.dll: + $(CP) $< $@ + +test:: + $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN) -validate_manifest + +# ---------------------------------------------------------------------- +# Heimdal.GSSAPI Assembly + +ASMGSSDIR=$(ASMDIR)\Heimdal.GSSAPI +ASMGSSVER=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH) +ASMGSSMAN=$(ASMGSSNAME).manifest + +ASMGSSBINS=$(ASMGSSDIR)\gssapi.dll + +$(ASMGSSDIR)\$(ASMGSSMAN).nohash: Heimdal.GSSAPI.manifest.in + $(SED) -e "s,[@]name[@],$(ASMGSSNAME),g" \ + -e "s,[@]version[@],$(ASMGSSVER),g" \ + -e "s,[@]krbname[@],$(ASMKRBNAME),g" \ + -e "s,[@]krbversion[@],$(ASMKRBVER),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@ + +$(ASMGSSDIR)\$(ASMGSSMAN) $(ASMGSSDIR)\$(ASMGSSMAN).cdf: \ + $(ASMGSSDIR)\$(ASMGSSMAN).nohash $(ASMGSSBINS) + $(MT) -manifest $(ASMGSSDIR)\$(ASMGSSMAN).nohash -out:$@ -hashupdate -makecdfs + +$(ASMGSSDIR)\$(ASMGSSNAME).cat: $(ASMGSSDIR)\$(ASMGSSMAN).cdf + cd $(ASMGSSDIR) + $(MAKECAT) $** + $(_CODESIGN) +# $(RM) $(ASMGSSMAN).cdf +# $(RM) $(ASMGSSMAN).nohash + cd $(SRCDIR) + +asm-gss: \ + $(ASMGSSBINS) \ + $(ASMGSSDIR)\$(ASMGSSMAN) \ + $(ASMGSSDIR)\$(ASMGSSNAME).cat + +all:: asm-gss + +clean:: + -$(RM) $(ASMGSSDIR)\*.* + +{$(BINDIR)}.dll{$(ASMGSSDIR)}.dll: + $(CP) $< $@ + +test:: + $(MT) -manifest $(ASMGSSDIR)\$(ASMGSSMAN) -validate_manifest + +# ---------------------------------------------------------------------- +# Application manifests + +all:: $(APPMANIFEST) + +clean:: + -$(RM) $(APPMANIFEST) + +$(APPMANIFEST): Heimdal.Application.manifest.in + $(SED) -e "s,[@]gssname[@],$(ASMGSSNAME),g" \ + -e "s,[@]gssversion[@],$(ASMGSSVER),g" \ + -e "s,[@]krbname[@],$(ASMKRBNAME),g" \ + -e "s,[@]krbversion[@],$(ASMKRBVER),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@ + +test:: + $(MT) -manifest $(APPMANIFEST) -validate_manifest + +# ---------------------------------------------------------------------- + +.SUFFIXES: .dll + +mk-asm-dirs: +! if !exist($(ASMKRBDIR)) + $(MKDIR) $(ASMKRBDIR) +! endif +! if !exist($(ASMGSSDIR)) + $(MKDIR) $(ASMGSSDIR) +! endif + diff --git a/packages/windows/kfw_shim/NTMakefile b/packages/windows/kfw_shim/NTMakefile new file mode 100644 index 000000000..2b9756bcf --- /dev/null +++ b/packages/windows/kfw_shim/NTMakefile @@ -0,0 +1,147 @@ +######################################################################## +# +# Copyright (c) 2009, Secure Endpoints Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# - Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +RELDIR=packages\windows\kfw_shim + +!include ../../../windows/NTMakefile.w32 + +!if "$(CPU)"=="i386" +FILES= \ + $(BINDIR)\comerr32.dll \ + $(BINDIR)\gssapi32.dll \ + $(BINDIR)\krb5_32.dll \ +# $(BINDIR)\krbcc32.dll \ +# $(BINDIR)\wshelp32.dll \ +# $(BINDIR)\xpprof32.dll + +!elseif "$(CPU)"=="AMD64" +FILES= \ + $(BINDIR)\comerr64.dll \ + $(BINDIR)\gssapi64.dll \ + $(BINDIR)\krb5_64.dll \ +# $(BINDIR)\krbcc64.dll \ +# $(BINDIR)\wshelp64.dll \ +# $(BINDIR)\xpprof64.dll + +!else +! error Unknown CPU value +!endif + +GENDEF=$(PERL) $(SRC)\cf\w32-def-from-dll.pl + +# ---------------------------------------------------------------------- +# comerr32.dll shim + +COMERR_SHIM_OBJS=$(OBJ)\comerr_shim.obj + +$(BINDIR)\comerr32.dll: $(COMERR_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:comerr32.def $(LIBCOMERR) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +# ---------------------------------------------------------------------- +# comerr64.dll shim + +$(BINDIR)\comerr64.dll: $(COMERR_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:comerr64.def $(LIBCOMERR) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +# ---------------------------------------------------------------------- +# gssapi32.dll shim + +GSSAPI_SHIM_OBJS=$(OBJ)\gssapi_shim.obj + +$(BINDIR)\gssapi32.dll: $(GSSAPI_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:gssapi32.def $(LIBGSSAPI) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +# ---------------------------------------------------------------------- +# gssapi64.dll shim + +$(BINDIR)\gssapi64.dll: $(GSSAPI_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:gssapi64.def $(LIBGSSAPI) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +# ---------------------------------------------------------------------- +# krb5_32.dll shim + +KRB5_SHIM_OBJS=$(OBJ)\krb5_shim.obj + +$(BINDIR)\krb5_32.dll: $(KRB5_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:krb5_32.def $(LIBHEIMDAL) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +# ---------------------------------------------------------------------- +# krb5_64.dll shim + +$(BINDIR)\krb5_64.dll: $(KRB5_SHIM_OBJS) + $(DLLGUILINK) -out:$@ -def:krb5_64.def $(LIBHEIMDAL) + ( ( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest $(APPMANIFEST) ) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ + +all:: $(FILES) + +clean:: + -$(RM) $(FILES) + +!ifdef DEV + +comerr32.def: $(COMERR_SHIM_OBJS) + ( $(GENDEF) -mcom_err -e$(BINDIR)\com_err.dll $** "$(KFWBIN)\comerr32.dll" > $@ ) || $(RM) $@ + +comerr64.def: $(COMERR_SHIM_OBJS) + ( $(GENDEF) -mcom_err -e$(BINDIR)\com_err.dll $** "$(KFWBIN)\comerr64.dll" > $@ ) || $(RM) $@ + +gssapi32.def: $(GSSAPI_SHIM_OBJS) + ( $(GENDEF) -mgssapi -e$(BINDIR)\gssapi.dll $** "$(KFWBIN)\gssapi32.dll" > $@ ) || $(RM) $@ + +gssapi64.def: $(GSSAPI_SHIM_OBJS) + ( $(GENDEF) -mgssapi -e$(BINDIR)\gssapi.dll $** "$(KFWBIN)\gssapi64.dll" > $@ ) || $(RM) $@ + +krb5_32.def: $(KRB5_SHIM_OBJS) + ( $(GENDEF) -mheimdal -e$(BINDIR)\heimdal.dll $** "$(KFWBIN)\krb5_32.dll" > $@ ) || $(RM) $@ + +krb5_64.def: $(KRB5_SHIM_OBJS) + ( $(GENDEF) -mheimdal -e$(BINDIR)\heimdal.dll $** "$(KFWBIN)\krb5_64.dll" > $@ ) || $(RM) $@ + +!ifndef KFWBIN +gen-defs: + echo KFWBIN should point to the directory that contains the KfW binaries + exit /b 1 +!else +!if "$(CPU)"=="i386" +gen-defs: comerr32.def gssapi32.def krb5_32.def + echo Done. +!elseif "$(CPU)"=="AMD64" +gen-defs: comerr64.def gssapi64.def krb5_64.def + echo Done. +!endif +!endif + +!endif \ No newline at end of file diff --git a/packages/windows/kfw_shim/comerr32.def b/packages/windows/kfw_shim/comerr32.def new file mode 100644 index 000000000..bdd1a03e5 --- /dev/null +++ b/packages/windows/kfw_shim/comerr32.def @@ -0,0 +1,9 @@ +; This is a generated file. Do not modify directly. +EXPORTS + add_error_table = _add_error_table@4 @1 + com_err = com_err.com_err @2 + com_err_va = com_err._com_err_va@16 @3 + error_message = com_err._error_message@4 @4 + remove_error_table = _remove_error_table@4 @5 + reset_com_err_hook = SHIM_reset_com_err_hook @6 + set_com_err_hook = SHIM_set_com_err_hook @7 diff --git a/packages/windows/kfw_shim/comerr64.def b/packages/windows/kfw_shim/comerr64.def new file mode 100644 index 000000000..305ec98a9 --- /dev/null +++ b/packages/windows/kfw_shim/comerr64.def @@ -0,0 +1,9 @@ +; This is a generated file. Do not modify directly. +EXPORTS + add_error_table = add_error_table @1 + com_err = com_err.com_err @2 + com_err_va = com_err.com_err_va @3 + error_message = com_err.error_message @4 + remove_error_table = remove_error_table @5 + reset_com_err_hook = SHIM_reset_com_err_hook @7 + set_com_err_hook = SHIM_set_com_err_hook @6 diff --git a/packages/windows/kfw_shim/comerr_shim.c b/packages/windows/kfw_shim/comerr_shim.c new file mode 100644 index 000000000..fd4e74237 --- /dev/null +++ b/packages/windows/kfw_shim/comerr_shim.c @@ -0,0 +1,27 @@ +#include +#include +#include + +int KRB5_CALLCONV +add_error_table(const struct error_table * et) +{ + return -1; +} + +int KRB5_CALLCONV +remove_error_table(const struct error_table * et) +{ + return -1; +} + +errf +SHIM_set_com_err_hook (errf new) +{ + return set_com_err_hook(new); +} + +errf +SHIM_reset_com_err_hook (void) +{ + return reset_com_err_hook(); +} diff --git a/packages/windows/kfw_shim/gssapi32.def b/packages/windows/kfw_shim/gssapi32.def new file mode 100644 index 000000000..c013bbb32 --- /dev/null +++ b/packages/windows/kfw_shim/gssapi32.def @@ -0,0 +1,57 @@ +; This is a generated file. Do not modify directly. +EXPORTS + GSS_C_NT_ANONYMOUS = SHIM_GSS_C_NT_ANONYMOUS @1 + GSS_C_NT_EXPORT_NAME = SHIM_GSS_C_NT_EXPORT_NAME @2 + GSS_C_NT_HOSTBASED_SERVICE = SHIM_GSS_C_NT_HOSTBASED_SERVICE @3 + GSS_C_NT_HOSTBASED_SERVICE_X = SHIM_GSS_C_NT_HOSTBASED_SERVICE_X @4 + GSS_C_NT_MACHINE_UID_NAME = SHIM_GSS_C_NT_MACHINE_UID_NAME @5 + GSS_C_NT_STRING_UID_NAME = SHIM_GSS_C_NT_STRING_UID_NAME @6 + GSS_C_NT_USER_NAME = SHIM_GSS_C_NT_USER_NAME @7 + GSS_KRB5_NT_PRINCIPAL_NAME = SHIM_GSS_KRB5_NT_PRINCIPAL_NAME @8 + gss_accept_sec_context = gssapi._gss_accept_sec_context@44 @9 + gss_acquire_cred = gssapi._gss_acquire_cred@32 @10 + gss_add_cred = gssapi._gss_add_cred@44 @11 + gss_add_oid_set_member = gssapi._gss_add_oid_set_member@12 @12 + gss_canonicalize_name = gssapi._gss_canonicalize_name@16 @13 + gss_compare_name = gssapi._gss_compare_name@16 @14 + gss_context_time = gssapi._gss_context_time@12 @15 + gss_create_empty_oid_set = gssapi._gss_create_empty_oid_set@8 @16 + gss_delete_sec_context = gssapi._gss_delete_sec_context@12 @17 + gss_display_name = gssapi._gss_display_name@16 @18 + gss_display_status = gssapi._gss_display_status@24 @19 + gss_duplicate_name = gssapi._gss_duplicate_name@12 @20 + gss_export_name = gssapi._gss_export_name@12 @21 + gss_export_sec_context = gssapi._gss_export_sec_context@12 @22 + gss_get_mic = gssapi._gss_get_mic@20 @23 + gss_import_name = gssapi._gss_import_name@16 @24 + gss_import_sec_context = gssapi._gss_import_sec_context@12 @25 + gss_indicate_mechs = gssapi._gss_indicate_mechs@8 @26 + gss_init_sec_context = gssapi._gss_init_sec_context@52 @27 + gss_inquire_context = gssapi._gss_inquire_context@36 @28 + gss_inquire_cred = gssapi._gss_inquire_cred@24 @29 + gss_inquire_cred_by_mech = gssapi._gss_inquire_cred_by_mech@28 @30 + gss_inquire_mechs_for_name = gssapi._gss_inquire_mechs_for_name@12 @31 + gss_inquire_names_for_mech = gssapi._gss_inquire_names_for_mech@12 @32 + gss_krb5_ccache_name = gssapi._gss_krb5_ccache_name@12 @33 + gss_krb5_copy_ccache = gssapi._gss_krb5_copy_ccache@12 @34 + gss_krb5_export_lucid_sec_context = gssapi._gss_krb5_export_lucid_sec_context@16 @35 + gss_krb5_free_lucid_sec_context = gssapi._gss_krb5_free_lucid_sec_context@8 @36 + gss_krb5_get_tkt_flags = gssapi._gss_krb5_get_tkt_flags@12 @37 + gss_krb5_set_allowable_enctypes = gssapi._gss_krb5_set_allowable_enctypes@16 @38 + gss_oid_to_str = gssapi._gss_oid_to_str@12 @51 + gss_process_context_token = gssapi._gss_process_context_token@12 @52 + gss_release_buffer = gssapi._gss_release_buffer@8 @53 + gss_release_cred = gssapi._gss_release_cred@8 @54 + gss_release_name = gssapi._gss_release_name@8 @55 + gss_release_oid = gssapi._gss_release_oid@8 @56 + gss_release_oid_set = gssapi._gss_release_oid_set@8 @57 + gss_seal = gssapi._gss_seal@28 @58 + gss_sign = gssapi._gss_sign@20 @59 + gss_test_oid_set_member = gssapi._gss_test_oid_set_member@16 @61 + gss_unseal = gssapi._gss_unseal@24 @62 + gss_unwrap = gssapi._gss_unwrap@24 @63 + gss_verify = gssapi._gss_verify@20 @64 + gss_verify_mic = gssapi._gss_verify_mic@20 @65 + gss_wrap = gssapi._gss_wrap@28 @66 + gss_wrap_size_limit = gssapi._gss_wrap_size_limit@24 @67 + krb5_gss_register_acceptor_identity = gssapi._krb5_gss_register_acceptor_identity@4 @69 diff --git a/packages/windows/kfw_shim/gssapi64.def b/packages/windows/kfw_shim/gssapi64.def new file mode 100644 index 000000000..2dc7e4739 --- /dev/null +++ b/packages/windows/kfw_shim/gssapi64.def @@ -0,0 +1,57 @@ +; This is a generated file. Do not modify directly. +EXPORTS + GSS_C_NT_ANONYMOUS = SHIM_GSS_C_NT_ANONYMOUS @1 + GSS_C_NT_EXPORT_NAME = SHIM_GSS_C_NT_EXPORT_NAME @2 + GSS_C_NT_HOSTBASED_SERVICE = SHIM_GSS_C_NT_HOSTBASED_SERVICE @3 + GSS_C_NT_HOSTBASED_SERVICE_X = SHIM_GSS_C_NT_HOSTBASED_SERVICE_X @4 + GSS_C_NT_MACHINE_UID_NAME = SHIM_GSS_C_NT_MACHINE_UID_NAME @5 + GSS_C_NT_STRING_UID_NAME = SHIM_GSS_C_NT_STRING_UID_NAME @6 + GSS_C_NT_USER_NAME = SHIM_GSS_C_NT_USER_NAME @7 + GSS_KRB5_NT_PRINCIPAL_NAME = SHIM_GSS_KRB5_NT_PRINCIPAL_NAME @8 + gss_accept_sec_context = gssapi.gss_accept_sec_context @9 + gss_acquire_cred = gssapi.gss_acquire_cred @10 + gss_add_cred = gssapi.gss_add_cred @11 + gss_add_oid_set_member = gssapi.gss_add_oid_set_member @12 + gss_canonicalize_name = gssapi.gss_canonicalize_name @13 + gss_compare_name = gssapi.gss_compare_name @14 + gss_context_time = gssapi.gss_context_time @15 + gss_create_empty_oid_set = gssapi.gss_create_empty_oid_set @16 + gss_delete_sec_context = gssapi.gss_delete_sec_context @17 + gss_display_name = gssapi.gss_display_name @18 + gss_display_status = gssapi.gss_display_status @19 + gss_duplicate_name = gssapi.gss_duplicate_name @20 + gss_export_name = gssapi.gss_export_name @21 + gss_export_sec_context = gssapi.gss_export_sec_context @22 + gss_get_mic = gssapi.gss_get_mic @23 + gss_import_name = gssapi.gss_import_name @24 + gss_import_sec_context = gssapi.gss_import_sec_context @25 + gss_indicate_mechs = gssapi.gss_indicate_mechs @26 + gss_init_sec_context = gssapi.gss_init_sec_context @27 + gss_inquire_context = gssapi.gss_inquire_context @28 + gss_inquire_cred = gssapi.gss_inquire_cred @29 + gss_inquire_cred_by_mech = gssapi.gss_inquire_cred_by_mech @30 + gss_inquire_mechs_for_name = gssapi.gss_inquire_mechs_for_name @31 + gss_inquire_names_for_mech = gssapi.gss_inquire_names_for_mech @32 + gss_krb5_ccache_name = gssapi.gss_krb5_ccache_name @33 + gss_krb5_copy_ccache = gssapi.gss_krb5_copy_ccache @34 + gss_krb5_export_lucid_sec_context = gssapi.gss_krb5_export_lucid_sec_context @35 + gss_krb5_free_lucid_sec_context = gssapi.gss_krb5_free_lucid_sec_context @36 + gss_krb5_get_tkt_flags = gssapi.gss_krb5_get_tkt_flags @37 + gss_krb5_set_allowable_enctypes = gssapi.gss_krb5_set_allowable_enctypes @38 + gss_oid_to_str = gssapi.gss_oid_to_str @51 + gss_process_context_token = gssapi.gss_process_context_token @52 + gss_release_buffer = gssapi.gss_release_buffer @53 + gss_release_cred = gssapi.gss_release_cred @54 + gss_release_name = gssapi.gss_release_name @55 + gss_release_oid = gssapi.gss_release_oid @56 + gss_release_oid_set = gssapi.gss_release_oid_set @57 + gss_seal = gssapi.gss_seal @58 + gss_sign = gssapi.gss_sign @59 + gss_test_oid_set_member = gssapi.gss_test_oid_set_member @61 + gss_unseal = gssapi.gss_unseal @62 + gss_unwrap = gssapi.gss_unwrap @63 + gss_verify = gssapi.gss_verify @64 + gss_verify_mic = gssapi.gss_verify_mic @65 + gss_wrap = gssapi.gss_wrap @66 + gss_wrap_size_limit = gssapi.gss_wrap_size_limit @67 + krb5_gss_register_acceptor_identity = gssapi.krb5_gss_register_acceptor_identity @69 diff --git a/packages/windows/kfw_shim/gssapi_shim.c b/packages/windows/kfw_shim/gssapi_shim.c new file mode 100644 index 000000000..5389c9501 --- /dev/null +++ b/packages/windows/kfw_shim/gssapi_shim.c @@ -0,0 +1,30 @@ +#include +#include + +gss_OID_desc *SHIM_GSS_C_NT_ANONYMOUS = NULL; +gss_OID_desc *SHIM_GSS_C_NT_EXPORT_NAME = NULL; +gss_OID_desc *SHIM_GSS_C_NT_HOSTBASED_SERVICE = NULL; +gss_OID_desc *SHIM_GSS_C_NT_HOSTBASED_SERVICE_X = NULL; +gss_OID_desc *SHIM_GSS_C_NT_MACHINE_UID_NAME = NULL; +gss_OID_desc *SHIM_GSS_C_NT_STRING_UID_NAME = NULL; +gss_OID_desc *SHIM_GSS_C_NT_USER_NAME = NULL; +gss_OID_desc *SHIM_GSS_KRB5_NT_PRINCIPAL_NAME = NULL; + +void __init_gssapi_shim(void) +{ + SHIM_GSS_C_NT_ANONYMOUS = GSS_C_NT_ANONYMOUS; + SHIM_GSS_C_NT_EXPORT_NAME = GSS_C_NT_EXPORT_NAME; + SHIM_GSS_C_NT_HOSTBASED_SERVICE = GSS_C_NT_HOSTBASED_SERVICE; + SHIM_GSS_C_NT_HOSTBASED_SERVICE_X = GSS_C_NT_HOSTBASED_SERVICE_X; + SHIM_GSS_C_NT_MACHINE_UID_NAME = GSS_C_NT_MACHINE_UID_NAME; + SHIM_GSS_C_NT_STRING_UID_NAME = GSS_C_NT_STRING_UID_NAME; + SHIM_GSS_C_NT_USER_NAME = GSS_C_NT_USER_NAME; + SHIM_GSS_KRB5_NT_PRINCIPAL_NAME = GSS_KRB5_NT_PRINCIPAL_NAME; +} + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + if (fdwReason == DLL_PROCESS_ATTACH) { + __init_gssapi_shim(); + } +} diff --git a/packages/windows/kfw_shim/krb5_32.def b/packages/windows/kfw_shim/krb5_32.def new file mode 100644 index 000000000..7178016d5 --- /dev/null +++ b/packages/windows/kfw_shim/krb5_32.def @@ -0,0 +1,176 @@ +; This is a generated file. Do not modify directly. +EXPORTS + krb5_address_compare = heimdal._krb5_address_compare@12 @13 + krb5_address_order = heimdal._krb5_address_order@12 @14 + krb5_address_search = SHIM_krb5_address_search @15 + krb5_aname_to_localname = heimdal._krb5_aname_to_localname@16 @16 + krb5_appdefault_boolean = heimdal._krb5_appdefault_boolean@24 @17 + krb5_appdefault_string = heimdal._krb5_appdefault_string@24 @18 + krb5_auth_con_free = heimdal._krb5_auth_con_free@8 @19 + krb5_auth_con_genaddrs = heimdal._krb5_auth_con_genaddrs@16 @20 + krb5_auth_con_getaddrs = heimdal._krb5_auth_con_getaddrs@16 @21 + krb5_auth_con_getauthenticator = heimdal._krb5_auth_con_getauthenticator@12 @22 + krb5_auth_con_getflags = heimdal._krb5_auth_con_getflags@12 @24 + krb5_auth_con_getkey = heimdal._krb5_auth_con_getkey@12 @25 + krb5_auth_con_getlocalseqnumber = heimdal._krb5_auth_con_getlocalseqnumber@12 @26 + krb5_auth_con_getlocalsubkey = heimdal._krb5_auth_con_getlocalsubkey@12 @27 + krb5_auth_con_getrcache = SHIM_krb5_auth_con_getrcache @28 + krb5_auth_con_getremoteseqnumber = heimdal._krb5_auth_con_getremoteseqnumber@12 @30 + krb5_auth_con_getremotesubkey = heimdal._krb5_auth_con_getremotesubkey@12 @31 + krb5_auth_con_init = heimdal._krb5_auth_con_init@8 @33 + krb5_auth_con_setaddrs = SHIM_krb5_auth_con_setaddrs @37 + krb5_auth_con_setflags = heimdal._krb5_auth_con_setflags@12 @38 + krb5_auth_con_setrcache = heimdal._krb5_auth_con_setrcache@12 @40 + krb5_build_principal = heimdal.krb5_build_principal @44 + krb5_build_principal_ext = heimdal.krb5_build_principal_ext @45 + krb5_build_principal_va = heimdal._krb5_build_principal_va@20 @46 + krb5_c_block_size = heimdal._krb5_c_block_size@12 @47 + krb5_c_checksum_length = heimdal._krb5_c_checksum_length@12 @48 + krb5_c_decrypt = _SHIM_krb5_c_decrypt@24 @49 + krb5_c_encrypt = heimdal._krb5_c_encrypt@24 @50 + krb5_c_encrypt_length = heimdal._krb5_c_encrypt_length@16 @51 + krb5_c_enctype_compare = heimdal._krb5_c_enctype_compare@16 @52 + krb5_c_is_coll_proof_cksum = heimdal._krb5_c_is_coll_proof_cksum@4 @53 + krb5_c_is_keyed_cksum = heimdal._krb5_c_is_keyed_cksum@4 @54 + krb5_c_make_checksum = heimdal._krb5_c_make_checksum@24 @56 + krb5_c_make_random_key = heimdal._krb5_c_make_random_key@12 @57 + krb5_c_prf = heimdal._krb5_c_prf@16 @58 + krb5_c_prf_length = heimdal._krb5_c_prf_length@12 @59 + krb5_c_valid_cksumtype = heimdal._krb5_c_valid_cksumtype@4 @64 + krb5_c_valid_enctype = heimdal._krb5_c_valid_enctype@4 @65 + krb5_c_verify_checksum = heimdal._krb5_c_verify_checksum@24 @66 + krb5_cc_close = heimdal._krb5_cc_close@8 @68 + krb5_cc_copy_creds = heimdal._krb5_cc_copy_creds@12 @69 + krb5_cc_default = heimdal._krb5_cc_default@8 @70 + krb5_cc_default_name = heimdal._krb5_cc_default_name@4 @71 + krb5_cc_destroy = heimdal._krb5_cc_destroy@8 @72 + krb5_cc_end_seq_get = heimdal._krb5_cc_end_seq_get@12 @73 + krb5_cc_gen_new = _SHIM_krb5_cc_gen_new@8 @74 + krb5_cc_get_name = heimdal._krb5_cc_get_name@8 @75 + krb5_cc_get_principal = heimdal._krb5_cc_get_principal@12 @76 + krb5_cc_get_type = heimdal._krb5_cc_get_type@8 @77 + krb5_cc_initialize = heimdal._krb5_cc_initialize@12 @78 + krb5_cc_new_unique = heimdal._krb5_cc_new_unique@16 @79 + krb5_cc_next_cred = heimdal._krb5_cc_next_cred@16 @80 + krb5_cc_remove_cred = heimdal._krb5_cc_remove_cred@16 @81 + krb5_cc_resolve = heimdal._krb5_cc_resolve@12 @82 + krb5_cc_retrieve_cred = heimdal._krb5_cc_retrieve_cred@20 @83 + krb5_cc_set_default_name = heimdal._krb5_cc_set_default_name@8 @84 + krb5_cc_set_flags = heimdal._krb5_cc_set_flags@12 @85 + krb5_cc_start_seq_get = heimdal._krb5_cc_start_seq_get@12 @86 + krb5_cc_store_cred = heimdal._krb5_cc_store_cred@12 @87 + krb5_cccol_cursor_free = heimdal._krb5_cccol_cursor_free@8 @88 + krb5_cccol_cursor_new = heimdal._krb5_cccol_cursor_new@8 @89 + krb5_cccol_cursor_next = heimdal._krb5_cccol_cursor_next@12 @90 + krb5_change_password = heimdal._krb5_change_password@24 @91 + krb5_clear_error_message = heimdal._krb5_clear_error_message@4 @94 + krb5_copy_addresses = heimdal._krb5_copy_addresses@12 @95 + krb5_copy_checksum = heimdal._krb5_copy_checksum@12 @98 + krb5_copy_creds = heimdal._krb5_copy_creds@12 @100 + krb5_copy_data = heimdal._krb5_copy_data@12 @101 + krb5_copy_keyblock = heimdal._krb5_copy_keyblock@12 @102 + krb5_copy_keyblock_contents = heimdal._krb5_copy_keyblock_contents@12 @103 + krb5_copy_principal = heimdal._krb5_copy_principal@12 @104 + krb5_copy_ticket = heimdal._krb5_copy_ticket@12 @105 + krb5_decrypt = heimdal._krb5_decrypt@24 @107 + krb5_encrypt = heimdal._krb5_encrypt@24 @111 + krb5_enctype_to_string = heimdal._krb5_enctype_to_string@12 @113 + krb5_free_addresses = heimdal._krb5_free_addresses@8 @117 + krb5_free_ap_rep_enc_part = heimdal._krb5_free_ap_rep_enc_part@8 @118 + krb5_free_authenticator = heimdal._krb5_free_authenticator@8 @121 + krb5_free_checksum = heimdal._krb5_free_checksum@8 @122 + krb5_free_checksum_contents = heimdal._krb5_free_checksum_contents@8 @123 + krb5_free_config_files = heimdal._krb5_free_config_files@4 @125 + krb5_free_context = heimdal._krb5_free_context@4 @126 + krb5_free_cred_contents = heimdal._krb5_free_cred_contents@8 @127 + krb5_free_creds = heimdal._krb5_free_creds@8 @128 + krb5_free_data = heimdal._krb5_free_data@8 @129 + krb5_free_data_contents = heimdal._krb5_free_data_contents@8 @130 + krb5_free_error = heimdal._krb5_free_error@8 @133 + krb5_free_error_message = heimdal._krb5_free_error_message@8 @134 + krb5_free_host_realm = heimdal._krb5_free_host_realm@8 @135 + krb5_free_keyblock = heimdal._krb5_free_keyblock@8 @136 + krb5_free_keyblock_contents = heimdal._krb5_free_keyblock_contents@8 @137 + krb5_free_principal = heimdal._krb5_free_principal@8 @140 + krb5_free_ticket = heimdal._krb5_free_ticket@8 @142 + krb5_free_unparsed_name = heimdal._krb5_free_unparsed_name@8 @143 + krb5_fwd_tgt_creds = heimdal._krb5_fwd_tgt_creds@32 @144 + krb5_get_credentials = heimdal._krb5_get_credentials@20 @145 + krb5_get_default_config_files = heimdal._krb5_get_default_config_files@4 @148 + krb5_get_default_realm = heimdal._krb5_get_default_realm@8 @149 + krb5_get_error_message = heimdal._krb5_get_error_message@8 @150 + krb5_get_host_realm = heimdal._krb5_get_host_realm@12 @151 + krb5_get_in_tkt = heimdal._krb5_get_in_tkt@48 @152 + krb5_get_in_tkt_with_keytab = heimdal._krb5_get_in_tkt_with_keytab@36 @153 + krb5_get_in_tkt_with_password = heimdal._krb5_get_in_tkt_with_password@36 @154 + krb5_get_in_tkt_with_skey = heimdal._krb5_get_in_tkt_with_skey@36 @155 + krb5_get_init_creds_keytab = heimdal._krb5_get_init_creds_keytab@28 @156 + krb5_get_init_creds_opt_alloc = heimdal._krb5_get_init_creds_opt_alloc@8 @157 + krb5_get_init_creds_opt_free = heimdal._krb5_get_init_creds_opt_free@8 @158 + krb5_get_init_creds_opt_init = heimdal._krb5_get_init_creds_opt_init@4 @161 + krb5_get_init_creds_opt_set_address_list = heimdal._krb5_get_init_creds_opt_set_address_list@8 @162 + krb5_get_init_creds_opt_set_etype_list = heimdal._krb5_get_init_creds_opt_set_etype_list@12 @164 + krb5_get_init_creds_opt_set_forwardable = heimdal._krb5_get_init_creds_opt_set_forwardable@8 @165 + krb5_get_init_creds_opt_set_preauth_list = heimdal._krb5_get_init_creds_opt_set_preauth_list@12 @167 + krb5_get_init_creds_opt_set_proxiable = heimdal._krb5_get_init_creds_opt_set_proxiable@8 @168 + krb5_get_init_creds_opt_set_renew_life = heimdal._krb5_get_init_creds_opt_set_renew_life@8 @169 + krb5_get_init_creds_opt_set_salt = heimdal._krb5_get_init_creds_opt_set_salt@8 @170 + krb5_get_init_creds_opt_set_tkt_life = heimdal._krb5_get_init_creds_opt_set_tkt_life@8 @171 + krb5_get_init_creds_password = heimdal._krb5_get_init_creds_password@36 @172 + krb5_get_renewed_creds = heimdal._krb5_get_renewed_creds@20 @175 + krb5_get_server_rcache = heimdal._krb5_get_server_rcache@12 @176 + krb5_init_context = heimdal._krb5_init_context@4 @180 + krb5_is_thread_safe = heimdal._krb5_is_thread_safe@0 @186 + krb5_kt_add_entry = heimdal._krb5_kt_add_entry@12 @187 + krb5_kt_close = heimdal._krb5_kt_close@8 @188 + krb5_kt_default = heimdal._krb5_kt_default@8 @189 + krb5_kt_default_name = heimdal._krb5_kt_default_name@12 @190 + krb5_kt_end_seq_get = heimdal._krb5_kt_end_seq_get@12 @191 + krb5_kt_free_entry = heimdal._krb5_kt_free_entry@8 @192 + krb5_kt_get_entry = heimdal._krb5_kt_get_entry@24 @193 + krb5_kt_get_name = heimdal._krb5_kt_get_name@16 @194 + krb5_kt_get_type = _SHIM_krb5_kt_get_type@8 @195 + krb5_kt_next_entry = heimdal._krb5_kt_next_entry@16 @196 + krb5_kt_read_service_key = heimdal._krb5_kt_read_service_key@24 @197 + krb5_kt_remove_entry = heimdal._krb5_kt_remove_entry@12 @198 + krb5_kt_resolve = heimdal._krb5_kt_resolve@12 @199 + krb5_kt_start_seq_get = heimdal._krb5_kt_start_seq_get@12 @200 + krb5_kuserok = heimdal._krb5_kuserok@12 @201 + krb5_mk_error = _SHIM_krb5_mk_error@12 @203 + krb5_mk_priv = heimdal._krb5_mk_priv@20 @205 + krb5_mk_rep = heimdal._krb5_mk_rep@12 @206 + krb5_mk_req = heimdal._krb5_mk_req@32 @207 + krb5_mk_req_extended = heimdal._krb5_mk_req_extended@24 @208 + krb5_mk_safe = heimdal._krb5_mk_safe@20 @209 + krb5_parse_name = heimdal._krb5_parse_name@12 @211 + krb5_principal_compare = heimdal._krb5_principal_compare@12 @213 + krb5_prompter_posix = heimdal._krb5_prompter_posix@24 @215 + krb5_rc_close = heimdal._krb5_rc_close@8 @217 + krb5_rd_cred = heimdal._krb5_rd_cred@20 @218 + krb5_rd_error = heimdal._krb5_rd_error@12 @219 + krb5_rd_priv = heimdal._krb5_rd_priv@20 @220 + krb5_rd_rep = heimdal._krb5_rd_rep@16 @221 + krb5_rd_req = heimdal._krb5_rd_req@28 @222 + krb5_rd_safe = heimdal._krb5_rd_safe@20 @223 + krb5_realm_compare = heimdal._krb5_realm_compare@12 @225 + krb5_recvauth = heimdal._krb5_recvauth@32 @226 + krb5_salttype_to_string = _SHIM_krb5_salttype_to_string@12 @228 + krb5_sendauth = heimdal._krb5_sendauth@52 @229 + krb5_set_default_realm = heimdal._krb5_set_default_realm@8 @240 + krb5_set_error_message = heimdal.krb5_set_error_message @242 + krb5_set_password = heimdal._krb5_set_password@28 @243 + krb5_set_password_using_ccache = heimdal._krb5_set_password_using_ccache@28 @244 + krb5_set_real_time = heimdal._krb5_set_real_time@12 @246 + krb5_sname_to_principal = heimdal._krb5_sname_to_principal@20 @248 + krb5_string_to_deltat = heimdal._krb5_string_to_deltat@8 @250 + krb5_string_to_enctype = _SHIM_krb5_string_to_enctype@8 @251 + krb5_string_to_key = heimdal._krb5_string_to_key@20 @252 + krb5_string_to_salttype = _SHIM_krb5_string_to_salttype@8 @253 + krb5_timeofday = heimdal._krb5_timeofday@8 @255 + krb5_unparse_name = heimdal._krb5_unparse_name@12 @258 + krb5_us_timeofday = heimdal._krb5_us_timeofday@12 @260 + krb5_verify_checksum = _SHIM_krb5_verify_checksum@28 @262 + krb5_verify_init_creds = heimdal._krb5_verify_init_creds@24 @263 + krb5_verify_init_creds_opt_init = heimdal._krb5_verify_init_creds_opt_init@4 @264 + krb5_verify_init_creds_opt_set_ap_req_nofail = heimdal._krb5_verify_init_creds_opt_set_ap_req_nofail@8 @265 + krb5_vset_error_message = heimdal._krb5_vset_error_message@16 @266 diff --git a/packages/windows/kfw_shim/krb5_64.def b/packages/windows/kfw_shim/krb5_64.def new file mode 100644 index 000000000..ddb24948a --- /dev/null +++ b/packages/windows/kfw_shim/krb5_64.def @@ -0,0 +1,176 @@ +; This is a generated file. Do not modify directly. +EXPORTS + krb5_address_compare = heimdal.krb5_address_compare @13 + krb5_address_order = heimdal.krb5_address_order @14 + krb5_address_search = SHIM_krb5_address_search @15 + krb5_aname_to_localname = heimdal.krb5_aname_to_localname @16 + krb5_appdefault_boolean = heimdal.krb5_appdefault_boolean @17 + krb5_appdefault_string = heimdal.krb5_appdefault_string @18 + krb5_auth_con_free = heimdal.krb5_auth_con_free @19 + krb5_auth_con_genaddrs = heimdal.krb5_auth_con_genaddrs @20 + krb5_auth_con_getaddrs = heimdal.krb5_auth_con_getaddrs @21 + krb5_auth_con_getauthenticator = heimdal.krb5_auth_con_getauthenticator @22 + krb5_auth_con_getflags = heimdal.krb5_auth_con_getflags @24 + krb5_auth_con_getkey = heimdal.krb5_auth_con_getkey @25 + krb5_auth_con_getlocalseqnumber = heimdal.krb5_auth_con_getlocalseqnumber @26 + krb5_auth_con_getlocalsubkey = heimdal.krb5_auth_con_getlocalsubkey @27 + krb5_auth_con_getrcache = SHIM_krb5_auth_con_getrcache @28 + krb5_auth_con_getremoteseqnumber = heimdal.krb5_auth_con_getremoteseqnumber @30 + krb5_auth_con_getremotesubkey = heimdal.krb5_auth_con_getremotesubkey @31 + krb5_auth_con_init = heimdal.krb5_auth_con_init @33 + krb5_auth_con_setaddrs = SHIM_krb5_auth_con_setaddrs @37 + krb5_auth_con_setflags = heimdal.krb5_auth_con_setflags @38 + krb5_auth_con_setrcache = heimdal.krb5_auth_con_setrcache @40 + krb5_build_principal = heimdal.krb5_build_principal @44 + krb5_build_principal_ext = heimdal.krb5_build_principal_ext @45 + krb5_build_principal_va = heimdal.krb5_build_principal_va @46 + krb5_c_block_size = heimdal.krb5_c_block_size @47 + krb5_c_checksum_length = heimdal.krb5_c_checksum_length @48 + krb5_c_decrypt = SHIM_krb5_c_decrypt @49 + krb5_c_encrypt = heimdal.krb5_c_encrypt @50 + krb5_c_encrypt_length = heimdal.krb5_c_encrypt_length @51 + krb5_c_enctype_compare = heimdal.krb5_c_enctype_compare @52 + krb5_c_is_coll_proof_cksum = heimdal.krb5_c_is_coll_proof_cksum @53 + krb5_c_is_keyed_cksum = heimdal.krb5_c_is_keyed_cksum @54 + krb5_c_make_checksum = heimdal.krb5_c_make_checksum @56 + krb5_c_make_random_key = heimdal.krb5_c_make_random_key @57 + krb5_c_prf = heimdal.krb5_c_prf @58 + krb5_c_prf_length = heimdal.krb5_c_prf_length @59 + krb5_c_valid_cksumtype = heimdal.krb5_c_valid_cksumtype @64 + krb5_c_valid_enctype = heimdal.krb5_c_valid_enctype @65 + krb5_c_verify_checksum = heimdal.krb5_c_verify_checksum @66 + krb5_cc_close = heimdal.krb5_cc_close @68 + krb5_cc_copy_creds = heimdal.krb5_cc_copy_creds @69 + krb5_cc_default = heimdal.krb5_cc_default @70 + krb5_cc_default_name = heimdal.krb5_cc_default_name @71 + krb5_cc_destroy = heimdal.krb5_cc_destroy @72 + krb5_cc_end_seq_get = heimdal.krb5_cc_end_seq_get @73 + krb5_cc_gen_new = SHIM_krb5_cc_gen_new @74 + krb5_cc_get_name = heimdal.krb5_cc_get_name @75 + krb5_cc_get_principal = heimdal.krb5_cc_get_principal @76 + krb5_cc_get_type = heimdal.krb5_cc_get_type @77 + krb5_cc_initialize = heimdal.krb5_cc_initialize @78 + krb5_cc_new_unique = heimdal.krb5_cc_new_unique @79 + krb5_cc_next_cred = heimdal.krb5_cc_next_cred @80 + krb5_cc_remove_cred = heimdal.krb5_cc_remove_cred @81 + krb5_cc_resolve = heimdal.krb5_cc_resolve @82 + krb5_cc_retrieve_cred = heimdal.krb5_cc_retrieve_cred @83 + krb5_cc_set_default_name = heimdal.krb5_cc_set_default_name @84 + krb5_cc_set_flags = heimdal.krb5_cc_set_flags @85 + krb5_cc_start_seq_get = heimdal.krb5_cc_start_seq_get @86 + krb5_cc_store_cred = heimdal.krb5_cc_store_cred @87 + krb5_cccol_cursor_free = heimdal.krb5_cccol_cursor_free @88 + krb5_cccol_cursor_new = heimdal.krb5_cccol_cursor_new @89 + krb5_cccol_cursor_next = heimdal.krb5_cccol_cursor_next @90 + krb5_change_password = heimdal.krb5_change_password @91 + krb5_clear_error_message = heimdal.krb5_clear_error_message @94 + krb5_copy_addresses = heimdal.krb5_copy_addresses @95 + krb5_copy_checksum = heimdal.krb5_copy_checksum @98 + krb5_copy_creds = heimdal.krb5_copy_creds @100 + krb5_copy_data = heimdal.krb5_copy_data @101 + krb5_copy_keyblock = heimdal.krb5_copy_keyblock @102 + krb5_copy_keyblock_contents = heimdal.krb5_copy_keyblock_contents @103 + krb5_copy_principal = heimdal.krb5_copy_principal @104 + krb5_copy_ticket = heimdal.krb5_copy_ticket @105 + krb5_decrypt = heimdal.krb5_decrypt @107 + krb5_encrypt = heimdal.krb5_encrypt @111 + krb5_enctype_to_string = heimdal.krb5_enctype_to_string @113 + krb5_free_addresses = heimdal.krb5_free_addresses @117 + krb5_free_ap_rep_enc_part = heimdal.krb5_free_ap_rep_enc_part @118 + krb5_free_authenticator = heimdal.krb5_free_authenticator @121 + krb5_free_checksum = heimdal.krb5_free_checksum @122 + krb5_free_checksum_contents = heimdal.krb5_free_checksum_contents @123 + krb5_free_config_files = heimdal.krb5_free_config_files @125 + krb5_free_context = heimdal.krb5_free_context @126 + krb5_free_cred_contents = heimdal.krb5_free_cred_contents @127 + krb5_free_creds = heimdal.krb5_free_creds @128 + krb5_free_data = heimdal.krb5_free_data @129 + krb5_free_data_contents = heimdal.krb5_free_data_contents @130 + krb5_free_error = heimdal.krb5_free_error @133 + krb5_free_error_message = heimdal.krb5_free_error_message @134 + krb5_free_host_realm = heimdal.krb5_free_host_realm @135 + krb5_free_keyblock = heimdal.krb5_free_keyblock @136 + krb5_free_keyblock_contents = heimdal.krb5_free_keyblock_contents @137 + krb5_free_principal = heimdal.krb5_free_principal @140 + krb5_free_ticket = heimdal.krb5_free_ticket @142 + krb5_free_unparsed_name = heimdal.krb5_free_unparsed_name @143 + krb5_fwd_tgt_creds = heimdal.krb5_fwd_tgt_creds @144 + krb5_get_credentials = heimdal.krb5_get_credentials @145 + krb5_get_default_config_files = heimdal.krb5_get_default_config_files @148 + krb5_get_default_realm = heimdal.krb5_get_default_realm @149 + krb5_get_error_message = heimdal.krb5_get_error_message @150 + krb5_get_host_realm = heimdal.krb5_get_host_realm @151 + krb5_get_in_tkt = heimdal.krb5_get_in_tkt @152 + krb5_get_in_tkt_with_keytab = heimdal.krb5_get_in_tkt_with_keytab @153 + krb5_get_in_tkt_with_password = heimdal.krb5_get_in_tkt_with_password @154 + krb5_get_in_tkt_with_skey = heimdal.krb5_get_in_tkt_with_skey @155 + krb5_get_init_creds_keytab = heimdal.krb5_get_init_creds_keytab @156 + krb5_get_init_creds_opt_alloc = heimdal.krb5_get_init_creds_opt_alloc @157 + krb5_get_init_creds_opt_free = heimdal.krb5_get_init_creds_opt_free @158 + krb5_get_init_creds_opt_init = heimdal.krb5_get_init_creds_opt_init @161 + krb5_get_init_creds_opt_set_address_list = heimdal.krb5_get_init_creds_opt_set_address_list @162 + krb5_get_init_creds_opt_set_etype_list = heimdal.krb5_get_init_creds_opt_set_etype_list @164 + krb5_get_init_creds_opt_set_forwardable = heimdal.krb5_get_init_creds_opt_set_forwardable @165 + krb5_get_init_creds_opt_set_preauth_list = heimdal.krb5_get_init_creds_opt_set_preauth_list @167 + krb5_get_init_creds_opt_set_proxiable = heimdal.krb5_get_init_creds_opt_set_proxiable @168 + krb5_get_init_creds_opt_set_renew_life = heimdal.krb5_get_init_creds_opt_set_renew_life @169 + krb5_get_init_creds_opt_set_salt = heimdal.krb5_get_init_creds_opt_set_salt @170 + krb5_get_init_creds_opt_set_tkt_life = heimdal.krb5_get_init_creds_opt_set_tkt_life @171 + krb5_get_init_creds_password = heimdal.krb5_get_init_creds_password @172 + krb5_get_renewed_creds = heimdal.krb5_get_renewed_creds @175 + krb5_get_server_rcache = heimdal.krb5_get_server_rcache @176 + krb5_init_context = heimdal.krb5_init_context @180 + krb5_is_thread_safe = heimdal.krb5_is_thread_safe @186 + krb5_kt_add_entry = heimdal.krb5_kt_add_entry @187 + krb5_kt_close = heimdal.krb5_kt_close @188 + krb5_kt_default = heimdal.krb5_kt_default @189 + krb5_kt_default_name = heimdal.krb5_kt_default_name @190 + krb5_kt_end_seq_get = heimdal.krb5_kt_end_seq_get @191 + krb5_kt_free_entry = heimdal.krb5_kt_free_entry @192 + krb5_kt_get_entry = heimdal.krb5_kt_get_entry @193 + krb5_kt_get_name = heimdal.krb5_kt_get_name @194 + krb5_kt_get_type = SHIM_krb5_kt_get_type @195 + krb5_kt_next_entry = heimdal.krb5_kt_next_entry @196 + krb5_kt_read_service_key = heimdal.krb5_kt_read_service_key @197 + krb5_kt_remove_entry = heimdal.krb5_kt_remove_entry @198 + krb5_kt_resolve = heimdal.krb5_kt_resolve @199 + krb5_kt_start_seq_get = heimdal.krb5_kt_start_seq_get @200 + krb5_kuserok = heimdal.krb5_kuserok @201 + krb5_mk_error = SHIM_krb5_mk_error @203 + krb5_mk_priv = heimdal.krb5_mk_priv @205 + krb5_mk_rep = heimdal.krb5_mk_rep @206 + krb5_mk_req = heimdal.krb5_mk_req @207 + krb5_mk_req_extended = heimdal.krb5_mk_req_extended @208 + krb5_mk_safe = heimdal.krb5_mk_safe @209 + krb5_parse_name = heimdal.krb5_parse_name @211 + krb5_principal_compare = heimdal.krb5_principal_compare @213 + krb5_prompter_posix = heimdal.krb5_prompter_posix @215 + krb5_rc_close = heimdal.krb5_rc_close @217 + krb5_rd_cred = heimdal.krb5_rd_cred @218 + krb5_rd_error = heimdal.krb5_rd_error @219 + krb5_rd_priv = heimdal.krb5_rd_priv @220 + krb5_rd_rep = heimdal.krb5_rd_rep @221 + krb5_rd_req = heimdal.krb5_rd_req @222 + krb5_rd_safe = heimdal.krb5_rd_safe @223 + krb5_realm_compare = heimdal.krb5_realm_compare @225 + krb5_recvauth = heimdal.krb5_recvauth @226 + krb5_salttype_to_string = SHIM_krb5_salttype_to_string @228 + krb5_sendauth = heimdal.krb5_sendauth @229 + krb5_set_default_realm = heimdal.krb5_set_default_realm @240 + krb5_set_error_message = heimdal.krb5_set_error_message @242 + krb5_set_password = heimdal.krb5_set_password @243 + krb5_set_password_using_ccache = heimdal.krb5_set_password_using_ccache @244 + krb5_set_real_time = heimdal.krb5_set_real_time @246 + krb5_sname_to_principal = heimdal.krb5_sname_to_principal @248 + krb5_string_to_deltat = heimdal.krb5_string_to_deltat @250 + krb5_string_to_enctype = SHIM_krb5_string_to_enctype @251 + krb5_string_to_key = heimdal.krb5_string_to_key @252 + krb5_string_to_salttype = SHIM_krb5_string_to_salttype @253 + krb5_timeofday = heimdal.krb5_timeofday @255 + krb5_unparse_name = heimdal.krb5_unparse_name @258 + krb5_us_timeofday = heimdal.krb5_us_timeofday @260 + krb5_verify_checksum = SHIM_krb5_verify_checksum @262 + krb5_verify_init_creds = heimdal.krb5_verify_init_creds @263 + krb5_verify_init_creds_opt_init = heimdal.krb5_verify_init_creds_opt_init @264 + krb5_verify_init_creds_opt_set_ap_req_nofail = heimdal.krb5_verify_init_creds_opt_set_ap_req_nofail @265 + krb5_vset_error_message = heimdal.krb5_vset_error_message @266 diff --git a/packages/windows/kfw_shim/krb5_shim.c b/packages/windows/kfw_shim/krb5_shim.c new file mode 100644 index 000000000..ebe568b1c --- /dev/null +++ b/packages/windows/kfw_shim/krb5_shim.c @@ -0,0 +1,88 @@ +#include +#include + +krb5_boolean __cdecl +SHIM_krb5_address_search(krb5_context context, + const krb5_address *addr, + const krb5_address *const *addrlist) +{ + if (!addrlist) + return TRUE; + for (; *addrlist; addrlist++) { + if (krb5_address_compare(context, addr, *addrlist)) + return TRUE; + } + return FALSE; +} + + +krb5_error_code __cdecl +SHIM_krb5_auth_con_getrcache(krb5_context context, + krb5_auth_context auth_context, + krb5_rcache *rcache) +{ + return krb5_auth_con_getrcache(context, auth_context, rcache); +} + +krb5_error_code __cdecl +SHIM_krb5_auth_con_setaddrs(krb5_context context, + krb5_auth_context auth_context, + krb5_address *local_addr, + krb5_address *remote_addr) +{ + return krb5_auth_con_setaddrs(context, auth_context, + local_addr, remote_addr); +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_cc_gen_new (krb5_context context, krb5_ccache *cache) +{ + return (*cache)->ops->gen_new(context, cache); +} + +const char * KRB5_CALLCONV +SHIM_krb5_kt_get_type(krb5_context context, krb5_keytab keytab) +{ + return keytab->prefix; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_mk_error(krb5_context context, const void *dec_err, void *enc_err) +{ + return -1; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_salttype_to_string(int salttype, char *buffer, size_t buflen) +{ + return -1; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_string_to_enctype(char *string, krb5_enctype *enctypep) +{ + return -1; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_string_to_salttype(char *string, int *salttypep) +{ + return -1; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_verify_checksum(krb5_context context, krb5_cksumtype ctype, + const krb5_checksum *cksum, krb5_const_pointer in, + size_t in_length, krb5_const_pointer seed, + size_t seed_length) +{ + return -1; +} + +krb5_error_code KRB5_CALLCONV +SHIM_krb5_c_decrypt(krb5_context context, const krb5_keyblock *key, + krb5_keyusage usage, const krb5_data *ivec, + krb5_enc_data *input, krb5_data *output) +{ + return krb5_c_decrypt(context, *key, usage, ivec, input, output); +} diff --git a/windows/NTMakefile.config b/windows/NTMakefile.config index 4f49a3d5f..ab9053fe1 100644 --- a/windows/NTMakefile.config +++ b/windows/NTMakefile.config @@ -3,13 +3,13 @@ VER_PACKAGE=heimdal VER_PACKAGE_NAME=Heimdal VER_PACKAGE_BUGREPORT=heimdal-bugs@h5l.org -VER_PACKAGE_VERSION=1.2.2rc1 -VER_PACKAGE_COPYRIGHT=(C) +VER_PACKAGE_VERSION=1.3.99 +VER_PACKAGE_COPYRIGHT=Copyright (C) 1995-2010 Royal Institute of Technology, Stockholm, Sweden VER_PACKAGE_COMPANY=www.h5l.org VER_PRODUCT_MAJOR=1 -VER_PRODUCT_MINOR=2 -VER_PRODUCT_AUX=2001 +VER_PRODUCT_MINOR=3 +VER_PRODUCT_AUX=99 VER_PRODUCT_PATCH=0 # Define to 1 if this is a pre-release build. Undefine otherwise diff --git a/windows/NTMakefile.w32 b/windows/NTMakefile.w32 index bde9aa200..f719fd8f0 100644 --- a/windows/NTMakefile.w32 +++ b/windows/NTMakefile.w32 @@ -59,6 +59,14 @@ SRC=$(MAKEDIR)\..\..\.. ! error Cant determine source directory !endif +! if "$(CPU)"=="i386" || "$(CPU)"=="x86" +MCPU=x86 +! elseif "$(CPU)"=="AMD64" +MCPU=amd64 +! else +! error Unknown CPU +! endif + !include "NTMakefile.config" #---------------------------------------------------------------- @@ -72,6 +80,7 @@ LIBDIR =$(DESTDIR)\lib BINDIR =$(DESTDIR)\bin SBINDIR=$(BINDIR) LIBEXECDIR=$(BINDIR) +ASMDIR=$(BINDIR) !ifdef RELDIR SRCDIR =$(SRC)\$(RELDIR) @@ -95,38 +104,18 @@ RM=del /q ECHO=echo RC=rc -!ifndef AWK AWK=gawk.exe -!endif - -!ifndef YACC YACC=bison.exe -y -!endif - -!ifndef LEX LEX=flex.exe -!endif - -!ifndef PYTHON PYTHON=python.exe -!endif - -!ifndef PERL PERL=perl.exe -!endif - -!ifndef CMP CMP=cmp.exe -!endif +SIGNTOOL=signtool.exe +MAKECAT=makecat.exe # Only used for tests -!ifndef SH SH=sh.exe -!endif - -!ifndef SED SED=sed.exe -!endif #---------------------------------------------------------------- # External dependencies @@ -148,7 +137,30 @@ pthreadinc= -I$(PTHREAD_INC) cincdirs=$(cincdirs) -I$(INCDIR) -I$(INCDIR)\krb5 $(pthreadinc) cdefines=$(cdefines) -DHAVE_CONFIG_H -cwarn=$(cwarn) -D_CRT_SECURE_NO_WARNINGS -wd4996 -wd4127 -wd4244 -wd4100 + +# --------------------------------------------------------------- +# time_t issues + +!if "$(MCPU)"=="x86" +cdefines=$(cdefines) -D_USE_32BIT_TIME_T +!endif + +# Disable warnings: +# +# C4996: 'function' was declared deprecated +# C4127: Conditional expression is constant +# C4244: Conversion from 'type1' to 'type2', possible loss of data +# C4100: 'identifier': unreferenced formal parameter +# C4706: Assignment within conditional expression +# C4214: Nonstandard extension used +# C4267: '': Conversion from 'type1' to 'type2', possible loss of data +# C4018: '': Signed/unsigned mismatch +# C4204: Nonstandard extension used: non-constant aggregate initializer +# C4221: Nonstandard extension used: 'v1': cannot be initialized using address of automatic variable 'v2' +# C4295: '': Array is too small to include a terminating null character +# +cwarn=$(cwarn) -D_CRT_SECURE_NO_WARNINGS -wd4996 -wd4127 -wd4244 -wd4100 -wd4706 +cwarn=$(cwarn) -wd4214 -wd4267 -wd4018 -wd4389 -wd4204 -wd4221 -wd4295 !if "$(CPU)"=="i386" libmach=/machine:X86 @@ -160,19 +172,19 @@ libmach=/machine:X64 !ifndef STATICRUNTIME -C2OBJ_C = $(CC) $(cdebug) $(cflags) $(cvarsdll) $(AUXCFLAGS) $(cdefines) $(cincdirs) $(cwarn) -EXECONLINK_C = $(LINK) $(ldebug) $(conlflags) $(conlibsdll) -EXEGUILINK_C = $(LINK) $(ldebug) $(guilflags) $(guilibsdll) -DLLCONLINK_C = $(LINK) $(ldebug) $(dlllflags) $(conlibsdll) -DLLGUILINK_C = $(LINK) $(ldebug) $(dlllflags) $(guilibsdll) +C2OBJ_C = $(CC) $(cdebug) $(cflags) $(cvarsdll) $(AUXCFLAGS) $(intcflags) $(cdefines) $(cincdirs) $(cwarn) +EXECONLINK_C = $(LINK) $(ldebug) $(conlflags) $(conlibsdll) $(libmach) +EXEGUILINK_C = $(LINK) $(ldebug) $(guilflags) $(guilibsdll) $(libmach) +DLLCONLINK_C = $(LINK) $(ldebug) $(dlllflags) $(conlibsdll) $(libmach) +DLLGUILINK_C = $(LINK) $(ldebug) $(dlllflags) $(guilibsdll) $(libmach) !else # STATICRUNTIME -C2OBJ_C = $(CC) $(cdebug) $(cflags) $(cvarsmt) $(AUXCFLAGS) $(cdefines) $(cincdirs) $(cwarn) -EXECONLINK_C = $(LINK) $(ldebug) $(conlflags) $(conlibsmt) -EXEGUILINK_C = $(LINK) $(ldebug) $(guilflags) $(guilibsmt) -DLLCONLINK_C = $(LINK) $(ldebug) $(dlllflags) $(conlibsmt) -DLLGUILINK_C = $(LINK) $(ldebug) $(dlllflags) $(guilibsmt) +C2OBJ_C = $(CC) $(cdebug) $(cflags) $(cvarsmt) $(AUXCFLAGS) $(intcflags) $(cdefines) $(cincdirs) $(cwarn) +EXECONLINK_C = $(LINK) $(ldebug) $(conlflags) $(conlibsmt) $(libmach) +EXEGUILINK_C = $(LINK) $(ldebug) $(guilflags) $(guilibsmt) $(libmach) +DLLCONLINK_C = $(LINK) $(ldebug) $(dlllflags) $(conlibsmt) $(libmach) +DLLGUILINK_C = $(LINK) $(ldebug) $(dlllflags) $(guilibsmt) $(libmach) !endif @@ -180,6 +192,8 @@ LIBGUI_C = $(LM) /nologo $(libmach) /SUBSYSTEM:WINDOWS LIBCON_C = $(LM) /nologo $(libmach) /SUBSYSTEM:CONSOLE C2OBJ = $(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** +C2OBJ_NP = $(C2OBJ_C) -MP $< +C2OBJ_P = $(C2OBJ_NP) -Fo$(OBJ)\ -Fd$(OBJ)\ # EXECONLINK = $(EXECONLINK_C) -OUT:$@ $** EXEGUILINK = $(EXEGUILINK_C) -OUT:$@ $** DLLCONLINK = $(DLLCONLINK_C) -OUT:$@ $** @@ -202,7 +216,7 @@ RC2RES = $(RC2RES_C) -fo $@ $** !ifndef RECURSE check-utils: - @for %%g in ( "$(AWK)" "$(YACC)" "$(LEX)" "$(PYTHON)" "$(PERL)" "$(CMP)" ) do @( \ + @for %%g in ( "$(AWK)" "$(YACC)" "$(LEX)" "$(PYTHON)" "$(PERL)" "$(CMP)" "$(SED)" "$(SIGNTOOL)" "$(MAKECAT)" ) do @( \ for /f %%f in ( "%%g" ) do @( \ if exist %%f @( \ echo Found %%f \ @@ -214,7 +228,7 @@ check-utils: ) \ ) \ ) - @for %%g in ( "$(SH)" "$(SED)" ) do @( \ + @for %%g in ( "$(SH)" ) do @( \ for /f %%f in ( "%%g" ) do @( \ if exist %%f @( \ echo Found %%f \ @@ -247,19 +261,27 @@ show-cmds: prep:: show-cmds -!endif +!endif # RECURSE -{}.c{$(OBJ)}.obj: - $(C2OBJ) +{}.c{$(OBJ)}.obj:: + $(C2OBJ_C) /Fd$(OBJ)\ /Fo$(OBJ)\ /MP @<< +$< +<< -{$(OBJ)}.c{$(OBJ)}.obj: - $(C2OBJ) +{$(OBJ)}.c{$(OBJ)}.obj:: + $(C2OBJ_C) /Fd$(OBJ)\ /Fo$(OBJ)\ /MP @<< +$< +<< -{}.cpp{$(OBJ)}.obj: - $(C2OBJ) +{}.cpp{$(OBJ)}.obj:: + $(C2OBJ_C) /Fd$(OBJ)\ /Fo$(OBJ)\ /MP @<< +$< +<< -{$(OBJ)}.cpp{$(OBJ)}.obj: - $(C2OBJ) +{$(OBJ)}.cpp{$(OBJ)}.obj:: + $(C2OBJ_C) /Fd$(OBJ)\ /Fo$(OBJ)\ /MP @<< +$< +<< {}.hin{$(INCDIR)}.h: $(CP) $< $@ @@ -291,6 +313,8 @@ prep:: show-cmds !ifdef RELDIR all:: announce +all-tools:: announce-tools + test:: announce clean:: announce @@ -298,6 +322,10 @@ clean:: announce announce: @echo. @echo --------- Entering $(RELDIR:\= ): + +announce-tools: + @echo. + @echo --------- Entering $(RELDIR:\= ) tools: !endif #---------------------------------------------------------------------- @@ -339,13 +367,13 @@ mkdirs: !ifdef SUBDIRS subdirs: - @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) && cd ..) || exit /b 1 + @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) && popd) || exit /b 1 clean-subdirs: - @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) clean && cd ..) || exit /b 1 + @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) clean && popd) || exit /b 1 test-subdirs: - @for %%f in ( $(SUBDIRS) ) do @ (cd %%f && $(RMAKE) test && cd ..) || exit /b 1 + @for %%f in ( $(SUBDIRS) ) do @ (pushd %%f && $(RMAKE) test && popd) || exit /b 1 all:: subdirs @@ -386,10 +414,10 @@ clean:: MT=mt.exe -nologo _VC_MANIFEST_EMBED_EXE= \ -if exist $@.manifest $(MT) -outputresource:$@;1 -manifest $@.manifest +( if exist $@.manifest $(MT) -outputresource:$@;1 -manifest $@.manifest ) _VC_MANIFEST_EMBED_DLL= \ -if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest +( if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest ) # Note that if you are merging manifests, then the VS generated # manifest should be cleaned up after calling _VC_MANIFEST_EMBED_???. @@ -398,15 +426,35 @@ if exist $@.manifest $(MT) -outputresource:$@;2 -manifest $@.manifest # be used. _VC_MANIFEST_CLEAN= \ -if exist $@.manifest $(RM) $@.manifest +( if exist $@.manifest $(RM) $@.manifest ) # End of manifest handling -# Code signing +#---------------------------------------------------------------------- +# Code and assembly signing +# +# SIGNTOOL_C is any set of options required for certificate/private +# key selection for code signging. +# +# SIGNTOOL_O is any set of additional options to signtool.exe +# +# SIGNTOOL_T is the timestamp option + !ifdef CODESIGN -_CODESIGN=$(CODESIGN) $@ +_CODESIGN=( $(CODESIGN) $@ ) !else -_CODESIGN= + +!ifdef SIGNTOOL_C + +!ifndef SIGNTOOL_T +SIGNTOOL_T=/t http://timestamp.verisign.com/scripts/timstamp.dll +!endif + +_CODESIGN=( $(SIGNTOOL) sign $(SIGNTOOL_O) $(SIGNTOOL_T) $(SIGNTOOL_C) /v $@ ) +!else +_CODESIGN=( echo Skipping code sign ) +!endif + !endif #---------------------------------------------------------------------- @@ -416,44 +464,44 @@ _CODESIGN= # prepare binaries. EXEPREP=\ -$(_VC_MANIFEST_EMBED_EXE)^ -$(_VC_MANIFEST_CLEAN)^ -$(_CODESIGN) +( $(_VC_MANIFEST_EMBED_EXE) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ EXEPREP_NODIST=\ -$(_VC_MANIFEST_EMBED_EXE)^ -$(_VC_MANIFEST_CLEAN) +( $(_VC_MANIFEST_EMBED_EXE) && $(_VC_MANIFEST_CLEAN) ) || $(RM) $@ DLLPREP=\ -$(_VC_MANIFEST_EMBED_DLL)^ -$(_VC_MANIFEST_CLEAN)^ -$(_CODESIGN) +( $(_VC_MANIFEST_EMBED_DLL) && $(_VC_MANIFEST_CLEAN) && $(_CODESIGN) ) || $(RM) $@ DLLPREP_NODIST=\ -$(_VC_MANIFEST_EMBED_DLL)^ -$(_VC_MANIFEST_CLEAN) +( $(_VC_MANIFEST_EMBED_DLL) && $(_VC_MANIFEST_CLEAN) ) || $(RM) $@ #---------------------------------------------------------------------- -# Convenience macros for import libraries +# Convenience macros for import libraries and assemblies # -LIBROKEN =$(LIBDIR)\libroken.lib -LIBVERS =$(LIBDIR)\libvers.lib -LIBEDITLINE =$(LIBDIR)\libeditline.lib -LIBCOMERR =$(LIBDIR)\libcom_err.lib -LIBSL =$(LIBDIR)\libsl.lib -LIBWIND =$(LIBDIR)\libwind.lib LIBASN1 =$(LIBDIR)\libasn1.lib -LIBSQLITE =$(LIBDIR)\libsqlite.lib +LIBCOMERR =$(LIBDIR)\libcom_err.lib +LIBEDITLINE =$(LIBDIR)\libeditline.lib +LIBGSSAPI =$(LIBDIR)\libgssapi.lib LIBHCRYPTO =$(LIBDIR)\libhcrypto.lib -LIBHX509 =$(LIBDIR)\libhx509.lib -LIBKRB5 =$(LIBDIR)\libkrb5.lib -LIBHEIMNTLM =$(LIBDIR)\libheimntlm.lib +LIBHDB =$(LIBDIR)\libhdb.lib +LIBHEIMDAL =$(LIBDIR)\heimdal.lib LIBHEIMIPCC =$(LIBDIR)\libheim-ipcc.lib LIBHEIMIPCS =$(LIBDIR)\libheim-ipcs.lib -LIBGSSAPI =$(LIBDIR)\libgssapi.lib -LIBHDB =$(LIBDIR)\libhdb.lib -LIBKADM5SRV =$(LIBDIR)\libkadm5srv.lib +LIBHEIMNTLM =$(LIBDIR)\libheimntlm.lib +LIBHX509 =$(LIBDIR)\libhx509.lib LIBKADM5CLNT=$(LIBDIR)\libkadm5clnt.lib +LIBKADM5SRV =$(LIBDIR)\libkadm5srv.lib LIBKDC =$(LIBDIR)\libkdc.lib LIBLTM =$(LIBDIR)\libltm.lib +LIBKRB5 =$(LIBDIR)\libkrb5.lib +LIBROKEN =$(LIBDIR)\libroken.lib +LIBSL =$(LIBDIR)\libsl.lib +LIBSQLITE =$(LIBDIR)\libsqlite.lib +LIBVERS =$(LIBDIR)\libvers.lib +LIBWIND =$(LIBDIR)\libwind.lib + +ASMKRBNAME =Heimdal.Kerberos +ASMGSSNAME =Heimdal.GSSAPI +APPMANIFEST =$(INCDIR)\Heimdal.Application.$(MCPU).manifest + diff --git a/windows/version.rc b/windows/version.rc index cb345f27f..59d197869 100644 --- a/windows/version.rc +++ b/windows/version.rc @@ -1,3 +1,51 @@ +/*********************************************************************** + * Copyright (c) 2010, Secure Endpoints Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + **********************************************************************/ + +/* + * This version script is not meant to be used as-is. It requires the + * following parameters that must be supplied using preprocessor + * macros: + * + * RC_FILE_TYPE (Set to either VFT_DLL or VFT_APP) + * RC_FILE_DESC_0409 (File description (English)) + * RC_FILE_ORIG_0409 (Original file name (English)) + * + * The following macros are optional: + * + * RC_FILE_SUBTYPE (File subtype. See MSDN.) + * RC_FILEVER_C (Comma separated file version, if different from + * product version) + * RC_FILE_COMMENT_0409 (File comment (English)) + */ + #include #include @@ -36,10 +84,6 @@ values as a substitute */ #define RC_FILE_VER_0409 RC_PRODUCT_VER_0409 #endif -#ifndef RC_FILE_SUBTYPE -#define RC_FILE_SUBTYPE VFT2_UNKNOWN -#endif - #ifndef RC_FILE_INTERNAL_0409 #define RC_FILE_INTERNAL_0409 RC_FILE_ORIG_0409 #endif @@ -51,7 +95,9 @@ values as a substitute */ FILEFLAGS (P_DEBUG|P_PRE|P_PRIVATE|P_SPECIAL) FILEOS VOS_NT FILETYPE RC_FILE_TYPE +#ifdef RC_FILE_SUBTYPE FILESUBTYPE RC_FILE_SUBTYPE +#endif BEGIN BLOCK "StringFileInfo" BEGIN @@ -65,9 +111,7 @@ values as a substitute */ #ifdef RC_FILE_COMMENT_0409 VALUE "Comments", RC_FILE_COMMENT_0409 #endif -#ifdef RC_FILE_DESC_0409 VALUE "FileDescription", RC_FILE_DESC_0409 -#endif VALUE "FileVersion", RC_FILE_VER_0409 VALUE "InternalName", RC_FILE_INTERNAL_0409 VALUE "OriginalFilename", RC_FILE_ORIG_0409