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

« back to all changes in this revision

Viewing changes to src/kadmin/ktutil/ktutil.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:
1
1
/*
2
2
 * kadmin/ktutil/ktutil.c
3
3
 *
4
 
 * Copyright 1995, 1996 by the Massachusetts Institute of Technology.
 
4
 * Copyright 1995, 1996, 2008 by the Massachusetts Institute of Technology.
5
5
 * All Rights Reserved.
6
6
 *
7
7
 * Export of this software from the United States of America may
98
98
    int argc;
99
99
    char *argv[];
100
100
{
101
 
#ifdef KRB5_KRB4_COMPAT
102
101
    krb5_error_code retval;
103
102
 
104
103
    if (argc != 2) {
108
107
    retval = ktutil_read_srvtab(kcontext, argv[1], &ktlist);
109
108
    if (retval)
110
109
        com_err(argv[0], retval, "while reading srvtab \"%s\"", argv[1]);
111
 
#else
112
 
    fprintf(stderr, "%s: krb4 support not configured\n", argv[0]);
113
 
#endif
114
110
}
115
111
 
116
112
void ktutil_write_v5(argc, argv)
132
128
    int argc;
133
129
    char *argv[];
134
130
{
135
 
#ifdef KRB5_KRB4_COMPAT
136
 
    krb5_error_code retval;
137
 
 
138
 
    if (argc != 2) {
139
 
        fprintf(stderr, "%s: must specify srvtab to write\n", argv[0]);
140
 
        return;
141
 
    }
142
 
    retval = ktutil_write_srvtab(kcontext, ktlist, argv[1]);
143
 
    if (retval)
144
 
        com_err(argv[0], retval, "while writing srvtab \"%s\"", argv[1]);
145
 
#else
146
 
    fprintf(stderr, "%s: krb4 support not configured\n", argv[0]);
147
 
#endif
 
131
    fprintf(stderr, "%s: writing srvtabs is no longer supported\n", argv[0]);
148
132
}
149
133
 
150
134
void ktutil_add_entry(argc, argv)
252
236
            char fill;
253
237
            time_t tstamp;
254
238
 
 
239
            tstamp = lp->entry->timestamp;
255
240
            (void) localtime(&tstamp);
256
241
            lp->entry->timestamp = tstamp;
257
242
            fill = ' ';
280
265
            printf(")");
281
266
        }
282
267
        printf("\n");
283
 
        krb5_xfree(pname);
 
268
        free(pname);
284
269
    }
285
270
}
286
271