summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-17 02:21:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:32 -0500
commit2741921a509c41904de7ec64ee935ef4f9275c44 (patch)
tree1dc45083392027884f5d1e09efbb0f95962e10cc /source4
parent59d1a2b30ef3a57536876d2c58c108b6da19e4fa (diff)
downloadsamba-2741921a509c41904de7ec64ee935ef4f9275c44.tar.gz
samba-2741921a509c41904de7ec64ee935ef4f9275c44.tar.bz2
samba-2741921a509c41904de7ec64ee935ef4f9275c44.zip
r22961: use EVENT_FD_AUTOCLOSE and SOCKET_FLAG_NOCLOSE to fix up some hairy
problems with order of socket closing in krb5 (This used to be commit 46a7d83c2b49798c6c5389c13ec2b9785c47b85b)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/kerberos/krb5_init_context.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index e3a8479277..9760db4051 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -305,8 +305,11 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context,
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),