Skip to content

Commit

Permalink
krb5: klist -l cannot tell which cache is primary unless the default …
Browse files Browse the repository at this point in the history
…one is (WIP)

I've noticed that `klist -l` doesn't show which ccache is the primary
one.  This is fundamentally because we don't have a method for getting
the primary ccache.  This commit prepares for adding that.
  • Loading branch information
nicowilliams committed May 30, 2023
1 parent 2558c08 commit ea8a8eb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions kcm/glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ static const krb5_cc_ops krb5_kcmss_ops = {
kcmss_get_name_2,
kcmss_resolve_2,
NULL,
NULL,
0,
'\0',
':'
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/acache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops = {
NULL,
acc_get_name_2,
acc_resolve_2,
NULL, /* acc_get_primary_name */
acc_gen_new_2,
0,
':',
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_dcc_ops = {
dcc_get_kdc_offset,
dcc_get_name_2,
dcc_resolve_2,
NULL, /* dcc_get_primary_name */
dcc_gen_new_2,
1,
'\0',
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/fcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops = {
fcc_get_kdc_offset,
fcc_get_name_2,
fcc_resolve_2,
NULL, /* fcc_get_primary_name */
fcc_gen_new_2,
1,
'+',
Expand Down
2 changes: 2 additions & 0 deletions lib/krb5/kcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_kcm_ops = {
kcm_get_kdc_offset,
kcm_get_name_2,
kcm_resolve_2_kcm,
NULL, /* kcm_get_primary_name_kcm */
kcm_gen_new_2_kcm,
0,
':',
Expand Down Expand Up @@ -1372,6 +1373,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_akcm_ops = {
NULL,
kcm_get_name_2,
kcm_resolve_2_api,
NULL, /* kcm_get_primary_name_api */
kcm_gen_new_2_api,
0,
'\0',
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/krb5.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ typedef struct krb5_cc_ops {
krb5_error_code (KRB5_CALLCONV * resolve_2)(krb5_context, krb5_ccache *, const char *,
const char *);
/* Version 6 */
krb5_error_code (KRB5_CALLCONV * get_primary_name)(krb5_context, krb5_ccache *, const char *);
krb5_error_code (KRB5_CALLCONV * gen_new_2)(krb5_context, const char *, krb5_ccache *);
uint32_t filepath:1; /* Versions later than 6 can add bitfields here */
unsigned char subsep;
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/krcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_krcc_ops = {
krcc_get_kdc_offset,
krcc_get_name_2,
krcc_resolve_2,
NULL, /* krcc_get_primary_name */
krcc_gen_new_2,
0,
'\0',
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/mcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops = {
mcc_get_kdc_offset,
mcc_get_name_2,
mcc_resolve_2,
NULL, /* mcc_get_primary_name */
mcc_gen_new_2,
0,
'\0',
Expand Down
1 change: 1 addition & 0 deletions lib/krb5/scache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@ KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops = {
NULL,
scc_get_name_2,
scc_resolve_2,
NULL, /* scc_get_primary_name */
scc_gen_new_2,
1,
'\0',
Expand Down

0 comments on commit ea8a8eb

Please sign in to comment.