diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index 0aa7c62ddf16..5a523f435935 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -7,6 +7,7 @@ PORTNAME= heimdal PORTVERSION= 1.4 +PORTREVISION= 1 CATEGORIES= security ipv6 MASTER_SITES= http://www.h5l.org/dist/src/ \ http://ftp.pdc.kth.se/pub/heimdal/src/ \ @@ -164,6 +165,8 @@ post-configure: ${WRKSRC}/lib/hcrypto/libtommath/tommath_class.h @${CP} ${FILESDIR}/lib__hcrypto__libtommath__tommath_superclass.h \ ${WRKSRC}/lib/hcrypto/libtommath/tommath_superclass.h + @${CP} ${FILESDIR}/lib__gssapi__mech__gss_pname_to_uid.c \ + ${WRKSRC}/lib/gssapi/mech/gss_pname_to_uid.c post-build: .if defined(WITH_CRACKLIB) diff --git a/security/heimdal/distinfo b/security/heimdal/distinfo index 038474c60dab..bc57841678de 100644 --- a/security/heimdal/distinfo +++ b/security/heimdal/distinfo @@ -1,3 +1,2 @@ -MD5 (heimdal-1.4.tar.gz) = 31d08bbf47a77827fe97ef3f52b4c9c4 SHA256 (heimdal-1.4.tar.gz) = c7729b946fffa9716a9a6f78b9d08115cba2da9b76afc477498b50396e3b7f6a SIZE (heimdal-1.4.tar.gz) = 6095377 diff --git a/security/heimdal/files/lib__gssapi__mech__gss_pname_to_uid.c b/security/heimdal/files/lib__gssapi__mech__gss_pname_to_uid.c new file mode 100644 index 000000000000..0c760b065226 --- /dev/null +++ b/security/heimdal/files/lib__gssapi__mech__gss_pname_to_uid.c @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2008 Isilon Inc http://www.isilon.com/ + * Authors: Doug Rabson + * Developed with Red Inc: Alfred Perlstein + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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 AUTHOR 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 AUTHOR 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. + */ +/* Original: src/lib/libgssapi/gss_pname_to_uid.c,v 1.1.2.1.4.1 2010/06/14 02:09:06 kensmith Exp */ + +#include "mech_locl.h" + +GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL +gss_pname_to_uid(OM_uint32 *minor_status, + const gss_name_t pname, + const gss_OID mech, + uid_t *uidp) +{ + struct _gss_name *name = (struct _gss_name *) pname; + gssapi_mech_interface m; + struct _gss_mechanism_name *mn; + OM_uint32 major_status; + + *minor_status = 0; + + if (pname == GSS_C_NO_NAME) + return (GSS_S_BAD_NAME); + + m = __gss_get_mechanism(mech); + if (!m) + return (GSS_S_BAD_MECH); + + if (m->gm_pname_to_uid == NULL) + return (GSS_S_UNAVAILABLE); + + major_status = _gss_find_mn(minor_status, name, mech, &mn); + if (major_status != GSS_S_COMPLETE) { + _gss_mg_error(m, major_status, *minor_status); + return (major_status); + } + + major_status = (*m->gm_pname_to_uid)(minor_status, mn->gmn_name, + mech, uidp); + if (major_status != GSS_S_COMPLETE) + _gss_mg_error(m, major_status, *minor_status); + + return (major_status); +} diff --git a/security/heimdal/files/patch-lib__gssapi__Makefile.in b/security/heimdal/files/patch-lib__gssapi__Makefile.in new file mode 100644 index 000000000000..7fabfa2c42e7 --- /dev/null +++ b/security/heimdal/files/patch-lib__gssapi__Makefile.in @@ -0,0 +1,45 @@ +--- lib/gssapi/Makefile.in.orig 2010-11-05 10:15:29.000000000 +0100 ++++ lib/gssapi/Makefile.in 2010-11-05 10:18:39.000000000 +0100 +@@ -188,7 +188,7 @@ + mech/gss_unwrap.lo mech/gss_utils.lo mech/gss_verify.lo \ + mech/gss_verify_mic.lo mech/gss_wrap.lo \ + mech/gss_wrap_size_limit.lo \ +- mech/gss_inquire_sec_context_by_oid.lo ++ mech/gss_inquire_sec_context_by_oid.lo mech/gss_pname_to_uid.lo + am__objects_3 = ntlm/accept_sec_context.lo ntlm/acquire_cred.lo \ + ntlm/add_cred.lo ntlm/canonicalize_name.lo \ + ntlm/compare_name.lo ntlm/context_time.lo ntlm/crypto.lo \ +@@ -643,6 +643,7 @@ + mech/gss_oid_to_str.c \ + mech/gss_process_context_token.c \ + mech/gss_pseudo_random.c \ ++ mech/gss_pname_to_uid.c \ + mech/gss_release_buffer.c \ + mech/gss_release_cred.c \ + mech/gss_release_name.c \ +@@ -1039,6 +1040,8 @@ + mech/$(DEPDIR)/$(am__dirstamp) + mech/gss_pseudo_random.lo: mech/$(am__dirstamp) \ + mech/$(DEPDIR)/$(am__dirstamp) ++mech/gss_pname_to_uid.lo: mech/$(am__dirstamp) \ ++ mech/$(DEPDIR)/$(am__dirstamp) + mech/gss_release_buffer.lo: mech/$(am__dirstamp) \ + mech/$(DEPDIR)/$(am__dirstamp) + mech/gss_release_cred.lo: mech/$(am__dirstamp) \ +@@ -1425,6 +1428,8 @@ + -rm -f mech/gss_process_context_token.lo + -rm -f mech/gss_pseudo_random.$(OBJEXT) + -rm -f mech/gss_pseudo_random.lo ++ -rm -f mech/gss_pname_to_uid.$(OBJEXT) ++ -rm -f mech/gss_pname_to_uid.lo + -rm -f mech/gss_release_buffer.$(OBJEXT) + -rm -f mech/gss_release_buffer.lo + -rm -f mech/gss_release_cred.$(OBJEXT) +@@ -1644,6 +1649,7 @@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_oid_to_str.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_process_context_token.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_pseudo_random.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_pname_to_uid.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_release_buffer.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_release_cred.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@mech/$(DEPDIR)/gss_release_name.Plo@am__quote@ diff --git a/security/heimdal/files/patch-lib__gssapi__gssapi__gssapi.h b/security/heimdal/files/patch-lib__gssapi__gssapi__gssapi.h new file mode 100644 index 000000000000..0b949763dfb7 --- /dev/null +++ b/security/heimdal/files/patch-lib__gssapi__gssapi__gssapi.h @@ -0,0 +1,17 @@ +--- lib/gssapi/gssapi/gssapi.h.orig 2010-11-05 10:44:14.000000000 +0100 ++++ lib/gssapi/gssapi/gssapi.h 2010-11-05 10:51:26.000000000 +0100 +@@ -929,6 +929,14 @@ + gss_buffer_t /* cred_token */, + gss_cred_id_t * /* cred_handle */); + ++#ifdef _UID_T_DECLARED ++GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL ++gss_pname_to_uid ++ (OM_uint32 * /* minor status */, ++ const gss_name_t /* principal name */, ++ const gss_OID mech /* mechanism to query */, ++ uid_t * /* pointer to UID for result */); ++#endif + + GSSAPI_CPP_END + diff --git a/security/heimdal/files/patch-lib__gssapi__gssapi_mech.h b/security/heimdal/files/patch-lib__gssapi__gssapi_mech.h new file mode 100644 index 000000000000..bdd8c296936b --- /dev/null +++ b/security/heimdal/files/patch-lib__gssapi__gssapi_mech.h @@ -0,0 +1,23 @@ +--- lib/gssapi/gssapi_mech.h.orig 2010-09-13 09:23:34.000000000 +0200 ++++ lib/gssapi/gssapi_mech.h 2010-11-05 11:04:11.000000000 +0100 +@@ -353,6 +353,12 @@ + gss_buffer_t cred_token, + gss_cred_id_t * cred_handle); + ++typedef OM_uint32 GSSAPI_CALLCONV ++_gss_pname_to_uid (OM_uint32 * minor_status, /* minor status */ ++ gss_name_t pname, /* principal name */ ++ gss_OID mech, /* mechanism to query */ ++ uid_t *uidp /* pointer to UID for result */ ++ ); + + #define GMI_VERSION 2 + +@@ -405,6 +411,7 @@ + _gss_store_cred_t *gm_store_cred; + _gss_export_cred_t *gm_export_cred; + _gss_import_cred_t *gm_import_cred; ++ _gss_pname_to_uid *gm_pname_to_uid; + } gssapi_mech_interface_desc, *gssapi_mech_interface; + + gssapi_mech_interface diff --git a/security/heimdal/files/patch-lib__gssapi__mech__gss_mech_switch.c b/security/heimdal/files/patch-lib__gssapi__mech__gss_mech_switch.c new file mode 100644 index 000000000000..549d5658b6f4 --- /dev/null +++ b/security/heimdal/files/patch-lib__gssapi__mech__gss_mech_switch.c @@ -0,0 +1,10 @@ +--- lib/gssapi/mech/gss_mech_switch.c.orig 2010-11-05 11:16:35.000000000 +0100 ++++ lib/gssapi/mech/gss_mech_switch.c 2010-11-05 11:16:52.000000000 +0100 +@@ -334,6 +334,7 @@ + OPTSYM(set_sec_context_option); + OPTSYM(set_cred_option); + OPTSYM(pseudo_random); ++ OPTSYM(pname_to_uid); + OPTSYM(wrap_iov); + OPTSYM(unwrap_iov); + OPTSYM(wrap_iov_length); diff --git a/security/heimdal/files/patch-lib__gssapi__version-script.map b/security/heimdal/files/patch-lib__gssapi__version-script.map new file mode 100644 index 000000000000..7f2a41c94b97 --- /dev/null +++ b/security/heimdal/files/patch-lib__gssapi__version-script.map @@ -0,0 +1,10 @@ +--- lib/gssapi/version-script.map.orig 2010-11-05 09:09:47.000000000 +0100 ++++ lib/gssapi/version-script.map 2010-11-05 09:40:32.000000000 +0100 +@@ -63,6 +63,7 @@ + gss_oid_to_str; + gss_process_context_token; + gss_pseudo_random; ++ gss_pname_to_uid; + gss_release_buffer; + gss_release_buffer_set; + gss_release_cred;