We'll need a gss_buffer_t to pass to the downcall marshalling code. Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> --- utils/gssd/gss_names.c | 15 +++++++++++++++ utils/gssd/gss_names.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/utils/gssd/gss_names.c b/utils/gssd/gss_names.c index aa61e4d7a851..047069de1755 100644 --- a/utils/gssd/gss_names.c +++ b/utils/gssd/gss_names.c @@ -121,3 +121,18 @@ out_rel_buf: out_err: return res; } + +void +get_hostbased_client_buffer(gss_name_t client_name, gss_OID mech, + gss_buffer_t buf) +{ + char *hname; + + if (!get_hostbased_client_name(client_name, mech, &hname)) { + buf->length = strlen(hname) + 1; + buf->value = hname; + } else { + buf->length = 0; + buf->value = NULL; + } +} diff --git a/utils/gssd/gss_names.h b/utils/gssd/gss_names.h index 1d5f49c1c1d2..ce182f7985f3 100644 --- a/utils/gssd/gss_names.h +++ b/utils/gssd/gss_names.h @@ -32,3 +32,5 @@ extern int get_hostbased_client_name(gss_name_t client_name, gss_OID mech, char **hostbased_name); +extern void get_hostbased_client_buffer(gss_name_t client_name, + gss_OID mech, gss_buffer_t buf); -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html