]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: auth setting blocks don't exist anymore, removed them.
authorTimo Sirainen <tss@iki.fi>
Fri, 11 Sep 2009 16:47:23 +0000 (12:47 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 11 Sep 2009 16:47:23 +0000 (12:47 -0400)
--HG--
branch : HEAD

src/master/main.c
src/master/master-settings.c
src/master/master-settings.h

index 993f7d8abd247d8075270ae0b653418ff6cd8ac4..af6360154643ae93faf456e5a89127978c943d3a 100644 (file)
@@ -227,28 +227,12 @@ static bool services_have_auth_destinations(const struct master_settings *set)
        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"
index e19c8fb00a273d5d132f3b25070e860bf6121ed3..8dc33f72e7203dd6f3a2d298841ff4e410a86e9b 100644 (file)
@@ -155,32 +155,6 @@ struct setting_parser_info service_setting_parser_info = {
        MEMBER(struct_size) sizeof(struct service_settings)
 };
 
-#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) \
@@ -198,6 +172,7 @@ static struct setting_define master_setting_defines[] = {
 
        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_setting_defines[] = {
        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_default_settings = {
 
        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 = {
index 3b28b963a4cad1940744bb6bacd3bf4716ad1667..7d6549db78862160fec39d3bd9c6be62693c4a99 100644 (file)
@@ -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;
 };