Commit Graph

57 Commits

Author SHA1 Message Date
Nicolas Williams
cfb2c74923 kadmind: Add fuzzing options 2023-01-04 01:36:03 -06:00
Nicolas Williams
b92a02edda kadmind: Online LIST using kadm5_iter_principals()
Implement a variation on the op for listing principals where if the
client indicates support for the new variation then we stream the list
instead of collecting it into one reply.  This is the server-side
version of the associated, preceding commit:

    kadm5: Add online kadm5_iter_principals()
2022-03-20 18:30:21 -05:00
Nicolas Williams
b7bf5ca6e8 kadmin: Fix warnings 2022-01-14 14:59:02 -06:00
Nicolas Williams
ea83f068e9 kadm5/kadmin: Add read-only mode
Now we can have read-only kadmind instances.
2020-09-08 00:25:40 -05:00
Jeffrey Altman
28b9283709 kadmin: enable keepalive mode on incoming sockets
Change-Id: I07d0e0c866f1081002b3e20ca9198055f98fe7d1
2020-07-24 01:32:34 -04:00
Nicolas Williams
1ae941af9b roken_detach_prep() should return fd 2019-10-03 13:09:18 -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 Hornquist Astrand
1d84562886 add HDBGET: that only supports get, iteration doesnt really make sense for the HDB keytab except when dumping 2013-10-15 12:40:39 +02:00
Love Hornquist Astrand
a4a47000b7 don't deal with pid files
we can't write out pid files since the code is using fork() and at
fork handler will delete the pid file.
2013-05-02 12:06:38 -07:00
Roland C. Dowdeswell
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00: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
Love Hornquist Astrand
433b1d5073 drop RCSID 2010-03-16 12:52:58 -07:00
Love Hornquist Astrand
b914fd57c5 remove NO_INETD by shuffling code around 2009-12-25 06:37:57 +01:00
Love Hornquist Astrand
93e0cc80f4 make use rk_SOCK_ERRNO, make compile again 2009-12-23 14:36:52 +01:00
Love Hornquist Astrand
be73fa4687 use krb5_socket_t 2009-12-23 14:12:38 +01:00
Asanka Herath
a1942c1bad Use SOCKET data type instead of ints for sockets in kadmin
Also use the new mini_inetd() API
2009-11-24 10:17:51 -08:00
Love Hörnquist Åstrand
412155fa6e Remove strange code around getarg(), just do like everyone else does it.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24865 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:32:10 +00:00
Love Hörnquist Åstrand
8d16bb0b68 add support for add,get,delete,chrand for the MIT kadmin protocol
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24240 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:42:02 +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
ada0c9cb9d Use hdb_db_dir().
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22250 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-09 05:57:31 +00:00
Love Hörnquist Åstrand
5654000990 lower amount of shadow and const warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15587 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-07 22:06:50 +00:00
Love Hörnquist Åstrand
5921574969 add verifier libraries with kadm5_add_passwd_quality_verifier
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14803 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-15 11:16:32 +00:00
Love Hörnquist Åstrand
37f8d9add9 drop keyfile, not used
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13923 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-12 07:49:29 +00:00
Johan Danielsson
2450e7b7f8 nuke kerberos 4 kadmin goo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13845 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-13 17:46:20 +00:00
Love Hörnquist Åstrand
3c88bdd4ff make kerberos4 support default turned off
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13825 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-29 08:47:54 +00:00
Love Hörnquist Åstrand
e9f1c07ce7 (main): move opening the logfile to after reading kdc.conf
move the loading of hdb keytab ops closer to where its used
From: Jeffrey Hutzelman <jhutz@cmu.edu>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13121 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-11-18 22:13:27 +00:00
Love Hörnquist Åstrand
9883b1f3e5 (main): use krb5_prepend_config_files_default, now all options in
kdc.conf is parsed, not just [kdc]key-file=


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12585 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-08-18 06:03:42 +00:00
Johan Danielsson
fed79b33b9 add option to disable kerberos 4 kadmin
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11489 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-10-21 13:21:24 +00:00
Assar Westerlund
49abdf5d33 new krb5_config_parse_file
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9941 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:17:58 +00:00
Assar Westerlund
67422a6b02 s/[gs]et_progname/[gs]etprogname/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9704 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-20 01:44:56 +00:00
Assar Westerlund
887c2b9d5e (main): use a `struct sockaddr_storage' to be able to store all types
of addresses


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9683 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-02-15 04:28:36 +00:00
Assar Westerlund
633782864b (main): handle krb5_init_context failure consistently
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9443 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-31 08:05:03 +00:00
Assar Westerlund
b5e48c0f5d remove extra prototype of kadmind_loop
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8972 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-18 05:18:07 +00:00
Johan Danielsson
2d0477ec95 use roken_getsockname
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-07 13:09:07 +00:00
Assar Westerlund
9f942d2755 use socklen_t instead of int where appropriate. From <thorpej@netbsd.org>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8907 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-06 23:03:10 +00:00
Johan Danielsson
225424fd35 write a pid file, and setup password quality functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8897 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-04 11:24:23 +00:00
Assar Westerlund
4e5af56545 use sa_size instead of sa_len, some systems define this to emulate
anonymous unions


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8847 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-27 05:22:14 +00:00
Assar Westerlund
e8b9ba1e0e ports is a string argument
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8726 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-21 01:17:20 +00:00
Johan Danielsson
350b95d091 if stdin is not a socket create and listen to sockets
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8643 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-11 13:04:55 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Johan Danielsson
2773d72986 use HDB keytabs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6873 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-26 13:09:56 +00:00
Johan Danielsson
0a03a628f7 move recvauth to kadmind_loop()
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6080 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-03 16:42:33 +00:00
Johan Danielsson
64d4aa49d8 use print_version
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5478 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-08 10:51:48 +00:00
Assar Westerlund
d69750f1ab (main): convert `debug_port' to network byte order
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5286 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-01-30 12:49:49 +00:00
Assar Westerlund
fc1956b05f new arg_printusage
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5130 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-08-18 21:17:01 +00:00
Johan Danielsson
3b1a958f96 Return value.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4744 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-04-05 19:15:39 +00:00
Johan Danielsson
bc8af2b238 Use `kadmind_loop'.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4695 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-04-03 01:55:44 +00:00
Johan Danielsson
4e1a8940a5 Add `--keytab' option.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4624 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-21 00:53:17 +00:00