]> andersk Git - gssapi-openssh.git/blobdiff - openssh/gss-serv.c
Added support for reporting usage metrics.
[gssapi-openssh.git] / openssh / gss-serv.c
index de0f7d589712153ebdb289b241349768abb57f12..6fbc09db4d27958200c95f54b5f75dbc4fb0580c 100644 (file)
@@ -531,9 +531,11 @@ void
 ssh_gssapi_rekey_creds() {
        int ok;
 #ifdef USE_PAM
+       int ret;
        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 && 
@@ -563,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);
 
@@ -594,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.079886 seconds and 4 git commands to generate.