Initial commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
fix the bug:
|
||||
g_canon_name.c:125:5: warning: passing argument 2 of '__gss_copy_namebuf' from incompatible pointer type [enabled by default]
|
||||
|
||||
the 2nd argument of __gss_copy_namebuf should be address of *gss_buffer_t, \
|
||||
but a *gss_buffer_t is assigned.
|
||||
|
||||
what __gss_copy_namebuf does is to alloc memory for a gss_buffer_desc and \
|
||||
copy from src and return its address.
|
||||
|
||||
if following code failed, gss_release_name will free \
|
||||
union_canon_name->external_name.value if it is not NULL.
|
||||
|
||||
OM_uint32 __gss_copy_namebuf(src, dest)
|
||||
gss_buffer_t src;
|
||||
gss_buffer_t *dest;
|
||||
|
||||
typedef struct gss_union_name_t {
|
||||
gss_mechanism gss_mech;
|
||||
gss_OID name_type;
|
||||
gss_buffer_desc external_name;
|
||||
/*
|
||||
* These last two fields are only filled in for mechanism
|
||||
* names.
|
||||
*/
|
||||
gss_OID mech_type;
|
||||
gss_name_t mech_name;
|
||||
} gss_union_name_desc, *gss_union_name_t;
|
||||
|
||||
typedef struct gss_buffer_desc_struct {
|
||||
size_t length;
|
||||
void FAR *value;
|
||||
} gss_buffer_desc, FAR *gss_buffer_t;
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
|
||||
|
||||
--- a/src/g_canon_name.c
|
||||
+++ b/src/g_canon_name.c
|
||||
@@ -121,11 +121,17 @@ gss_canonicalize_name (OM_uint32 *minor_
|
||||
|
||||
union_canon_name->mech_name = mech_name;
|
||||
|
||||
- status = __gss_copy_namebuf(&union_input_name->external_name,
|
||||
- &union_canon_name->external_name);
|
||||
- if (status != GSS_S_COMPLETE)
|
||||
- goto failure;
|
||||
+ union_canon_name->external_name.value = (void*) malloc(
|
||||
+ union_input_name->external_name.length + 1);
|
||||
+ if (!union_canon_name->external_name.value)
|
||||
+ goto failure;
|
||||
|
||||
+ memcpy(union_canon_name->external_name.value,
|
||||
+ union_input_name->external_name.value,
|
||||
+ union_input_name->external_name.length);
|
||||
+ union_canon_name->external_name.length =
|
||||
+ union_input_name->external_name.length;
|
||||
+
|
||||
if (union_input_name->name_type != GSS_C_NO_OID) {
|
||||
status = generic_gss_copy_oid(minor_status,
|
||||
union_input_name->name_type,
|
||||
@@ -0,0 +1,51 @@
|
||||
SUMMARY = "Exports a gssapi interface which calls other gssapi libraries"
|
||||
DESCRIPTION = "\
|
||||
This library exports a gssapi interface, but does not implement any gssapi \
|
||||
mechanisms itself; instead it calls gssapi routines in other libraries, \
|
||||
depending on the mechanism. \
|
||||
"
|
||||
|
||||
HOMEPAGE = "http://www.citi.umich.edu/projects/nfsv4/linux/"
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "BSD-3-Clause | HPND"
|
||||
|
||||
#Copyright (c) 1996, by Sun Microsystems, Inc. HPND
|
||||
#Copyright (c) 2007 The Regents of the University of Michigan. BSD-3-Clause
|
||||
#Copyright 1995 by the Massachusetts Institute of Technology. HPND without Disclaimer
|
||||
#Copyright 1993 by OpenVision Technologies, Inc. HPND
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=56871e72a5c475289c0d5e4ba3f2ee3a \
|
||||
file://src/g_accept_sec_context.c;beginline=3;endline=23;md5=da8ca7a37bd26e576c23874d453751d2\
|
||||
file://src/g_ccache_name.c;beginline=1;endline=32;md5=208d4de05d5c8273963a8332f084faa7 \
|
||||
file://src/oid_ops.c;beginline=1;endline=26;md5=1f194d148b396972da26759a8ec399f0\
|
||||
file://src/oid_ops.c;beginline=378;endline=398;md5=d77a5c03e91908fac453c08bbeaddce1\
|
||||
"
|
||||
|
||||
SRC_URI = "${DEBIAN_MIRROR}/main/libg/${BPN}/${BPN}_${PV}.orig.tar.gz \
|
||||
file://libgssglue-canon-name.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "bcd618ae0bc69f12815d77295658a760e7edc20706b9a731a81da8993f5c970a"
|
||||
|
||||
inherit autotools-brokensep
|
||||
|
||||
do_configure:prepend() {
|
||||
cd ${S}
|
||||
./bootstrap
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
# install some docs
|
||||
install -d -m 0755 ${D}${docdir}/${BPN}
|
||||
install -m 0644 ${S}/AUTHORS ${S}/ChangeLog ${S}/NEWS ${S}/README ${D}${docdir}/${BPN}
|
||||
|
||||
# install the gssapi_mech.conf
|
||||
install -d -m 0755 ${D}${sysconfdir}
|
||||
install -m 0644 ${S}/doc/gssapi_mech.conf ${D}${sysconfdir}
|
||||
|
||||
# change the libgssapi_krb5.so path and name(it is .so.2)
|
||||
sed -i -e "s:/usr/lib/libgssapi_krb5.so:libgssapi_krb5.so.2:" ${D}${sysconfdir}/gssapi_mech.conf
|
||||
}
|
||||
|
||||
# gssglue can use krb5, spkm3... as gssapi library, configurable
|
||||
RRECOMMENDS:${PN} += "krb5"
|
||||
Reference in New Issue
Block a user