using hook for client_check_cb

David K. Sayre dks at lanl.gov
Wed Feb 22 19:28:50 EST 2006


The only part that threw me off, is that I don't get these messages  
if I don't change a users nick. So if I log on twice, create two  
rooms, and join both rooms, no problem. If one one of the users  
authenticates, and thus changes nicks, then I get these errors  
constantly. It could be these settings, but why only if I change  
nicks? If just getting rid of the settings works, then I can live  
with that, but if I am missing something I would like to know.

Thanks,
David Sayre
Los Alamos National Labs

On Feb 22, 2006, at 5:20 PM, Brian Sheard wrote:

> Those messages are related to the pace setting in your ircd.conf,  
> there are 2 settings, set them both to zero, and you'll rid  
> yourself of those messages.  They are there so that clients cant  
> overload a server with complicated commands.
>
> David K. Sayre wrote:
>
>> I have another interesting problem. I am authenticating users  
>> fine,  but I would like to distinguish between authenticated and  
>> non- authenticated users. Basically I would like to let people log  
>> in  without authenticating, but let the users know if they are  
>> talking to  an authenticated user.
>>
>> The initial thought is that I would append something to the end  
>> of  the nick. So I am attempting to append a * or a _lanl.  The  
>> problem I  am getting is that when I rename a user, I start  
>> getting error  messages to the clients stating "Server load is  
>> temporarily too  heavy. Please wait a while and try again".
>>
>> Here is an exempt of the code I am using,
>>
>> void *pam_auth(va_list args)
>> {
>>         struct Client *source_p = va_arg(args, struct Client *);
>>         const char *username = va_arg(args, const char *);
>> ....
>>         user = source_p->name;
>>         user_auth = (char *)malloc(sizeof(char) * (strlen(user) +  
>> 6));
>>
>>         sprintf(user_auth, "%s_lanl", user);
>> ....
>>         if (retval == PAM_SUCCESS) {
>>                 ilog(L_INFO, "%s Authenticated\n", user);
>>                 change_local_nick(source_p,source_p,user_auth);
>>         } else {
>>                 ilog(L_INFO, "%s Not Authenticated\n", user);
>>         }
>>
>> Are there any ideas out there? Should I not be sending in my  
>> source_p  as the client and server?
>>
>> David Sayre
>> Los Alamos National Labs
>>
>> On Feb 22, 2006, at 8:24 AM, David K. Sayre wrote:
>>
>>> That worked perfectly. I was thinking about doing that, but I  
>>> was  trying to call verify_access directly, and then I was  
>>> thinking  about redoing a lot of that code in my module, this  
>>> works perfectly  and is much easier.
>>>
>>> Thank you very much,
>>> David Sayre
>>> Los Alamos National Labs
>>>
>>> On Feb 22, 2006, at 3:10 AM, Piotr Niżyński wrote:
>>>
>>>> David K. Sayre napisał(a):
>>>>
>>>>> void *pam_auth(va_list args)
>>>>> {
>>>>>         struct Client *source_p = va_arg(args, struct Client *);
>>>>>         const char *username = va_arg(args, const char *);
>>>>>     return source_p;
>>>>> }
>>>>
>>>>
>>>> Most likely the problem is you are not attaching an I-line to  
>>>> the  client. The easiest way to solve this would be:
>>>>
>>>> return pass_callback(hook, source_p, username);
>>>>
>>>> instead of return source_p.
>>>>
>>>> As you can see, s_user.c does the following in   
>>>> register_local_user, just after calling client_check_cb:
>>>>
>>>>   ptr   = source_p->localClient->confs.head;
>>>>   aconf = map_to_conf(ptr->data);
>>>>
>>>>   if (!IsGotId(source_p))
>>>> [...]
>>>>
>>>> so it assumes there IS a conf attached to source_p->localClient-  
>>>> >confs.head. Besides, it can be assumed in various ircd places,   
>>>> and also it is required to have the ping freq/sendq size/limits   
>>>> working.
>>>>
>>>> Regards.
>>>
>>>
>>>
>>
>>





More information about the hybrid mailing list