]> andersk Git - gssapi-openssh.git/blobdiff - openssh/gss-serv-gsi.c
gssapi_kerberos_mech_old and gssapi_gsi_mech_old no longer used.
[gssapi-openssh.git] / openssh / gss-serv-gsi.c
index dcf60e0c25ddee775401021a6035f644da42d43c..aa1dd749012e436b04aff23b6e121f8d324bdc04 100644 (file)
 
 #include "ssh-gss.h"
 
+extern ServerOptions options;
+
 #include <globus_gss_assist.h>
 
 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);
 
-ssh_gssapi_mech gssapi_gsi_mech_old = {
-       "N3+k7/4wGxHyuP8Yxi4RhA==",
-       "GSI",
-       {9, "\x2B\x06\x01\x04\x01\x9B\x50\x01\x01"},
-       NULL,
-       &ssh_gssapi_gsi_userok,
-       &ssh_gssapi_gsi_localname,
-       &ssh_gssapi_gsi_storecreds
-};
-
 ssh_gssapi_mech gssapi_gsi_mech = {
        "dZuIebMjgUqaxvbF7hDbAw==",
        "GSI",
@@ -80,11 +72,11 @@ ssh_gssapi_gsi_userok(ssh_gssapi_client *client, char *name)
 #endif
 
     /* This returns 0 on success */
-    authorized = (globus_gss_assist_userok(client->name.value,
+    authorized = (globus_gss_assist_userok(client->displayname.value,
                                           name) == 0);
     
-    log("GSI user %s is%s authorized as target user %s",
-       (char *) client->name.value, (authorized ? "" : " not"), name);
+    logit("GSI user %s is%s authorized as target user %s",
+       (char *) client->displayname.value, (authorized ? "" : " not"), name);
     
     return authorized;
 }
@@ -100,7 +92,7 @@ ssh_gssapi_gsi_localname(ssh_gssapi_client *client, char **user)
        return 0;
     }
 #endif
-    return(globus_gss_assist_gridmap(client->name.value, user) == 0);
+    return(globus_gss_assist_gridmap(client->displayname.value, user) == 0);
 }
 
 /*
@@ -136,7 +128,7 @@ ssh_gssapi_gsi_storecreds(ssh_gssapi_client *client)
        
        p = strchr((char *) export_cred.value, '=');
        if (p == NULL) {
-           log("Failed to parse exported credentials string '%.100s'",
+           logit("Failed to parse exported credentials string '%.100s'",
                (char *)export_cred.value);
            gss_release_buffer(&minor_status, &export_cred);
            return;
@@ -149,7 +141,8 @@ ssh_gssapi_gsi_storecreds(ssh_gssapi_client *client)
        }
        client->store.envval = strdup(p);
 #ifdef USE_PAM
-       do_pam_putenv(client->store.envvar, client->store.envval);
+       if (options.use_pam)
+           do_pam_putenv(client->store.envvar, client->store.envval);
 #endif
        if (strncmp(p, "FILE:", 5) == 0) {
            p += 5;
This page took 0.037057 seconds and 4 git commands to generate.