diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-07-03 19:35:27 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-07-08 19:29:51 -0400 |
commit | f255b943157f76b53eb55c279e29e40a6c41a97a (patch) | |
tree | 6d13440a9d1d1e36de3f61d8ff3ad5710133badf /server/db/sysdb.h | |
parent | 825c3a94f23751981bc03218ab35af9f464ebb5c (diff) | |
download | sssd-f255b943157f76b53eb55c279e29e40a6c41a97a.tar.gz sssd-f255b943157f76b53eb55c279e29e40a6c41a97a.tar.bz2 sssd-f255b943157f76b53eb55c279e29e40a6c41a97a.zip |
Unify password caching ops in sysdb
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r-- | server/db/sysdb.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h index aa1aaf4c..a81f4630 100644 --- a/server/db/sysdb.h +++ b/server/db/sysdb.h @@ -195,6 +195,13 @@ struct tevent_req *sysdb_transaction_commit_send(TALLOC_CTX *mem_ctx, struct sysdb_handle *handle); int sysdb_transaction_commit_recv(struct tevent_req *req); + +/* default transaction commit receive function. + * This function does not use the request state so it is safe to use + * from any caller */ +void sysdb_transaction_complete(struct tevent_req *subreq); + + /* Sysdb initialization. * call this function *only* once to initialize the database and get * the sysdb ctx */ @@ -457,13 +464,19 @@ struct tevent_req *sysdb_remove_group_member_send(TALLOC_CTX *mem_ctx, const char *member); int sysdb_remove_group_member_recv(struct tevent_req *req); -struct tevent_req *sysdb_set_cached_password_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct sysdb_handle *handle, - struct sss_domain_info *domain, - const char *user, - const char *password); -int sysdb_set_cached_password_recv(struct tevent_req *req); +/* Password caching function. + * If you are in a transaction ignore sysdb and pass in the handle. + * If you are not in a transaction pass NULL in handle and provide sysdb, + * in this case a transaction will be automatically started and the + * function will be completely wrapped in it's own sysdb transaction */ +struct tevent_req *sysdb_cache_password_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct sysdb_ctx *sysdb, + struct sysdb_handle *handle, + struct sss_domain_info *domain, + const char *username, + const char *password); +int sysdb_cache_password_recv(struct tevent_req *req); /* TODO: remove later * These functions are available in the latest tevent and are the ones that |