[Dovecot] Patch (Re: Different classes of user)

Timo Sirainen tss at iki.fi
Sun Feb 18 13:07:06 UTC 2007


On Sun, 2007-02-18 at 12:57 +0000, John Robinson wrote:
> +	else if (strcmp(key, "secured") == 0)
> +		request->tls_secured = 1;

Note that "secured" doesn't necessarily mean SSL/TLS. It's also set if
you're logging in from the same computer (local ip == remote ip).

> +	if (module->service_name == NULL) {
> +		service = request->service;
> +	} else {
> +		t_push();
> +		expanded_service = t_str_new(256);
> +		table = auth_request_get_var_expand_table(request,
> +						auth_request_str_escape);
> +		var_expand(expanded_service, module->service_name, table);
> +		service = p_strdup(request->pool, str_c(expanded_service));
> +		t_pop();
> +	}

I'd remove t_push/t_pop and use service = str_c(expanded_service)
directly. p_strdup()ing from request pool uses more memory a bit longer.

Otherwise looks ok. But I think I'll add this to CVS HEAD and not v1.0.
I'm at least trying to keep a feature freeze. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070218/794547f3/attachment.pgp 


More information about the dovecot mailing list