On 27 Jun 2006, at 12:22, Kostas Kalevras wrote:
On Tue, 27 Jun 2006, Josh Howlett wrote:
Hi,
I need to be able to return a user-specific Reply-Message attribute in the event of simultaneous-use being detected. In auth.c, this message is currently hard-coded.
I'm considering the following approach: if sim-use is detected, look for a new attribute in the reply items list whose value is the custom message. If it exists, use it for the Reply-Message; if not, use the existing hard-coded value.
Is this a sensible approach? If not, what should I do?
Better, create a new configuration directive which will hold the message to send
Much better :-). Is server_config[] be the appropriate place to define this? (mainconfig.c:103)
and use that in auth.c. xlat() the message before using it so that you can perform almost any operation you want before sending back the message like: sim_use_message = "You are already logged in: %{My-Attribute}"
That sounds better. I assume I just need to ensure that (1) %{My- Attribute} is defined somewhere in the dictionary (the internal server dictionary?) and (2) the attribute is added to the reply list by whatever module is being used for AuthZ. Is there anything else? Thanks, josh. Josh Howlett, Networking Specialist, University of Bristol. email: josh.howlett@bristol.ac.uk | phone: +44 (0)7867 907076 | interal: 7850