[SAMBA4][PATCH] Add hooks to take over KDC socket routines

Andrew Bartlett abartlet at samba.org
Tue Sep 27 21:55:41 GMT 2005


On Tue, 2005-09-27 at 19:42 +0200, Stefan Metzmacher wrote:
> On Tue, Sep 27, 2005 at 11:56:01PM +1000, Andrew Bartlett wrote:
> > I've hacked the socket layer out of cldap.c to instead handle this very
> > specific case of one udp packet and reply, but I hope that the socket
> > infrastructure might improve before I need to seriously handle TCP.
> > Because there is only every one packet, there is no send queue.
> 
> do you want sento() and recvfrom() on tcp sockets?

No, this will all go to mush for TCP, but I'm not really thinking about
that yet. 

> > 
> > This same plugin system might also be useful for a self-contained
> > testing mode in Heimdal, in conjunction with libkdc.  I would suggest
> > using socket-wrapper instead however.
> 
> +               smb_krb5->fde = event_add_fd(ev, smb_krb5,
> +                                            socket_get_fd(smb_krb5->sock), 0,
> +                                            smb_krb5_socket_handler, smb_krb5);
> +
> +               event_add_timed(ev, smb_krb5,
> +                               timeval_current_ofs(context->kdc_timeout, 0),
> +                               smb_krb5_request_timeout, smb_krb5);
> +
> +               EVENT_FD_WRITEABLE(smb_krb5->fde);
> +               EVENT_FD_READABLE(smb_krb5->fde);
> 
> why READABLE here?

Indeed, I remembered that after I went to sleep :-)

> the rest looks ok

Great.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Samba Developer, SuSE Labs, Novell Inc.        http://suse.de
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- 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://lists.samba.org/archive/samba-technical/attachments/20050928/d7263cda/attachment.bin


More information about the samba-technical mailing list