]> andersk Git - openssh.git/blobdiff - gss-serv-krb5.c
- (tim) [regress/README.regress] Document ssh-rand-helper issue. ok bal
[openssh.git] / gss-serv-krb5.c
index e358bcbdcf725364c13a98463382b465077787a9..8ba3e7182a734d7ccb4bf375523505862655de1b 100644 (file)
 extern ServerOptions options;
 
 #ifdef HEIMDAL
-#include <krb5.h>
+# include <krb5.h>
 #else
-#include <gssapi_krb5.h>
+# ifdef HAVE_GSSAPI_KRB5
+#  include <gssapi_krb5.h>
+# elif HAVE_GSSAPI_GSSAPI_KRB5
+#  include <gssapi/gssapi_krb5.h>
+# endif
 #endif
 
 static krb5_context krb_context = NULL;
@@ -108,6 +112,7 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
        krb5_error_code problem;
        krb5_principal princ;
        OM_uint32 maj_status, min_status;
+       int len;
 
        if (client->creds == NULL) {
                debug("No credentials stored");
@@ -178,11 +183,13 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
 
        client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
        client->store.envvar = "KRB5CCNAME";
-       client->store.envval = xstrdup(client->store.filename);
+       len = strlen(client->store.filename) + 6;
+       client->store.envval = xmalloc(len);
+       snprintf(client->store.envval, len, "FILE:%s", client->store.filename);
 
 #ifdef USE_PAM
        if (options.use_pam)
-               do_pam_putenv(client->store.envvar,client->store.envval);
+               do_pam_putenv(client->store.envvar, client->store.envval);
 #endif
 
        krb5_cc_close(krb_context, ccache);
This page took 0.052386 seconds and 4 git commands to generate.