diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-01-19 13:15:45 +0100 |
---|---|---|
committer | Joseph Sutton <jsutton@samba.org> | 2022-01-19 21:41:59 +0000 |
commit | 7055827b8ffd3823c1240ba3f0b619dd6068cd51 (patch) | |
tree | abb14aa7455bde7b1b33b706123c57ccfc28fcaa /third_party/heimdal/packages/windows/assembly | |
parent | 1954e50f266256c9e153c9613f49f9d9f5dbf67b (diff) | |
download | samba-7055827b8ffd3823c1240ba3f0b619dd6068cd51.tar.gz |
HEIMDAL: move code from source4/heimdal* to third_party/heimdal*
This makes it clearer that we always want to do heimdal changes
via the lorikeet-heimdal repository.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Joseph Sutton <jsutton@samba.org>
Autobuild-Date(master): Wed Jan 19 21:41:59 UTC 2022 on sn-devel-184
Diffstat (limited to 'third_party/heimdal/packages/windows/assembly')
4 files changed, 242 insertions, 0 deletions
diff --git a/third_party/heimdal/packages/windows/assembly/Heimdal.Application.manifest.in b/third_party/heimdal/packages/windows/assembly/Heimdal.Application.manifest.in new file mode 100644 index 00000000000..2fbc77f7689 --- /dev/null +++ b/third_party/heimdal/packages/windows/assembly/Heimdal.Application.manifest.in @@ -0,0 +1,12 @@ +<?xml version="1" encoding="UTF-8" standalone="yes" ?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <dependency> + <dependentAssembly> + <assemblyIdentity type="win32" name="@krbname@" + language="*" + processorArchitecture="@cpu@" + version="@krbversion@" + publicKeyToken="@pkt@" /> + </dependentAssembly> + </dependency> +</assembly> diff --git a/third_party/heimdal/packages/windows/assembly/Heimdal.Kerberos.manifest.in b/third_party/heimdal/packages/windows/assembly/Heimdal.Kerberos.manifest.in new file mode 100644 index 00000000000..515b441c89a --- /dev/null +++ b/third_party/heimdal/packages/windows/assembly/Heimdal.Kerberos.manifest.in @@ -0,0 +1,19 @@ +<?xml version="1" encoding="UTF-8" standalone="yes" ?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity type="win32" name="@name@" + processorArchitecture="@cpu@" + version="@version@" + publicKeyToken="@pkt@" /> + <file name="heimdal.dll" hashalg="SHA1" /> + <file name="com_err.dll" hashalg="SHA1" /> + <file name="heimntlm.dll" hashalg="SHA1" /> + <file name="gssapi.dll" hashalg="SHA1" /> + <file name="libhdb.dll" hashalg="SHA1" /> + <file name="libkadm5srv.dll" hashalg="SHA1" /> + <file name="heimdal.pdb" hashalg="SHA1" /> + <file name="com_err.pdb" hashalg="SHA1" /> + <file name="heimntlm.pdb" hashalg="SHA1" /> + <file name="gssapi.pdb" hashalg="SHA1" /> + <file name="libhdb.pdb" hashalg="SHA1" /> + <file name="libkadm5srv.pdb" hashalg="SHA1" /> +</assembly> diff --git a/third_party/heimdal/packages/windows/assembly/NTMakefile b/third_party/heimdal/packages/windows/assembly/NTMakefile new file mode 100644 index 00000000000..183856e0e85 --- /dev/null +++ b/third_party/heimdal/packages/windows/assembly/NTMakefile @@ -0,0 +1,192 @@ +######################################################################## +# +# 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 <path to certificate> +# +# ..to derive the public key token. +# +!ifndef CODESIGN_PKT +! error CODESIGN_PKT should be set to the public key token for codesigning certificate. (See Windows\README). +!endif + +prep:: mk-asm-dirs + +# ---------------------------------------------------------------------- +# Heimdal.Kerberos Assembly + +ASMKRBDIR=$(ASMDIR)\$(ASMKRBNAME) +ASMKRBVER=$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(VER_PRODUCT_AUX).$(VER_PRODUCT_PATCH) +ASMKRBVER_OLD_BEGIN=$(VER_OLD_BEGIN_MAJOR).$(VER_OLD_BEGIN_MINOR).$(VER_OLD_BEGIN_AUX).$(VER_OLD_BEGIN_PATCH) +ASMKRBVER_OLD_END=$(VER_OLD_END_MAJOR).$(VER_OLD_END_MINOR).$(VER_OLD_END_AUX).$(VER_OLD_END_PATCH) +ASMKRBMAN=$(ASMKRBNAME).manifest + +ASMKRBBINS=\ + $(ASMKRBDIR)\heimdal.dll \ + $(ASMKRBDIR)\com_err.dll \ + $(ASMKRBDIR)\heimntlm.dll \ + $(ASMKRBDIR)\gssapi.dll \ + $(ASMKRBDIR)\libhdb.dll \ + $(ASMKRBDIR)\libkadm5srv.dll \ + $(ASMKRBDIR)\heimdal.pdb \ + $(ASMKRBDIR)\com_err.pdb \ + $(ASMKRBDIR)\heimntlm.pdb \ + $(ASMKRBDIR)\gssapi.pdb \ + $(ASMKRBDIR)\libhdb.pdb \ + $(ASMKRBDIR)\libkadm5srv.pdb + +!if ("$(CPU)" == "i386") +ARCH=32 +!elseif ("$(CPU)" == "x86") +ARCH=32 +!else +ARCH=64 +!endif + +$(ASMKRBDIR)\$(ASMKRBMAN).nohash: Heimdal.Kerberos.manifest.in + $(SED) -e "s,[@]name[@],$(ASMKRBNAME),g" \ + -e "s,[@]krbname[@],$(ASMKRBNAME),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]version[@],$(ASMKRBVER),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" \ + -e "s,[@]arch[@],$(ARCH),g" \ + < $** > $@ + +$(ASMKRBDIR)\$(ASMKRBMAN) $(ASMKRBDIR)\$(ASMKRBMAN).cdf: \ + $(ASMKRBDIR)\$(ASMKRBMAN).nohash $(ASMKRBBINS) + -$(RM) $(ASMKRBDIR)\$(ASMKRBMAN) + -$(RM) $(ASMKRBDIR)\$(ASMKRBMAN).cdf + $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN).nohash -out:$(ASMKRBDIR)\$(ASMKRBMAN) -hashupdate -makecdfs + +$(ASMKRBDIR)\$(ASMKRBNAME).cat: $(ASMKRBDIR)\$(ASMKRBMAN).cdf + cd $(ASMKRBDIR) + $(MAKECAT) $** + $(_CODESIGN) + $(_CODESIGN_SHA256) + cd $(SRCDIR) + +asm-krb: \ + $(APPMANIFEST) \ + $(ASMKRBBINS) \ + $(ASMKRBDIR)\$(ASMKRBMAN) \ + $(ASMKRBDIR)\$(ASMKRBNAME).cat \ + +all:: asm-krb + +clean:: + -$(RM) $(ASMKRBDIR)\*.* + +!ifdef APPVEYOR +test:: + true +!else +test:: + $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN) -validate_manifest +!endif + +{$(BINDIR)}.dll{$(ASMKRBDIR)}.dll: + $(CP) $< $@ + $(DLLPREP_MERGE) + +{$(BINDIR)}.pdb{$(ASMKRBDIR)}.pdb: + $(CP) $< $@ + +# ---------------------------------------------------------------------- +# Application manifests + +all:: $(APPMANIFEST) + +clean:: + -$(RM) $(APPMANIFEST) + +$(APPMANIFEST): Heimdal.Application.manifest.in + $(SED) -e "s,[@]krbname[@],$(ASMKRBNAME),g" \ + -e "s,[@]krbversion[@],$(ASMKRBVER),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@ + +!ifdef APPVEYOR +test:: + true +!else +test:: + $(MT) -manifest $(APPMANIFEST) -validate_manifest +!endif + +# ---------------------------------------------------------------------- +# Publisher configuration files + +POLKRB=policy.$(VER_PRODUCT_MAJOR).$(VER_PRODUCT_MINOR).$(ASMKRBNAME) +POLKRBDIR=$(ASMDIR)\$(POLKRB) +POLKRBFILE=$(POLKRBDIR)\$(ASMKRBVER).pol +POLKRBCAT=$(POLKRBDIR)\$(ASMKRBVER).cat + +$(POLKRBFILE): policy.Heimdal.Kerberos.in + $(SED) -e "s,[@]krbname[@],$(ASMKRBNAME),g" \ + -e "s,[@]krbversion[@],$(ASMKRBVER),g" \ + -e "s,[@]krbverfrom_begin[@],$(ASMKRBVER_OLD_BEGIN),g" \ + -e "s,[@]krbverfrom_end[@],$(ASMKRBVER_OLD_END),g" \ + -e "s,[@]krbpolname[@],$(POLKRB),g" \ + -e "s,[@]cpu[@],$(MCPU),g" \ + -e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@ + +$(POLKRBFILE).cdf: $(POLKRBFILE) + $(MT) -manifest $(POLKRBFILE) -makecdfs + +$(POLKRBCAT): $(POLKRBFILE).cdf + cd $(POLKRBDIR) + $(MAKECAT) $** + $(_CODESIGN) + $(_CODESIGN_SHA256) + cd $(SRCDIR) + +all:: $(POLKRBFILE) $(POLKRBCAT) + +clean:: + -$(RM) $(POLKRBDIR)\*.* + +# ---------------------------------------------------------------------- + +.SUFFIXES: .dll .pdb + +mk-asm-dirs: +! if !exist($(ASMKRBDIR)) + $(MKDIR) $(ASMKRBDIR) +! endif +! if !exist($(POLKRBDIR)) + $(MKDIR) $(POLKRBDIR) +! endif diff --git a/third_party/heimdal/packages/windows/assembly/policy.Heimdal.Kerberos.in b/third_party/heimdal/packages/windows/assembly/policy.Heimdal.Kerberos.in new file mode 100644 index 00000000000..ad97997d037 --- /dev/null +++ b/third_party/heimdal/packages/windows/assembly/policy.Heimdal.Kerberos.in @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <assemblyIdentity type="win32-policy" + publicKeyToken="@pkt@" + name="@krbpolname@" + version="@krbversion@" + processorArchitecture="@cpu@"/> + <dependency> + <dependentAssembly> + <assemblyIdentity type="win32" + publicKeyToken="@pkt@" + name="@krbname@" + language="*" + processorArchitecture="@cpu@"/> + <bindingRedirect oldVersion="@krbverfrom_begin@-@krbverfrom_end@" + newVersion="@krbversion@"/> + </dependentAssembly> + </dependency> +</assembly> |