Roland C. Dowdeswell
f0f07ff408
Use krb5_enomem() more consistently in lib/krb5.
2013-02-13 16:15:00 +08:00
Love Hornquist Astrand
6020e6c5b4
make http parser not exit out early
2013-02-10 23:20:37 -08:00
Love Hornquist Astrand
9a5de87ca1
store response in right place
2013-02-10 22:50:10 -08:00
Love Hornquist Astrand
58ff480763
rewrite send to kdc to be more agressive, try kdcs in paralell and easier to configure behavior
2013-02-10 19:02:52 -08:00
Roland C. Dowdeswell
3a30f3b0d1
Windows doesn't support poll(2) or fcntl(2) so #ifdef it out in send_to_kdc.c.
2012-08-14 22:50:33 +01:00
Roland C. Dowdeswell
842ca62336
Ensure that timeouts apply to TCP socket connexions.
...
Currently the Heimdal code calls connect(2) on TCP connexions to
the KDC without setting O_NONBLOCK. This code implements a
timed_connect() function which will in the case of SOCK_STREAM
sockets put the socket into non-blocking mode prior to calling
connect and use select(2) to apply the configured timeout to connect
completion. This does not entirely solve the problem of potential
timeouts in the code as it is still possible to block while writing
to the socket. A proper implementation would also likely start
new connexions after a short interval before timing out existing
connexions and return the results from the first KDC which successfully
responds but we did not do that yet.
This patch is from heimdal-1-5-branch patches:
5b55e4429caed27b32aac4bc5930f2672a43f273
6b66321b271ee4672e70ad349ec796dd755cf897
2e12c7f3e8dca7e1696ebd92199617ce413565e7
Squashed together along with a quick shadowed variable warning fix
to allow it to compile with --enable-developer.
2012-07-12 01:00:23 +01:00
Roland C. Dowdeswell
abdde6a608
Additional changes to make -Wshadow build on Ubuntu 10.04.
...
Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
2012-06-07 16:59:01 +01:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90
Warning fixes from Christos Zoulas
...
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Asanka Herath
5dcc605f6b
Fix calling conventions for Windows
2010-08-20 13:14:10 -04:00
Love Hornquist Astrand
077357c848
catch error from as.*printf
2010-05-30 13:37:07 -07:00
Love Hornquist Astrand
deee0bbad9
put SOCK_CLOEXEC in the right argument, from Harald Barth
2010-01-25 23:01:09 -08:00
Love Hornquist Astrand
4182a61eba
rename closesocket to rk_closesocket
2009-12-22 09:03:05 +01:00
Love Hornquist Astrand
d1d0de730d
refix socket wrappers with rk_
2009-12-21 08:50:46 +01:00
Love Hornquist Astrand
687db64c56
Patch from Secure Endpoints/Asanka Herath for windows support
2009-12-21 08:45:28 +01:00
Love Hornquist Astrand
9120d17eb0
Tell some what servers we tried to talk to
2009-09-07 20:55:05 -07:00
Love Hörnquist Åstrand
942a821fab
remove RCSID
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand
03e7b2d3a5
add timeout to krb5_send_to_kdc_func, from metze
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24969 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-27 15:01:47 +00:00
Love Hörnquist Åstrand
f9e2c569f9
make _krb5_copy_send_to_kdc_func handle no set functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23927 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-18 21:16:03 +00:00
Love Hörnquist Åstrand
03babea1e3
switch to krb5_clear_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:55:39 +00:00
Love Hörnquist Åstrand
e8dd9bcc6f
add helper function _krb5_copy_send_to_kdc_func
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23910 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:55:25 +00:00
Love Hörnquist Åstrand
6937d41a02
remove trailing whitespace
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898
switch to utf8 encoding of all files
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
e3826c3a28
N_()ify
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23802 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:35:44 +00:00
Love Hörnquist Åstrand
4384fb0209
use SOCK_CLOEXEC
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23517 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-11 10:01:38 +00:00
Love Hörnquist Åstrand
d6c66ef961
close-on-exec
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23448 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-27 12:09:22 +00:00
Love Hörnquist Åstrand
68f4fc8b53
Add support for the send_to_kdc plugin interface.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23356 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-15 11:23:58 +00:00
Love Hörnquist Åstrand
7fcd266fdd
use krb5_set_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
743ccd85cf
make work with cpp again, reported by Hai Zaar
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21934 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-08-27 14:21:04 +00:00
Love Hörnquist Åstrand
055dd97483
(_krb5_kdc_retry): check if the whole process needs to restart or just
...
skip this KDC.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21062 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-12 17:58:57 +00:00
Love Hörnquist Åstrand
e86b58e01c
Add hooks for processing the reply from the server.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21058 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-12 17:49:37 +00:00
Love Hörnquist Åstrand
b965dacaf9
(krb5_sendto): zero out receive buffer.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19973 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-17 17:19:52 +00:00
Love Hörnquist Åstrand
ebc9adecfb
Rename krb5_set_send_recv_func to krb5_set_send_to_kdc_func.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18679 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 18:42:01 +00:00
Love Hörnquist Åstrand
09dda4824a
Add sent_to_kdc hook, from Andrew Bartlet.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18671 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 18:14:35 +00:00
Love Hörnquist Åstrand
c1ce715df2
(send_and_recv_http): don't expose freed pointer, found by IBM checker.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16957 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 02:32:03 +00:00
Love Hörnquist Åstrand
e1bd6f1007
(recv_loop): it should never happen, but make sure nbytes > 0
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16789 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-07 19:39:59 +00:00
Love Hörnquist Åstrand
dffa265ac7
(krb5_sendto): remove shadowing unnessecery variable ret
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15472 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-17 04:33:11 +00:00
Love Hörnquist Åstrand
d375fa4d7f
(send_and_recv_udp): make private again
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14539 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-02 20:05:30 +00:00
Luke Howard
5d93249adc
add _krb5_send_and_recv_tcp
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14533 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-02-02 07:32:31 +00:00
Love Hörnquist Åstrand
91351971f7
add KRB5_LIB_FUNCTION to all exported functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Love Hörnquist Åstrand
bf31f6aead
remove function krb5_sendto_kdc2, its no longer used
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13627 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-23 12:09:33 +00:00
Love Hörnquist Åstrand
bce36e1e1e
(krb5_sendto_kdc_flags): new function, and then implement the order
...
krb5_sendto_kdc* function with this function.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12929 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-30 17:39:53 +00:00
Love Hörnquist Åstrand
68ba8507a5
revert previous
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12333 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-26 21:59:54 +00:00
Love Hörnquist Åstrand
cb584f6348
pacify mdoclink
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12331 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-26 21:56:28 +00:00
Johan Danielsson
223a6a75f2
rename send parameter to send_data
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10897 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-03-27 09:32:50 +00:00
Assar Westerlund
d78a021a3f
(send_via_proxy): initialize a variable to make gcc's optimizer happy
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10280 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-03 19:35:46 +00:00
Assar Westerlund
494e4c27a5
(krb5_sendto): remove an extra freeaddrinfo
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10112 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-18 12:40:04 +00:00
Assar Westerlund
016dcaae5f
update to use krb5_krbhst API
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10076 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-17 23:10:16 +00:00
Assar Westerlund
1f31dd74e9
update to new krb5_eai_to_heim_errno
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9951 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 22:49:56 +00:00
Assar Westerlund
d27aa3b62e
add some krb5_{set,clear}_error_string
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9937 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:14:52 +00:00