svn commit: samba r22961 - in branches/SAMBA_4_0/source/auth/kerberos: .

tridge at samba.org tridge at samba.org
Thu May 17 02:21:08 GMT 2007


Author: tridge
Date: 2007-05-17 02:21:07 +0000 (Thu, 17 May 2007)
New Revision: 22961

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22961

Log:

use EVENT_FD_AUTOCLOSE and SOCKET_FLAG_NOCLOSE to fix up some hairy
problems with order of socket closing in krb5

Modified:
   branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c
===================================================================
--- branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c	2007-05-17 02:19:28 UTC (rev 22960)
+++ branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c	2007-05-17 02:21:07 UTC (rev 22961)
@@ -305,8 +305,11 @@
 		talloc_free(remote_addr);
 
 		smb_krb5->fde = event_add_fd(ev, smb_krb5, 
-					     socket_get_fd(smb_krb5->sock), 0,
+					     socket_get_fd(smb_krb5->sock), 
+					     EVENT_FD_AUTOCLOSE,
 					     smb_krb5_socket_handler, smb_krb5);
+		/* its now the job of the event layer to close the socket */
+		socket_set_flags(smb_krb5->sock, SOCKET_FLAG_NOCLOSE);
 
 		event_add_timed(ev, smb_krb5, 
 				timeval_current_ofs(context->kdc_timeout, 0),



More information about the samba-cvs mailing list