Skip to content

Commit

Permalink
auth: passdb-blocking - Expose passdb_blocking_auth_worker_reply_parse
Browse files Browse the repository at this point in the history
Enables sharing code with passdb cache
  • Loading branch information
cmouse authored and villesavolainen committed Feb 5, 2018
1 parent 0a10fa6 commit 939d5fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/auth/passdb-blocking.c
Expand Up @@ -21,8 +21,8 @@ auth_worker_reply_parse_args(struct auth_request *request,
auth_request_set_fields(request, args, NULL);
}

static enum passdb_result
auth_worker_reply_parse(struct auth_request *request, const char *reply)
enum passdb_result
passdb_blocking_auth_worker_reply_parse(struct auth_request *request, const char *reply)
{
enum passdb_result ret;
const char *const *args;
Expand Down Expand Up @@ -79,7 +79,7 @@ verify_plain_callback(const char *reply, void *context)
struct auth_request *request = context;
enum passdb_result result;

result = auth_worker_reply_parse(request, reply);
result = passdb_blocking_auth_worker_reply_parse(request, reply);
auth_request_verify_plain_callback(result, request);
auth_request_unref(&request);
return TRUE;
Expand All @@ -106,7 +106,7 @@ static bool lookup_credentials_callback(const char *reply, void *context)
enum passdb_result result;
const char *password = NULL, *scheme = NULL;

result = auth_worker_reply_parse(request, reply);
result = passdb_blocking_auth_worker_reply_parse(request, reply);
if (result == PASSDB_RESULT_OK && request->passdb_password != NULL) {
password = request->passdb_password;
scheme = password_get_scheme(&password);
Expand Down
2 changes: 2 additions & 0 deletions src/auth/passdb-blocking.h
@@ -1,6 +1,8 @@
#ifndef PASSDB_BLOCKING_H
#define PASSDB_BLOCKING_H

enum passdb_result
passdb_blocking_auth_worker_reply_parse(struct auth_request *request, const char *reply);
void passdb_blocking_verify_plain(struct auth_request *request);
void passdb_blocking_lookup_credentials(struct auth_request *request);
void passdb_blocking_set_credentials(struct auth_request *request,
Expand Down

0 comments on commit 939d5fc

Please sign in to comment.