Nicolas Williams
953dc07391
Round #1 of scan-build warnings cleanup
2016-11-15 21:27:20 -06:00
Viktor Dukhovni
529a91d69a
MacOS/X fixes
2016-06-09 01:13:14 -04:00
Nicolas Williams
69eb97a92d
kdc: num_kdc_procs < 1 -> use NCPUs
2016-02-29 19:13:12 -06:00
Nicolas Williams
1575f4f69a
KDC: Don't confuse master process with master
2016-01-21 12:43:31 -06:00
Nicolas Williams
a6e36356b5
KDC: fix C-style
2016-01-21 12:43:30 -06:00
Nicolas Williams
4f87d85d65
Fix Windows build: no fork for kdc
2016-01-20 15:03:30 -06:00
Luke Howard
d135020e8f
kdc: Fix compile error on OS X
...
bonjour_kid() was missing the krb5_context parameter name, preventing
compilation on Darwin (where __APPLE__ is defined)
2015-12-09 10:46:38 +11:00
Roland C. Dowdeswell
352a7e94a3
Make the KDC use a multi-process model.
...
We now fork(2) a number of separate KDC processes rather than a single
process. By default, the number is selected by asking how many CPUs
the machine has. We also have a master process which monitors all
of the children (which do the actual work) and it will restart kids
who die for any reason. The children will die when the parent dies.
In the case of MacOS X, we also move the bonjour code into another
separate child as it creates threads and this is known to play
rather poorly with fork(2). We could move this logic into a
designated child at some point in the future.
We slow down the spawning to one every 25ms to prevent instant crashes
and restarts from consuming all available system time. This approach
may want to be revisited in the future.
2015-11-06 15:39:30 -05:00
Nicolas Williams
b48bed5f42
Daemons detach atomically to avoid having to wait
...
Tests that start daemons have to "wait" for them to start.
This commit makes Heimdal daemons prep to detach (when requested) by
forking early, then having the child signal readiness to the parent when
the child really is ready. The parent exits only which the child is
ready. This means that tests will no longer need to wait for daemons.
However, tests will still need a pidfile or such so they can stop the
daemons.
Note that the --detach options should not be used on OS X from launchd,
only from tests.
2015-03-24 11:49:59 -05:00
Love Hörnquist Åstrand
37afa01be3
rename roken base64, fixes #107
2014-08-22 20:57:24 -07:00
Dana Koch
a95cae113d
Fix typo with return values in realloc_descrs.
...
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org >
2012-11-22 17:24:40 -08:00
Dana Koch
3f71aca591
If multiple accept's happen during a select, make sure it gets stored correctly, and does not clobber an existing open descriptor.
...
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org >
2012-11-17 14:07:59 -08:00
Love Hörnquist Åstrand
503266c4a3
use json to drive kdc-tester
2011-11-21 20:34:35 -08:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
657297a738
clean the last bits of KRB4 support in KDC
2011-05-07 11:44:15 -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
Love Hornquist Astrand
4f11e546b5
comment + indent
2010-06-29 11:38:12 -07:00
Love Hornquist Astrand
a36f3c7d2a
if its a multiline query, truncate after the first line
2010-06-29 11:37:44 -07:00
Love Hornquist Astrand
faa1528394
make http transport work again
2010-06-02 08:32:03 -07:00
Love Hornquist Astrand
dde9ae659b
drop RCSID
2010-03-16 12:50:09 -07:00
Asanka Herath
0ad290b500
Fix missing #endif
2009-12-01 16:42:28 -05:00
Love Hornquist Astrand
86f4c66efd
Merge branch 'master' into wip/win32-port2
2009-11-25 05:41:14 -08:00
Asanka Herath
b191b1e12f
Make kdc build on windows
...
Signed-off-by: Love Hornquist Astrand <lha@h5l.org >
2009-11-24 22:19:37 -08:00
Love Hornquist Astrand
f1c0c1bba3
prefix SOCKET symbols with rk_
2009-11-25 05:29:18 +01:00
Asanka Herath
d47c01083b
Use SOCKET data type instead of ints for sockets in kdc
2009-11-24 10:18:19 -08:00
Love Hornquist Astrand
6fada85f78
if the UDP packet is truncated, return too packet large
2009-09-16 16:06:11 -07:00
Love Hörnquist Åstrand
ef65ca7a16
free data on write error back on the tcp socket cid#123, make sure we dont write more data back then we got
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24105 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:00:29 +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
10df17bf54
Use unsigned where appropriate.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22877 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 18:50:56 +00:00
Love Hörnquist Åstrand
9a0cc41169
Update link.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22434 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-14 09:21:37 +00:00
Love Hörnquist Åstrand
23ed41b109
Move up krb5_kdc_save_request so we can catch the reply data too.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20958 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-07 04:35:05 +00:00
Love Hörnquist Åstrand
44e3c4e620
Option to save the request to disk.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20950 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-07 03:07:42 +00:00
Love Hörnquist Åstrand
01d0aa7e38
Update kdc time.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20948 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-07 02:20:45 +00:00
Love Hörnquist Åstrand
3ce7195579
Listen to 9878 if kca is turned on.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19552 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-28 21:09:00 +00:00
Love Hörnquist Åstrand
247cda7f2f
(loop): Log that the kdc have started.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18392 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-10 10:13:36 +00:00
Love Hörnquist Åstrand
3128010cc2
(do_request): tell krb5_kdc_process_request if its a datagram reply or not
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18386 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-09 15:41:01 +00:00
Love Hörnquist Åstrand
aa75a633ee
(handle_vanilla_tcp): shorten length when we shorten the buffer, this
...
matter im the PK-INIT encKey case where a checksum is done over the
whole packet. Reported by Olga Kornievskaia
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18345 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-08 09:01:36 +00:00
Love Hörnquist Åstrand
5f62c460c3
(handle_vanilla_tcp): use unsigned integer for for length(
...
(handle_tcp): if the high bit it set in the unknown case, send back a
KRB_ERR_FIELD_TOOLONG
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17798 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-05 12:00:16 +00:00
Love Hörnquist Åstrand
049a354efd
(do_request): clean reply with krb5_data_zero
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17604 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-01 17:52:09 +00:00
Love Hörnquist Åstrand
f78e6abe5c
(de_http): sscanf takes a char *, not unsigned ditto, cast approriately
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15683 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-20 08:40:27 +00:00
Love Hörnquist Åstrand
7a3fc5e663
Don't pollute namespace, generate public headerfile
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15532 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-30 01:54:49 +00:00
Love Hörnquist Åstrand
7132a9b084
Merge in the libkdc/kdc configuration split from Andrew Bartlet <abartlet@samba.org>
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15529 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-30 01:03:35 +00:00
Johan Danielsson
80973980d5
rename sendlength to prependlength (which hopefully better represents
...
its purpose), and change type to krb5_boolean
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15317 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-30 20:56:18 +00:00
Johan Danielsson
e3f74b008e
punctuation
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15304 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-30 11:23:09 +00:00
Johan Danielsson
a837b83e57
log signal causing exit
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15302 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-30 11:19:56 +00:00
Love Hörnquist Åstrand
af99f6c862
add kaserver support independ of having krb4 support
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14915 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-24 13:47:43 +00:00
Love Hörnquist Åstrand
2eb8ce2e5f
Use the new Kerberos 4 functions in libkrb5 and so kerberos 4 is
...
always compiled in (still default disabled)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14900 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-23 19:57:56 +00:00
Love Hörnquist Åstrand
ca0da3a363
(handle_http_tcp): handle error from write(2)
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14398 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-13 22:18:38 +00:00
Love Hörnquist Åstrand
7816000f45
Make sure argument passed to ctype isn't signed char
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14322 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-10-30 20:55:14 +00:00