krb5 commit: Document krb5_db_iterate restriction on writing
Greg Hudson
ghudson at MIT.EDU
Wed Jul 31 18:57:38 EDT 2013
https://github.com/krb5/krb5/commit/c5e25a236878b9807ffefe510836d1ddb59e6901
commit c5e25a236878b9807ffefe510836d1ddb59e6901
Author: Greg Hudson <ghudson at mit.edu>
Date: Wed Jul 31 18:51:18 2013 -0400
Document krb5_db_iterate restriction on writing
src/include/kdb.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/include/kdb.h b/src/include/kdb.h
index 78d78c5..c08c8d5 100644
--- a/src/include/kdb.h
+++ b/src/include/kdb.h
@@ -371,6 +371,12 @@ krb5_error_code krb5_db_put_principal ( krb5_context kcontext,
krb5_db_entry *entry );
krb5_error_code krb5_db_delete_principal ( krb5_context kcontext,
krb5_principal search_for );
+
+/*
+ * Iterate over principals in the KDB. If the callback may write to the DB,
+ * the caller must get an exclusive lock with krb5_db_lock before iterating,
+ * and release it with krb5_db_unlock after iterating.
+ */
krb5_error_code krb5_db_iterate ( krb5_context kcontext,
char *match_entry,
int (*func) (krb5_pointer, krb5_db_entry *),
More information about the cvs-krb5
mailing list