static int ssh_gssapi_gsi_userok(ssh_gssapi_client *client, char *name);
static int ssh_gssapi_gsi_localname(ssh_gssapi_client *client, char **user);
static void ssh_gssapi_gsi_storecreds(ssh_gssapi_client *client);
+static int ssh_gssapi_gsi_updatecreds(ssh_gssapi_ccache *store,
+ ssh_gssapi_client *client);
ssh_gssapi_mech gssapi_gsi_mech = {
"dZuIebMjgUqaxvbF7hDbAw==",
NULL,
&ssh_gssapi_gsi_userok,
&ssh_gssapi_gsi_localname,
- &ssh_gssapi_gsi_storecreds
+ &ssh_gssapi_gsi_storecreds,
+ &ssh_gssapi_gsi_updatecreds
};
/*
(res = globus_gss_assist_map_and_authorize(client->context, "ssh",
name, lname, 256))) {
debug("%s", globus_error_print_chain(globus_error_get(res)));
- } else if (strcmp(name, lname) != 0) {
+ } else if (lname && lname[0] && strcmp(name, lname) != 0) {
debug("GSI user maps to %s, not %s", lname, name);
} else {
authorized = 1;
gss_release_buffer(&minor_status, &export_cred);
}
+/*
+ * Export updated GSI credentials to disk.
+ */
+static int
+ssh_gssapi_gsi_updatecreds(ssh_gssapi_ccache *store,ssh_gssapi_client *client)
+{
+ ssh_gssapi_gsi_storecreds(client);
+ return 1;
+}
+
#endif /* GSI */
#endif /* GSSAPI */