1 --- openssh-5.9p1/configure.ac~ 2011-08-18 06:48:24.000000000 +0200
2 +++ openssh-5.9p1/configure.ac 2011-09-06 19:00:46.856319713 +0200
3 @@ -3424,13 +3424,13 @@
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"])
13 ], [ AC_MSG_RESULT([no])
14 - K5LIBS="-lkrb5 -lk5crypto -lcom_err"
15 + K5LIBS="-lkrb5 -lk5crypto"
18 AC_SEARCH_LIBS([dn_expand], [resolv])
19 diff -ur openssh-5.8p1-orig/auth-krb5.c openssh-5.8p1/auth-krb5.c
20 --- openssh-5.8p1-orig/auth-krb5.c 2011-04-20 00:30:23.632652510 +0200
21 +++ openssh-5.8p1/auth-krb5.c 2011-04-20 00:34:06.218117429 +0200
25 krb5_principal server;
27 + const char *ccache_type, *ccache_name;
29 krb5_error_code problem;
30 krb5_ccache ccache = NULL;
35 - problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
36 + problem = krb5_cc_set_default_name(authctxt->krb5_ctx, NULL);
39 + problem = krb5_cc_new_unique(authctxt->krb5_ctx,
40 + krb5_cc_default_name(authctxt->krb5_ctx), NULL,
41 &authctxt->krb5_fwd_ccache);
49 + ccache_type = krb5_cc_get_type(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
50 + ccache_name = krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
51 + if (strncmp(ccache_type, "FILE", 4) == 0) {
52 + authctxt->krb5_ticket_file = (char *)ccache_name;
54 + len = strlen(ccache_type) + strlen(ccache_name) + 2;
55 + authctxt->krb5_ccname = xmalloc(len);
56 + snprintf(authctxt->krb5_ccname, len, "%s:%s", ccache_type, ccache_name);
58 authctxt->krb5_ticket_file = (char *)krb5_cc_get_name(authctxt->krb5_ctx, authctxt->krb5_fwd_ccache);
60 len = strlen(authctxt->krb5_ticket_file) + 6;
61 authctxt->krb5_ccname = xmalloc(len);
62 snprintf(authctxt->krb5_ccname, len, "FILE:%s",
63 authctxt->krb5_ticket_file);
68 diff -ur openssh-5.8p1-orig/gss-serv-krb5.c openssh-5.8p1/gss-serv-krb5.c
69 --- openssh-5.8p1-orig/gss-serv-krb5.c 2011-04-20 00:30:23.632652510 +0200
70 +++ openssh-5.8p1/gss-serv-krb5.c 2011-04-20 00:34:06.218117429 +0200
73 OM_uint32 maj_status, min_status;
76 + const char *ccache_type, *ccache_name;
79 if (client->creds == NULL) {
80 debug("No credentials stored");
85 - if ((problem = krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))) {
86 - logit("krb5_cc_gen_new(): %.100s",
87 + if ((problem = krb5_cc_set_default_name(krb_context, NULL))) {
88 + logit("krb5_cc_set_default_name(): %.100s",
89 + krb5_get_err_text(krb_context, problem));
92 + if ((problem = krb5_cc_new_unique(krb_context,
93 + krb5_cc_default_name(krb_context), NULL, &ccache))) {
94 + logit("krb5_cc_new_unique(): %.100s",
95 krb5_get_err_text(krb_context, problem));
103 + ccache_type = krb5_cc_get_type(krb_context, ccache);
104 + ccache_name = krb5_cc_get_name(krb_context, ccache);
105 + if (strncmp(ccache_type, "FILE", 4) == 0) {
106 + client->store.filename = xstrdup(ccache_name);
108 + client->store.envvar = "KRB5CCNAME";
109 + len = strlen(ccache_type) + strlen(ccache_name) + 2;
110 + client->store.envval = xmalloc(len);
111 + snprintf(client->store.envval, len, "%s:%s", ccache_type, ccache_name);
113 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
114 client->store.envvar = "KRB5CCNAME";
115 len = strlen(client->store.filename) + 6;
116 client->store.envval = xmalloc(len);
117 snprintf(client->store.envval, len, "FILE:%s", client->store.filename);