dovecot-2.0: master: auth setting blocks don't exist anymore, re...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Sep 11 19:50:23 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/4dd2430a7c62
changeset: 9928:4dd2430a7c62
user: Timo Sirainen <tss at iki.fi>
date: Fri Sep 11 12:47:23 2009 -0400
description:
master: auth setting blocks don't exist anymore, removed them.
diffstat:
3 files changed, 5 insertions(+), 51 deletions(-)
src/master/main.c | 18 +-----------------
src/master/master-settings.c | 32 +++-----------------------------
src/master/master-settings.h | 6 +-----
diffs (130 lines):
diff -r cb3760f21777 -r 4dd2430a7c62 src/master/main.c
--- a/src/master/main.c Fri Sep 11 12:26:05 2009 -0400
+++ b/src/master/main.c Fri Sep 11 12:47:23 2009 -0400
@@ -227,28 +227,12 @@ static bool services_have_auth_destinati
return FALSE;
}
-static bool auths_have_debug(const struct master_settings *set)
-{
- struct master_auth_settings *const *auths;
- unsigned int i, count;
-
- if (!array_is_created(&set->auths))
- return FALSE;
-
- auths = array_get(&set->auths, &count);
- for (i = 0; i < count; i++) {
- if (auths[i]->debug)
- return TRUE;
- }
- return FALSE;
-}
-
static void auth_warning_print(const struct master_settings *set)
{
struct stat st;
auth_success_written = stat(AUTH_SUCCESS_PATH, &st) == 0;
- if (!auth_success_written && !auths_have_debug(set) &&
+ if (!auth_success_written && !set->auth_debug &&
services_have_auth_destinations(set)) {
fprintf(stderr,
"If you have trouble with authentication failures,\n"
diff -r cb3760f21777 -r 4dd2430a7c62 src/master/master-settings.c
--- a/src/master/master-settings.c Fri Sep 11 12:26:05 2009 -0400
+++ b/src/master/master-settings.c Fri Sep 11 12:47:23 2009 -0400
@@ -156,32 +156,6 @@ struct setting_parser_info service_setti
};
#undef DEF
-#define DEF(type, name) \
- { type, #name, offsetof(struct master_auth_settings, name), NULL }
-
-static struct setting_define master_auth_setting_defines[] = {
- DEF(SET_BOOL, debug),
-
- SETTING_DEFINE_LIST_END
-};
-
-static struct master_auth_settings master_auth_default_settings = {
- MEMBER(debug) FALSE
-};
-
-struct setting_parser_info master_auth_setting_parser_info = {
- MEMBER(defines) master_auth_setting_defines,
- MEMBER(defaults) &master_auth_default_settings,
-
- MEMBER(parent) &master_setting_parser_info,
- MEMBER(dynamic_parsers) NULL,
-
- MEMBER(parent_offset) (size_t)-1,
- MEMBER(type_offset) (size_t)-1,
- MEMBER(struct_size) sizeof(struct master_auth_settings)
-};
-
-#undef DEF
#undef DEFLIST
#define DEF(type, name) \
{ type, #name, offsetof(struct master_settings, name), NULL }
@@ -198,6 +172,7 @@ static struct setting_define master_sett
DEF(SET_BOOL, version_ignore),
DEF(SET_BOOL, mail_debug),
+ DEF(SET_BOOL, auth_debug),
DEF(SET_UINT, first_valid_uid),
DEF(SET_UINT, last_valid_uid),
@@ -205,7 +180,6 @@ static struct setting_define master_sett
DEF(SET_UINT, last_valid_gid),
DEFLIST(services, "service", &service_setting_parser_info),
- DEFLIST(auths, "auth", &master_auth_setting_parser_info),
SETTING_DEFINE_LIST_END
};
@@ -220,14 +194,14 @@ static struct master_settings master_def
MEMBER(version_ignore) FALSE,
MEMBER(mail_debug) FALSE,
+ MEMBER(auth_debug) FALSE,
MEMBER(first_valid_uid) 500,
MEMBER(last_valid_uid) 0,
MEMBER(first_valid_gid) 1,
MEMBER(last_valid_gid) 0,
- MEMBER(services) ARRAY_INIT,
- MEMBER(auths) ARRAY_INIT
+ MEMBER(services) ARRAY_INIT
};
struct setting_parser_info master_setting_parser_info = {
diff -r cb3760f21777 -r 4dd2430a7c62 src/master/master-settings.h
--- a/src/master/master-settings.h Fri Sep 11 12:26:05 2009 -0400
+++ b/src/master/master-settings.h Fri Sep 11 12:47:23 2009 -0400
@@ -42,10 +42,6 @@ struct service_settings {
ARRAY_DEFINE(inet_listeners, struct inet_listener_settings *);
};
-struct master_auth_settings {
- bool debug;
-};
-
struct master_settings {
const char *base_dir;
const char *libexec_dir;
@@ -56,12 +52,12 @@ struct master_settings {
bool version_ignore;
bool mail_debug;
+ bool auth_debug;
unsigned int first_valid_uid, last_valid_uid;
unsigned int first_valid_gid, last_valid_gid;
ARRAY_DEFINE(services, struct service_settings *);
- ARRAY_DEFINE(auths, struct master_auth_settings *);
char **protocols_split;
};
More information about the dovecot-cvs
mailing list