changeset 9928:4dd2430a7c62 HEAD

master: auth setting blocks don't exist anymore, removed them.
author Timo Sirainen <tss@iki.fi>
date Fri, 11 Sep 2009 12:47:23 -0400
parents cb3760f21777
children d60fa42fbaac
files src/master/main.c src/master/master-settings.c src/master/master-settings.h
diffstat 3 files changed, 5 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 	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"
--- 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 @@
 };
 
 #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 @@
 
 	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 @@
 	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 @@
 
 	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 = {
--- 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 @@
 	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 @@
 
 	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;
 };