master-service-settings.c revision e774b2f08b0909382ddc3d2869ae7e3b97205184
/* Copyright (c) 2005-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "istream.h"
#include "write-full.h"
#include "str.h"
#include "settings-parser.h"
#include "master-service-private.h"
#include "master-service-settings.h"
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#define CONFIG_HANDSHAKE "VERSION\t1\t0\n"
static struct setting_define master_service_setting_defines[] = {
};
static struct master_service_settings master_service_default_settings = {
};
};
static void ATTR_NORETURN
{
/* already have the path */
/* relative to current directory */
/* we have to find our executable from path */
binary_path = path;
break;
}
}
}
if (!service->keep_environment)
/* @UNSAFE */
}
static int
const struct master_service_settings_input *input,
const char **error_r)
{
const char *path;
} else {
if (fd < 0) {
"net_connect_unix(%s) failed: %m", path);
/* it's a file, not a socket */
}
return -1;
}
}
T_BEGIN {
}
}
} T_END;
if (ret < 0) {
return -1;
}
return fd;
}
static int
struct setting_parser_context *parser,
const char **error_r)
{
const char *const *overrides;
unsigned int i, count;
for (i = 0; i < count; i++) {
"Invalid -o parameter %s: %s", overrides[i],
return -1;
}
}
return 0;
}
const struct master_service_settings_input *input,
const char **error_r)
{
const struct setting_parser_info *tmp_root;
struct setting_parser_context *parser;
void **sets;
unsigned int i;
if (fd == -1)
return -1;
}
} else {
}
input->dyn_parsers);
}
}
if (fd != -1) {
if (ret < 0) {
return -1;
}
}
else
/* let environment override settings. especially useful for the
settings from userdb. */
if (settings_parse_environ(parser) < 0) {
return -1;
}
keys);
} T_END;
error_r) < 0)
return -1;
}
return -1;
}
/* running standalone. we want to ignore plugin versions. */
}
/* if we change any settings afterwards, they're in expanded form.
especially all settings from userdb are already expanded. */
return 0;
}
const struct setting_parser_info **roots,
const char **error_r)
{
struct master_service_settings_input input;
}
const struct master_service_settings *
{
void **sets;
return sets[0];
}
{
}
{
}