From: Jeff Layton <jlayton@redhat.com>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v2 4/6] gssd: add new routine for generating a hostbased principal in a gss_buffer_t
Date: Tue, 15 Apr 2014 11:19:30 -0400 [thread overview]
Message-ID: <1397575172-28377-5-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <1397575172-28377-1-git-send-email-jlayton@redhat.com>
We'll need a gss_buffer_t to pass to the downcall marshalling code.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
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
next prev parent reply other threads:[~2014-04-15 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 15:19 [PATCH v2 0/6] gssd: add the GSSAPI acceptor name to the info passed in downcall Jeff Layton
2014-04-15 15:19 ` [PATCH v2 1/6] gssd: handle malloc failure appropriately in do_downcall Jeff Layton
2014-04-15 15:19 ` [PATCH v2 2/6] gssd: make do_downcall a void return Jeff Layton
2014-04-15 15:19 ` [PATCH v2 3/6] gssd: move hostbased name routines into separate file Jeff Layton
2014-04-15 15:19 ` Jeff Layton [this message]
2014-04-15 15:19 ` [PATCH v2 5/6] gssd: explicitly set lifetime_rec to 0 when gss_inquire_context fails Jeff Layton
2014-04-15 15:19 ` [PATCH v2 6/6] gssd: scrape the acceptor name out of the context Jeff Layton
2014-04-30 16:30 ` [PATCH v2 0/6] gssd: add the GSSAPI acceptor name to the info passed in downcall Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397575172-28377-5-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).