diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-10-24 12:06:01 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-10-24 12:06:01 -0400 |
commit | ec6dc0e991b3653e16a637bfaa0daf783f82af31 (patch) | |
tree | a7bc34a971b2c57cca2f69084487f1270b807e74 /src/lib | |
parent | 8444f28163fcfe47ccb9808458f951af10417277 (diff) | |
download | krb5-ec6dc0e991b3653e16a637bfaa0daf783f82af31.tar.gz krb5-ec6dc0e991b3653e16a637bfaa0daf783f82af31.tar.xz krb5-ec6dc0e991b3653e16a637bfaa0daf783f82af31.zip |
Don't save empty cc_config_out in ccache
Add an internal json function to make it easier to detect if an object
is empty, and use it to avoid creating a ccache config entry for
preauth module config data if there isn't any to save.
ticket: 7427 (new)
target_version: 1.11
tags: pullup
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/krb/get_in_tkt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index c2cd9e8837..c20d4b73b5 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -1198,7 +1198,8 @@ save_cc_config_out_data(krb5_context context, krb5_ccache ccache, char *encoded; krb5_error_code code; - if (ctx->cc_config_out == NULL) + if (ctx->cc_config_out == NULL || + k5_json_object_count(ctx->cc_config_out) == 0) return 0; encoded = k5_json_encode(ctx->cc_config_out); if (encoded == NULL) |