[Date Prev][Date Next] [Chronological] [Thread] [Top]

backend_group and re-entrant operations

The SASL code performs additional searches (to resolve SASL regex rules), but 
in doing so sets the connection to be NULL. If the server is configured to 
use group based access control, this causes a segmentation fault in 
backend_group when it tries to store things in the NULL connection structure.

I've trialled two solutions to this, both of which work. I was wondering 
which would be considered to be the "correct" solution.

1) Make backend_group ignore the connection structure if conn==NULL. This is 
a trivial patch, and seems to work fine, just disabling the group membership 

2) Make the SASL code pass the connection identifier through all of its 
internal operations, and delete the group cache information when we're 
finished (as its for the pre-authentication ID)

I guess the more general question is - is it valid to perform backend 
operations with a NULL connection?



Simon Wilkinson            <simon@sxw.org.uk>          http://www.sxw.org.uk