mail-storage-service.c revision 0992011130e9d0a498ca860ddbe4028398a530c5
0N/A#include "module-dir.h"
0N/A#include "restrict-access.h"
0N/A#include "eacces-error.h"
0N/A#include "var-expand.h"
0N/A#include "settings-parser.h"
0N/A#include "auth-master.h"
0N/A#include "master-service-private.h"
0N/A#include "master-service-settings.h"
0N/A#include "master-service-settings-cache.h"
0N/A#include "mail-user.h"
0N/A#include "mail-namespace.h"
0N/A#include "mail-storage.h"
0N/A#include "mail-storage-service.h"
0N/A#ifdef HAVE_SYS_TIME_H
0N/A#ifdef HAVE_SYS_RESOURCE_H
0N/A#define ERRSTR_INVALID_USER_SETTINGS \
0N/Astruct mail_storage_service_ctx {
0N/Astruct mail_storage_service_user {
0N/A bool mail_debug;
0N/A if (mail_debug) {
0N/A const char *const *chroot_dirs;
chroot_dirs++;
return FALSE;
const char **error_r)
unsigned int i, count;
int ret = 0;
#ifdef HAVE_SETPRIORITY
} else T_BEGIN {
} T_END;
if (ret < 0) {
return ret;
const char *const **fields_r,
const char **error_r)
const char *new_username;
int ret;
if (ret > 0) {
} else if (ret == 0)
return ret;
return TRUE;
return FALSE;
return FALSE;
return TRUE;
return TRUE;
return FALSE;
return FALSE;
return TRUE;
&error)) {
if (disallow_root &&
if (keep_setuid_root) {
if (current_euid != 0) {
if (seteuid(0) < 0)
if (!setenv_only) {
const char **error_r)
static const struct var_expand_table *
return tab;
T_BEGIN {
} T_END;
if (diff > 0) {
diff++;
struct mail_storage_service_ctx *
unsigned int count;
count = 0;
return ctx;
struct auth_master_connection *
const char **error_r)
i_unreached();
const char **error_r)
&error) < 0) {
if (userdb_lookup) {
error_r);
if (ret <= 0) {
return ret;
if (!userdb_lookup) {
if (ret > 0) {
return ret;
unsigned int len;
bool disallow_root =
bool temp_priv_drop =
if (!temp_priv_drop) {
if (!temp_priv_drop ||
&error) < 0)
const char **error_r)
int ret;
if (ret <= 0)
return ret;
if (ret < 0) {
return ret;
const char *error;
&error) < 0)
const char **username_r)
const struct mail_storage_service_input *
struct setting_parser_context *
T_BEGIN {
} T_END;
return set;