Print this page
6817447 libgss and various mechs are hiding both the real minor_status and the error token
6405422 Solaris acceptors fail in AD-KDC environments when using non-"host" services (e.g. "cifs")
6824434 Unable to accept context establishment initiated by Windows 2000 clients
6787343 kclient's site lookups fail in certain network environments
6692646 kclient should output errors to stderr
6525327 kinit failed when arcfour-hmac-md5-exp was used for the principal's key
6745582 SUNWkdcu missing package dependencies after kclientv2 integration

*** 18,33 **** * * CDDL HEADER END */ /* ! * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - #pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdlib.h> #include <strings.h> #include <locale.h> #include <netdb.h> --- 18,31 ---- * * CDDL HEADER END */ /* ! * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #include <stdio.h> #include <stdlib.h> #include <strings.h> #include <locale.h> #include <netdb.h>
*** 37,48 **** #define VAL2STR(x) QUOTE(x) static char *whoami = NULL; static void kt_add_entry(krb5_context ctx, krb5_keytab kt, ! const krb5_principal princ, krb5_enctype enctype, krb5_kvno kvno, ! const char *pw); static krb5_error_code kt_remove_entries(krb5_context ctx, krb5_keytab kt, const krb5_principal princ); static void usage(); --- 35,46 ---- #define VAL2STR(x) QUOTE(x) static char *whoami = NULL; static void kt_add_entry(krb5_context ctx, krb5_keytab kt, ! const krb5_principal princ, const krb5_principal sprinc, ! krb5_enctype enctype, krb5_kvno kvno, const char *pw); static krb5_error_code kt_remove_entries(krb5_context ctx, krb5_keytab kt, const krb5_principal princ); static void usage();
*** 55,65 **** krb5_enctype *enctypes; int enctype_count = 0; krb5_ccache cc = NULL; krb5_keytab kt = NULL; krb5_kvno kvno = 1; ! krb5_principal victim; char c, *vprincstr, *ktname, *token, *lasts, *newpw; int result_code, i, len, nflag = 0; krb5_data result_code_string, result_string; (void) setlocale(LC_ALL, ""); --- 53,63 ---- krb5_enctype *enctypes; int enctype_count = 0; krb5_ccache cc = NULL; krb5_keytab kt = NULL; krb5_kvno kvno = 1; ! krb5_principal victim, salt; char c, *vprincstr, *ktname, *token, *lasts, *newpw; int result_code, i, len, nflag = 0; krb5_data result_code_string, result_string; (void) setlocale(LC_ALL, "");
*** 80,90 **** if (code != 0) { com_err(whoami, code, gettext("krb5_init_context() failed")); exit(1); } ! while ((c = getopt(argc, argv, "v:c:k:e:n")) != -1) { switch (c) { case 'n': nflag++; break; case 'k': --- 78,88 ---- if (code != 0) { com_err(whoami, code, gettext("krb5_init_context() failed")); exit(1); } ! while ((c = getopt(argc, argv, "v:c:k:e:ns:")) != -1) { switch (c) { case 'n': nflag++; break; case 'k':
*** 145,154 **** --- 143,162 ---- NULL); break; case 'v': kvno = (krb5_kvno) atoi(optarg); break; + case 's': + vprincstr = optarg; + code = krb5_parse_name(ctx, vprincstr, &salt); + if (code != 0) { + com_err(whoami, code, + gettext("krb5_parse_name(%s) failed"), + vprincstr); + exit(1); + } + break; default: usage(); break; } }
*** 235,245 **** if (enctype_count && (code = kt_remove_entries(ctx, kt, victim))) goto error; for (i = 0; i < enctype_count; i++) ! kt_add_entry(ctx, kt, victim, enctypes[i], kvno, newpw); error: if (kt != NULL) krb5_kt_close(ctx, kt); --- 243,253 ---- if (enctype_count && (code = kt_remove_entries(ctx, kt, victim))) goto error; for (i = 0; i < enctype_count; i++) ! kt_add_entry(ctx, kt, victim, salt, enctypes[i], kvno, newpw); error: if (kt != NULL) krb5_kt_close(ctx, kt);
*** 317,327 **** } static void kt_add_entry(krb5_context ctx, krb5_keytab kt, const krb5_principal princ, ! krb5_enctype enctype, krb5_kvno kvno, const char *pw) { krb5_keytab_entry *entry; krb5_data password, salt; krb5_keyblock key; krb5_error_code code; --- 325,336 ---- } static void kt_add_entry(krb5_context ctx, krb5_keytab kt, const krb5_principal princ, ! const krb5_principal sprinc, krb5_enctype enctype, krb5_kvno kvno, ! const char *pw) { krb5_keytab_entry *entry; krb5_data password, salt; krb5_keyblock key; krb5_error_code code;
*** 340,350 **** (void) memset((char *)entry, 0, sizeof (*entry)); password.length = strlen(pw); password.data = (char *)pw; ! if ((code = krb5_principal2salt(ctx, princ, &salt)) != 0) { com_err(whoami, code, gettext("Could not compute salt for %s"), enctype); return; } --- 349,359 ---- (void) memset((char *)entry, 0, sizeof (*entry)); password.length = strlen(pw); password.data = (char *)pw; ! if ((code = krb5_principal2salt(ctx, sprinc, &salt)) != 0) { com_err(whoami, code, gettext("Could not compute salt for %s"), enctype); return; }