aboutsummaryrefslogtreecommitdiff
path: root/examples/samplesshd-cb.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-03-04 18:48:39 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:50:56 +0200
commit65eccf19693dd2f6d4525062fdc04720f373af6f (patch)
tree092e145d1daa3623e7a291d4b0b49d4ecff46599 /examples/samplesshd-cb.c
parentd9443104123614de9c071c748693edaef6ff7b73 (diff)
downloadlibssh-65eccf19693dd2f6d4525062fdc04720f373af6f.tar.gz
libssh-65eccf19693dd2f6d4525062fdc04720f373af6f.tar.xz
libssh-65eccf19693dd2f6d4525062fdc04720f373af6f.zip
gssapi: retrieve forwarded (delegated) tickets
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples/samplesshd-cb.c')
-rw-r--r--examples/samplesshd-cb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/samplesshd-cb.c b/examples/samplesshd-cb.c
index 8790226e..e6651550 100644
--- a/examples/samplesshd-cb.c
+++ b/examples/samplesshd-cb.c
@@ -61,8 +61,15 @@ static int auth_password(ssh_session session, const char *user,
}
static int auth_gssapi_mic(ssh_session session, const char *user, void *userdata){
+ ssh_gssapi_creds creds = ssh_gssapi_get_creds(session);
+
(void)userdata;
+
printf("Authenticating used %s with gssapi\n",user);
+ if (creds != NULL)
+ printf("Received some gssapi credentials\n");
+ else
+ printf("Not received any forwardable creds\n");
printf("authenticated\n");
authenticated = 1;
return SSH_AUTH_SUCCESS;