auth-request-var-expand.c revision 203bb272804e4394ae07103cdc8ce67041ba21a1
/* Copyright (c) 2002-2016 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "str.h"
#include "strescape.h"
#include "auth-request.h"
struct auth_request_var_expand_ctx {
struct auth_request *auth_request;
};
const struct var_expand_table
/* be sure to update AUTH_REQUEST_VAR_TAB_COUNT */
};
static const char *
escape_none(const char *string,
{
return string;
}
const char *
auth_request_str_escape(const char *string,
{
return str_escape(string);
}
struct var_expand_table *
unsigned int *count)
{
const unsigned int auth_count =
if (escape_func == NULL)
/* keep the extra fields at the beginning. the last static_tab field
contains the ending NULL-fields. */
*count += auth_count;
auth_count * sizeof(*tab));
/* tab[4] = we have no home dir */
}
if (auth_request->userdb_lookup) {
} else {
}
}
}
}
else
return ret_tab;
}
const struct var_expand_table *
{
unsigned int count = 0;
&count);
}
static const char *field_get_default(const char *data)
{
const char *p;
if (p == NULL)
return "";
else {
/* default value given */
return p+1;
}
}
static const char *
{
const char *value;
ctx->auth_request);
}
static const char *
{
const char *value;
ctx->auth_request);
}
const struct var_expand_func_table auth_request_var_funcs_table[] = {
{ "passdb", auth_request_var_expand_func_passdb },
{ "userdb", auth_request_var_expand_func_userdb },
};
struct auth_request *auth_request,
{
}
struct auth_request *auth_request,
const struct var_expand_table *table,
{
struct auth_request_var_expand_ctx ctx;
}
const char *
t_auth_request_var_expand(const char *str,
struct auth_request *auth_request,
{
}