masqmail

diff src/conf.c @ 378:5781ba87df95

Removed ident. This had been discussed on the mailing list in Oct 2011. Ident is hardly useful in typical setups for masqmail. Probably Oliver had used it in his setup; that would make sense. Now, I know of nobody who needs it.
author markus schnalke <meillo@marmaro.de>
date Sat, 14 Jan 2012 21:36:58 +0100
parents b27f66555ba8
children a408411ff8df
line diff
     1.1 --- a/src/conf.c	Sat Jan 14 18:44:48 2012 +0100
     1.2 +++ b/src/conf.c	Sat Jan 14 21:36:58 2012 +0100
     1.3 @@ -249,50 +249,6 @@
     1.4  	return iface;
     1.5  }
     1.6  
     1.7 -#ifdef ENABLE_IDENT  /* so far used for that only */
     1.8 -static struct in_addr*
     1.9 -parse_network(gchar *line, gint def_port)
    1.10 -{
    1.11 -	gchar buf[256];
    1.12 -	gchar *p, *q;
    1.13 -	struct in_addr addr, mask_addr, net_addr, *p_net_addr;
    1.14 -	guint n;
    1.15 -
    1.16 -	DEBUG(9) fprintf(stderr, "parse_network: %s\n", line);
    1.17 -
    1.18 -	p = line;
    1.19 -	q = buf;
    1.20 -	while (*p && (*p != '/') && (q < buf + 255))
    1.21 -		*(q++) = *(p++);
    1.22 -	*q = '\0';
    1.23 -
    1.24 -	if ((addr.s_addr = inet_addr(buf)) == INADDR_NONE) {
    1.25 -		fprintf(stderr, "'%s' is not a valid address (must be ip)\n", buf);
    1.26 -		exit(1);
    1.27 -	}
    1.28 -
    1.29 -	if (*p) {
    1.30 -		guint i;
    1.31 -		p++;
    1.32 -		i = atoi(p);
    1.33 -		if ((i >= 0) && (i <= 32))
    1.34 -			n = i ? ~((1 << (32 - i)) - 1) : 0;
    1.35 -		else {
    1.36 -			fprintf(stderr, "'%d' is not a valid net mask (must be >= 0 and <= 32)\n", i);
    1.37 -			exit(1);
    1.38 -		}
    1.39 -	} else
    1.40 -		n = 0;
    1.41 -
    1.42 -	mask_addr.s_addr = htonl(n);
    1.43 -	net_addr.s_addr = mask_addr.s_addr & addr.s_addr;
    1.44 -
    1.45 -	p_net_addr = g_malloc(sizeof(struct in_addr));
    1.46 -	p_net_addr->s_addr = net_addr.s_addr;
    1.47 -	return p_net_addr;
    1.48 -}
    1.49 -#endif
    1.50 -
    1.51  static gboolean
    1.52  eat_comments(FILE *in)
    1.53  {
    1.54 @@ -544,20 +500,6 @@
    1.55  				g_free(node->data);
    1.56  			}
    1.57  			g_list_free(tmp_list);
    1.58 -		} else if (strcmp(lval, "ident_trusted_nets") == 0) {
    1.59 -#ifdef ENABLE_IDENT
    1.60 -			GList *node;
    1.61 -			GList *tmp_list = parse_list(rval, FALSE);
    1.62 -
    1.63 -			conf.ident_trusted_nets = NULL;
    1.64 -			foreach(tmp_list, node) {
    1.65 -				conf.ident_trusted_nets = g_list_append(conf.ident_trusted_nets, parse_network((gchar *) (node->data), 25));
    1.66 -				g_free(node->data);
    1.67 -			}
    1.68 -			g_list_free(tmp_list);
    1.69 -#else
    1.70 -			logwrite(LOG_WARNING, "%s ignored: not compiled with ident support\n", lval);
    1.71 -#endif
    1.72  		} else if (strncmp(lval, "query_routes.", 13) == 0) {
    1.73  			GList *file_list = parse_list(rval, FALSE);
    1.74  			table_pair *pair = create_pair(lval+13, file_list);