aboutsummaryrefslogtreecommitdiff
path: root/examples/proxy.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-06-13 22:37:07 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 15:23:33 +0200
commit47a4eea827adcd1bc1c42646827c1045c156ad4e (patch)
treeb50416bf08278072de9f935057f510a0e5fab003 /examples/proxy.c
parent0d1ec1fa48db64f0ec6d85ea0b4cc7c709c7361d (diff)
downloadlibssh-47a4eea827adcd1bc1c42646827c1045c156ad4e.tar.gz
libssh-47a4eea827adcd1bc1c42646827c1045c156ad4e.tar.xz
libssh-47a4eea827adcd1bc1c42646827c1045c156ad4e.zip
examples: fix with new gssapi cb API
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples/proxy.c')
-rw-r--r--examples/proxy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/proxy.c b/examples/proxy.c
index 594eef19..f89d131e 100644
--- a/examples/proxy.c
+++ b/examples/proxy.c
@@ -56,17 +56,17 @@ static int auth_password(ssh_session session, const char *user,
return SSH_AUTH_DENIED;
}
-static int auth_gssapi_mic(ssh_session session, const char *user, void *userdata){
+static int auth_gssapi_mic(ssh_session session, const char *user, const char *principal, void *userdata){
(void)userdata;
client_creds = ssh_gssapi_get_creds(session);
- printf("Authenticating used %s with gssapi\n",user);
+ printf("Authenticating user %s with gssapi principal %s\n",user, principal);
if (client_creds != NULL)
printf("Received some gssapi credentials\n");
else
printf("Not received any forwardable creds\n");
printf("authenticated\n");
authenticated = 1;
- username = strdup(user);
+ username = strdup(principal);
return SSH_AUTH_SUCCESS;
}
@@ -323,7 +323,7 @@ int main(int argc, char **argv){
ssh_gssapi_set_creds(client_session, client_creds);
rc = ssh_connect(client_session);
if (rc != SSH_OK){
- printf("Error connecting to %s: %d", host, ssh_get_error(client_session));
+ printf("Error connecting to %s: %s", host, ssh_get_error(client_session));
return 1;
}
rc = ssh_userauth_none(client_session, NULL);