diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/auth/db-checkpassword.h | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/auth/db-checkpassword.h')
-rw-r--r-- | src/auth/db-checkpassword.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/auth/db-checkpassword.h b/src/auth/db-checkpassword.h new file mode 100644 index 0000000..64eedd8 --- /dev/null +++ b/src/auth/db-checkpassword.h @@ -0,0 +1,29 @@ +#ifndef CHECKPASSWORD_COMMON_H +#define CHECKPASSWORD_COMMON_H + +#include "auth-request.h" + +enum db_checkpassword_status { + DB_CHECKPASSWORD_STATUS_INTERNAL_FAILURE = -1, + /* auth unsuccessful / user not found */ + DB_CHECKPASSWORD_STATUS_FAILURE = 0, + DB_CHECKPASSWORD_STATUS_OK = 1 +}; + +typedef void db_checkpassword_callback_t(struct auth_request *request, + enum db_checkpassword_status status, + const char *const *extra_fields, + void (*request_callback)()); + +struct db_checkpassword * +db_checkpassword_init(const char *checkpassword_path, + const char *checkpassword_reply_path); +void db_checkpassword_deinit(struct db_checkpassword **db); + +void db_checkpassword_call(struct db_checkpassword *db, + struct auth_request *request, + const char *auth_password, + db_checkpassword_callback_t *callback, + void (*request_callback)()) ATTR_NULL(3); + +#endif |