passdb-blocking.c revision 939451389b8e0ad529277b84fe51dab38a8cf77c
/* Copyright (C) 2005 Timo Sirainen */
#include "common.h"
#include "str.h"
#include "auth-worker-server.h"
#include "password-scheme.h"
#include "passdb.h"
#include "passdb-blocking.h"
#include <stdlib.h>
static enum passdb_result
{
enum passdb_result ret;
const char *p;
/* OK / FAIL */
*reply += 3;
return PASSDB_RESULT_OK;
}
/* FAIL \t result \t password */
*reply += 5;
if (p == NULL)
else
*reply = p + 1;
if (ret != PASSDB_RESULT_OK)
return ret;
"Received invalid FAIL result from worker: %d", ret);
return PASSDB_RESULT_INTERNAL_FAILURE;
} else {
"Received unknown reply from worker: %s", *reply);
return PASSDB_RESULT_INTERNAL_FAILURE;
}
}
const char **password_r, const char **scheme_r)
{
const char *p, *p2;
/* user \t {scheme}password [\t extra] */
*password_r = NULL;
return 0;
}
/* username may have changed, update it */
if (**password_r == '\0') {
*password_r = NULL;
} else {
"Received reply from worker without "
"password scheme");
return -1;
}
}
if (*reply != '\0') {
}
return 0;
}
static void
{
enum passdb_result result;
if (result >= 0) {
}
}
{
}
static void
{
enum passdb_result result;
if (result >= 0) {
}
request);
}
{
}