~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/krb5/ccache/ser_cc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2009-05-07 16:16:34 UTC
  • mfrom: (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090507161634-xqyk0s9na0le4flj
Tags: 1.7dfsg~beta1-4
When  decrypting the TGS response fails with the subkey, try with the
session key to work around Heimdal bug, Closes: #527353 

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
            fnamep = krb5_cc_get_name(kcontext, ccache);
121
121
            namelen += (strlen(fnamep)+1);
122
122
 
123
 
            if ((ccname = (char *) malloc(namelen))) {
124
 
                /* Format the ccache name. */
125
 
                if (ccache->ops && ccache->ops->prefix)
126
 
                    sprintf(ccname, "%s:%s", ccache->ops->prefix, fnamep);
127
 
                else
128
 
                    strcpy(ccname, fnamep);
 
123
            if (ccache->ops && ccache->ops->prefix) {
 
124
                if (asprintf(&ccname, "%s:%s", ccache->ops->prefix, fnamep) < 0)
 
125
                    ccname = NULL;
 
126
            } else
 
127
                ccname = strdup(fnamep);
129
128
 
 
129
            if (ccname) {
130
130
                /* Put the length of the file name */
131
131
                (void) krb5_ser_pack_int32((krb5_int32) strlen(ccname),
132
132
                                           &bp, &remain);