summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gdeschner@redhat.com>2012-09-14 12:09:58 +0200
committerGünther Deschner <gdeschner@redhat.com>2012-10-18 17:06:50 +0200
commit696d691385b5509a7a93a591c66f7a1726f73754 (patch)
tree1cd1ce10bc175cfee8cf7d45efd3e2d7b4ef1b02
parent5aedd1cfde6ead5b75866ddb34a65aa56282df0e (diff)
downloadgss-proxy-696d691385b5509a7a93a591c66f7a1726f73754.tar.gz
gss-proxy-696d691385b5509a7a93a591c66f7a1726f73754.tar.xz
gss-proxy-696d691385b5509a7a93a591c66f7a1726f73754.zip
Add gssi_export_composite_name().
-rw-r--r--proxy/src/mechglue/gpp_import_and_canon_name.c24
-rw-r--r--proxy/src/mechglue/gss_plugin.c1
-rw-r--r--proxy/src/mechglue/gss_plugin.h4
3 files changed, 28 insertions, 1 deletions
diff --git a/proxy/src/mechglue/gpp_import_and_canon_name.c b/proxy/src/mechglue/gpp_import_and_canon_name.c
index 3745d74..466803c 100644
--- a/proxy/src/mechglue/gpp_import_and_canon_name.c
+++ b/proxy/src/mechglue/gpp_import_and_canon_name.c
@@ -159,6 +159,30 @@ OM_uint32 gssi_export_name(OM_uint32 *minor_status,
return maj;
}
+OM_uint32 gssi_export_composite_name(OM_uint32 *minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t exported_composite_name)
+{
+ struct gpp_name_handle *name;
+ OM_uint32 maj, min = 0;
+
+ name = (struct gpp_name_handle *)input_name;
+ if (!name->local && !name->remote) {
+ return GSS_S_BAD_NAME;
+ }
+
+ if (name->local) {
+ maj = gss_export_name_composite(&min, name->local,
+ exported_composite_name);
+ } else {
+ maj = gpm_export_name_composite(&min, name->remote,
+ exported_composite_name);
+ }
+
+ *minor_status = gpp_map_error(min);
+ return maj;
+}
+
OM_uint32 gssi_duplicate_name(OM_uint32 *minor_status,
const gss_name_t input_name,
gss_name_t *dest_name)
diff --git a/proxy/src/mechglue/gss_plugin.c b/proxy/src/mechglue/gss_plugin.c
index 153d0b2..fd5d82d 100644
--- a/proxy/src/mechglue/gss_plugin.c
+++ b/proxy/src/mechglue/gss_plugin.c
@@ -497,6 +497,5 @@ uint32_t gpp_copy_oid(uint32_t *minor, gss_OID in, gss_OID *out)
/*
gssi_acquire_cred_impersonate_name
gssi_add_cred_impersonate_name
-gssi_export_name_composite
*/
diff --git a/proxy/src/mechglue/gss_plugin.h b/proxy/src/mechglue/gss_plugin.h
index 15f8d76..b0388bf 100644
--- a/proxy/src/mechglue/gss_plugin.h
+++ b/proxy/src/mechglue/gss_plugin.h
@@ -257,6 +257,10 @@ OM_uint32 gssi_export_name(OM_uint32 *minor_status,
const gss_name_t input_name,
gss_buffer_t exported_name);
+OM_uint32 gssi_export_name_composite(OM_uint32 *minor_status,
+ const gss_name_t input_name,
+ gss_buffer_t exported_composite_name);
+
OM_uint32 gssi_duplicate_name(OM_uint32 *minor_status,
const gss_name_t input_name,
gss_name_t *dest_name);