]> andersk Git - gssapi-openssh.git/blobdiff - openssh/gss-serv.c
This fixes an issue with determining the auth method, for reporting
[gssapi-openssh.git] / openssh / gss-serv.c
index 749ed0f1688e8c043d24e5b9f1157db89886af00..9a21de37c89f0ec2640eed66a42bde7336a7af9a 100644 (file)
@@ -455,7 +455,7 @@ ssh_gssapi_do_child(char ***envp, u_int *envsizep)
 
 /* Privileged */
 int
-ssh_gssapi_userok(char *user, struct passwd *pw)
+ssh_gssapi_userok(char *user, struct passwd *pw, int gssapi_keyex)
 {
        OM_uint32 lmin;
 
@@ -535,6 +535,7 @@ ssh_gssapi_rekey_creds() {
        pam_handle_t *pamh = NULL;
        struct pam_conv pamconv = {ssh_gssapi_simple_conv, NULL};
        char *envstr;
+       char **p;char **pw;
 #endif
 
        if (gssapi_client.store.filename == NULL && 
@@ -564,6 +565,18 @@ ssh_gssapi_rekey_creds() {
        if (ret)
                return;
 
+       /* Put ssh pam stack env variables in this new pam stack env 
+        * Using pam-pkinit, KRB5CCNAME is set during do_pam_session
+        * this addition enables pam-pkinit to access KRB5CCNAME if used 
+        * in sshd-rekey stack too
+        */
+       pw = p = fetch_pam_environment();
+       while ( *pw != NULL ) {
+               pam_putenv(pamh,*pw);
+               pw++;
+       }
+       free_pam_environment(p);
+
        xasprintf(&envstr, "%s=%s", gssapi_client.store.envvar, 
            gssapi_client.store.envval);
 
@@ -595,4 +608,10 @@ ssh_gssapi_update_creds(ssh_gssapi_ccache *store) {
        return ok;
 }
 
+void
+ssh_gssapi_get_client_info(char **userdn, char **mech) {
+       *userdn = gssapi_client.displayname.value;
+       *mech = gssapi_client.mech->name;
+}
+
 #endif
This page took 0.116193 seconds and 4 git commands to generate.