summaryrefslogtreecommitdiffstats
path: root/src/util/support
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-10-24 12:06:01 -0400
committerGreg Hudson <ghudson@mit.edu>2012-10-24 12:06:01 -0400
commitec6dc0e991b3653e16a637bfaa0daf783f82af31 (patch)
treea7bc34a971b2c57cca2f69084487f1270b807e74 /src/util/support
parent8444f28163fcfe47ccb9808458f951af10417277 (diff)
downloadkrb5-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.c6
-rw-r--r--src/util/support/libkrb5support-fixed.exports1
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