Add the 'gss_pname_to_uid' function to libgssapi.
This function is obtained from the FreeBSD base libgssapi code. Whith this function added to the port, it is possible to buildworld FreeBSD fully against the port. FYI: Patches for CURRENT and 8-STABLE src/ are here: ftp://ftp.frm2.tum.de/pub/jpulz/FreeBSD/patches/CURRENT_use_kerberos_port.patch ftp://ftp.frm2.tum.de/pub/jpulz/FreeBSD/patches/8-STABLE_use_kerberos_port.patch PR: ports/152030 Submitted by: maintainer
This commit is contained in:
parent
ede955bade
commit
c7bce935a7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264518
@ -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)
|
||||
|
@ -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
|
||||
|
66
security/heimdal/files/lib__gssapi__mech__gss_pname_to_uid.c
Normal file
66
security/heimdal/files/lib__gssapi__mech__gss_pname_to_uid.c
Normal file
@ -0,0 +1,66 @@
|
||||
/*-
|
||||
* Copyright (c) 2008 Isilon Inc http://www.isilon.com/
|
||||
* Authors: Doug Rabson <dfr@rabson.org>
|
||||
* Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
|
||||
*
|
||||
* 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);
|
||||
}
|
45
security/heimdal/files/patch-lib__gssapi__Makefile.in
Normal file
45
security/heimdal/files/patch-lib__gssapi__Makefile.in
Normal file
@ -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@
|
17
security/heimdal/files/patch-lib__gssapi__gssapi__gssapi.h
Normal file
17
security/heimdal/files/patch-lib__gssapi__gssapi__gssapi.h
Normal file
@ -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
|
||||
|
23
security/heimdal/files/patch-lib__gssapi__gssapi_mech.h
Normal file
23
security/heimdal/files/patch-lib__gssapi__gssapi_mech.h
Normal file
@ -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
|
@ -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);
|
10
security/heimdal/files/patch-lib__gssapi__version-script.map
Normal file
10
security/heimdal/files/patch-lib__gssapi__version-script.map
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user