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/util/support | |
| 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/util/support')
| -rw-r--r-- | src/util/support/json.c | 6 | ||||
| -rw-r--r-- | src/util/support/libkrb5support-fixed.exports | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/util/support/json.c b/src/util/support/json.c index e6d7eea26..f02fe263d 100644 --- a/src/util/support/json.c +++ b/src/util/support/json.c @@ -295,6 +295,12 @@ k5_json_object_create(void) return alloc_value(&object_type, sizeof(struct k5_json_object_st)); } +size_t +k5_json_object_count(k5_json_object obj) +{ + return obj->len; +} + /* Return the entry for key within obj, or NULL if none exists. */ static struct entry * object_search(k5_json_object obj, const char *key) diff --git a/src/util/support/libkrb5support-fixed.exports b/src/util/support/libkrb5support-fixed.exports index 13b1b575e..0579611fd 100644 --- a/src/util/support/libkrb5support-fixed.exports +++ b/src/util/support/libkrb5support-fixed.exports @@ -11,6 +11,7 @@ k5_json_get_tid k5_json_null_create k5_json_number_create k5_json_number_value +k5_json_object_count k5_json_object_create k5_json_object_get k5_json_object_iterate |
