1 --- openssh-5.7p1/configure.ac.orig 2011-01-22 00:37:05.000000000 +0200
2 +++ openssh-5.7p1/configure.ac 2011-01-24 16:21:01.711393457 +0200
3 @@ -3572,14 +3572,14 @@
7 - K5LIBS="$K5LIBS -lcom_err -lasn1"
8 + K5LIBS="$K5LIBS -lasn1"
9 AC_CHECK_LIB(roken, net_write,
10 [K5LIBS="$K5LIBS -lroken"])
11 AC_CHECK_LIB(des, des_cbc_encrypt,
12 [K5LIBS="$K5LIBS -ldes"])
15 - K5LIBS="-lkrb5 -lk5crypto -lcom_err"
16 + K5LIBS="-lkrb5 -lk5crypto"
19 AC_SEARCH_LIBS(dn_expand, resolv)
20 diff -ur openssh-5.8p1-orig/auth-krb5.c openssh-5.8p1/auth-krb5.c
21 --- openssh-5.8p1-orig/auth-krb5.c 2011-04-20 00:30:23.632652510 +0200
22 +++ openssh-5.8p1/auth-krb5.c 2011-04-20 00:34:06.218117429 +0200
26 krb5_principal server;
28 + const char *ccache_type, *ccache_name;
30 krb5_error_code problem;
31 krb5_ccache ccache = NULL;
36 - problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
37 + problem = krb5_cc_set_default_name(authctxt->krb5_ctx, NULL);
40 + problem = krb5_cc_new_unique(authctxt->krb5_ctx,
41 + krb5_cc_default_name(authctxt->krb5_ctx), NULL,
42 &authctxt->krb5_fwd_ccache);
50 + ccache_type = krb5_cc_get_type(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
51 + ccache_name = krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
52 + if (strncmp(ccache_type, "FILE", 4) == 0) {
53 + authctxt->krb5_ticket_file = (char *)ccache_name;
55 + len = strlen(ccache_type) + strlen(ccache_name) + 2;
56 + authctxt->krb5_ccname = xmalloc(len);
57 + snprintf(authctxt->krb5_ccname, len, "%s:%s", ccache_type, ccache_name);
59 authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
61 len = strlen(authctxt->krb5_ticket_file) + 6;
62 authctxt->krb5_ccname = xmalloc(len);
63 snprintf(authctxt->krb5_ccname, len, "FILE:%s",
64 authctxt->krb5_ticket_file);
69 diff -ur openssh-5.8p1-orig/gss-serv-krb5.c openssh-5.8p1/gss-serv-krb5.c
70 --- openssh-5.8p1-orig/gss-serv-krb5.c 2011-04-20 00:30:23.632652510 +0200
71 +++ openssh-5.8p1/gss-serv-krb5.c 2011-04-20 00:34:06.218117429 +0200
74 OM_uint32 maj_status, min_status;
77 + const char *ccache_type, *ccache_name;
80 if (client->creds == NULL) {
81 debug("No credentials stored");
86 - if ((problem = krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))) {
87 - logit("krb5_cc_gen_new(): %.100s",
88 + if ((problem = krb5_cc_set_default_name(krb_context, NULL))) {
89 + logit("krb5_cc_set_default_name(): %.100s",
90 + krb5_get_err_text(krb_context, problem));
93 + if ((problem = krb5_cc_new_unique(krb_context,
94 + krb5_cc_default_name(krb_context), NULL, &ccache))) {
95 + logit("krb5_cc_new_unique(): %.100s",
96 krb5_get_err_text(krb_context, problem));
104 + ccache_type = krb5_cc_get_type(krb_context, ccache);
105 + ccache_name = krb5_cc_get_name(krb_context, ccache);
106 + if (strncmp(ccache_type, "FILE", 4) == 0) {
107 + client->store.filename = xstrdup(ccache_name);
109 + client->store.envvar = "KRB5CCNAME";
110 + len = strlen(ccache_type) + strlen(ccache_name) + 2;
111 + client->store.envval = xmalloc(len);
112 + snprintf(client->store.envval, len, "%s:%s", ccache_type, ccache_name);
114 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
115 client->store.envvar = "KRB5CCNAME";
116 len = strlen(client->store.filename) + 6;
117 client->store.envval = xmalloc(len);
118 snprintf(client->store.envval, len, "FILE:%s", client->store.filename);