/* Copyright (c) 2005-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "settings-parser.h"
#include "master-service-settings.h"
#include "config-parser.h"
#include "config-filter.h"
#include "dns-util.h"
struct config_filter_context {
};
const struct config_filter *filter)
{
return FALSE;
/* not service */
return FALSE;
} else {
return FALSE;
}
}
return TRUE;
}
static bool
const char *filter_local_name)
{
/* Handle multiple names separated by spaces in local_name
* Ex: local_name "mail.domain.tld domain.tld mx.domain.tld" { ... } */
return TRUE;
}
return FALSE;
}
const struct config_filter *filter)
{
bool matched;
return FALSE;
T_BEGIN {
} T_END;
if (!matched)
return FALSE;
}
/* FIXME: it's not comparing full masks */
if (mask->remote_bits != 0) {
if (filter->remote_bits == 0)
return FALSE;
mask->remote_bits))
return FALSE;
}
if (mask->local_bits != 0) {
if (filter->local_bits == 0)
return FALSE;
mask->local_bits))
return FALSE;
}
return TRUE;
}
const struct config_filter *filter)
{
return FALSE;
}
const struct config_filter *f2)
{
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
}
{
return ctx;
}
{
unsigned int i;
}
struct config_filter_parser *const *parsers)
{
}
static int
struct config_filter_parser *const *p2)
{
/* remote and locals are first, although it doesn't really
matter which one comes first */
return -1;
return 1;
return -1;
return 1;
return -1;
return 1;
return -1;
return 1;
return 0;
}
static int
struct config_filter_parser *const *p2)
{
}
{
const char *const *p;
return TRUE;
}
return FALSE;
}
const char *const *modules)
{
const unsigned char *changes;
unsigned int i, j, size;
continue;
for (j = 0; j < size; j++) {
if (changes[j] != 0)
return TRUE;
}
}
return FALSE;
}
static struct config_filter_parser *const *
const char *const *modules,
const struct config_filter *filter,
struct master_service_settings_output *output_r)
{
unsigned int i;
continue;
}
if (mask->remote_bits > 0)
if (mask->remote_bits > 0)
}
}
}
}
struct config_filter_parser *const *
const struct config_filter *filter)
{
unsigned int i;
continue;
}
if (filter->local_bits == 0)
tmp_mask.local_bits = 0;
if (filter->remote_bits == 0)
tmp_mask.remote_bits = 0;
}
}
static bool
const struct config_filter *filter)
{
/* assume that both of the filters match the same subset, so we don't
need to compare IPs and service name. */
return FALSE;
return FALSE;
return FALSE;
}
return FALSE;
return TRUE;
}
static int
const struct config_filter_parser *src,
{
const char *conflict_key;
unsigned int i;
&conflict_key) < 0) {
"found from filter at %s", conflict_key,
src->file_and_line);
return -1;
}
}
return 0;
}
const char *const *modules,
const struct config_filter *filter,
struct config_module_parser **parsers_r,
struct master_service_settings_output *output_r,
const char **error_r)
{
unsigned int i, count;
/* get the matching filters. the most specific ones are handled first,
so that if more generic filters try to override settings we'll fail
with an error. Merging SET_STRLIST types requires
settings_parser_apply_changes() to work a bit unintuitively by
letting the destination settings override the source settings. */
/* all of them should have the same number of parsers.
duplicate our initial parsers from the first match */
for (i = 0; i < count; i++) {
}
/* apply the changes from rest of the matches */
else
error_p) < 0) {
return -1;
}
}
return 0;
}
{
unsigned int i;
}