Commit Graph

29515 Commits

Author SHA1 Message Date
Luke Howard
fb6f89f295 lib/krb5: do not pack ccapi on Apple Silicon
macOS packs ccapi structures to 16 bits on PowerPC and Intel platforms only;
no special packing is used on ARM (Apple Silicon). Harmonize so Heimdal is ABI
compatible.
2020-11-19 11:04:19 +11:00
duncan-mcewan
06c871ef5a Add more test cases for issue #704 2020-11-06 12:55:31 -05:00
duncan-mcewan
72055a2911 Fix incorrect pointer increment
When encountering a backslash character the memmove() call removes it.  But then the pointer p should only be incremented by 1 to skip the escaped character rather than 2, which also skips the character following the escaped one.
2020-11-06 12:55:31 -05:00
Jeffrey Altman
70ac849844 lib/krb5: acc_resolve_2 leak if ccErrCacheNotFound
Fix the possible leak of 's' allocated by asprintf()

When squashing the changes reference "this fixes an issue introduced by 7bf4d76 ("krb5: Improve cccol sub naming; add gss_store_cred_into2()")" in the commit message.
2020-11-06 09:09:01 -05:00
Nicolas Williams
68eba10cf1 krb5: Fix API: ccache failure 2020-11-06 09:09:01 -05:00
Nicolas Williams
5716b51c18 hdb: Fix HDB corruption with LMDB backend 2020-10-27 13:30:57 -05:00
Nicolas Williams
ea8f3991fb hdb: Fix leak in SQLite3 backend 2020-10-27 13:30:57 -05:00
Nicolas Williams
21e2ba2573 sqlite: Upgrade to SQLite3 3.33.0 2020-10-27 13:30:57 -05:00
Nicolas Williams
2036b431dc krb5: Expose trace functions 2020-10-27 13:30:57 -05:00
Nicolas Williams
a7ba8855cc travis: get stack traces from cores on OS X too 2020-10-27 13:30:57 -05:00
Roland C. Dowdeswell
dcac4e1ff9 gss-token: implement -m to specify what mech to use. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
4336c944e0 gss-token: turn initiator and acceptor into loops. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
0055c1c80b gss-token: implement -S to split tokens up on output. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
9693bdb272 gss-token: restructure and refactor the code a bit. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
ca59ee0ddd Add flags and options missing from upstream gss-token. 2020-10-12 21:55:51 +01:00
Roland C. Dowdeswell
8f0506c514 gssapi/gssapi.h: we need stdarg.h because va_list is ref'd here. 2020-10-12 21:55:51 +01:00
Nicolas Williams
5d156a5799 hdb: Fix concurrency test 2020-10-08 20:34:38 -05:00
Nicolas Williams
18e8ccf4c2 hdb: WAL mode setting was done incorrectly 2020-10-08 20:34:15 -05:00
Nicolas Williams
da04b45c7f hdb: Fix SQLite3 backend bug 2020-10-08 20:30:21 -05:00
Nicolas Williams
f87ba4f23b hdb: Test LMDB and SQLite3 HDB concurrency
Test that we can dump an HDB w/o blocking write transactions.

This currently works for different processes (both backends), but not
for threads (for either backend), and it's not yet clear why.
2020-10-06 14:16:35 -05:00
Nicolas Williams
8c7900c40b hdb: Use db type preference from ./configure
Use the HDB backend type from the --with-db-type-preference=... option
to ./configure to make the default HDB backend more stable.
2020-10-05 14:51:03 -05:00
Nicolas Williams
93ada1fbf6 hdb: Remove default HDB backend footgun
Do not allow a change in build configuration time default HDB backend
selection cause existing default HDBs to not be possible to open.

Otherwise such a change will cause a KDC configured to use the default
HDB (i.e., without setting it in the "database" stanza in the "[kdc]"
section of krb5.conf) to not start.
2020-10-05 14:51:03 -05:00
Nicolas Williams
3f7868b969 httpkadmind: Fix error clobbering 2020-09-29 16:25:12 -05:00
Nicolas Williams
7ae2dfd853 krb5: Fix error msg when removing keytab entries
If a keytab was 0400 and one tried to delete with ktutil del then the
error message one would get prior to this commit is "entry not found".
2020-09-25 14:56:44 -05:00
Nicolas Williams
060ff3e09f httpkadmind: Check that host keys not vended 2020-09-25 11:10:09 -05:00
Nicolas Williams
753e636274 hdb: Fix new key delay special casing of kvno 1 2020-09-22 18:27:05 -05:00
Nicolas Williams
7845bda1e0 kadm5: Do not apply new service key delay in get
Using HDB_F_DELAY_NEW_KEYS in kadm5_s_get_principal() breaks OSKT's
expectations.
2020-09-19 21:48:49 -05:00
Nicolas Williams
95de81c9a7 kadm5: Avoid close(-1) 2020-09-18 14:31:43 -05:00
Nicolas Williams
461f360b58 iprop: Slight test race condition fix
tests/kdc/check-iprop.in tends to wait for a log message then it reads a
status file.  Well, we shouldn't write the log message before writing
the status file then!
2020-09-18 14:31:43 -05:00
Nicolas Williams
916cafe4e5 iprop: Warn about failures to write to iprop log 2020-09-18 14:31:43 -05:00
Nicolas Williams
7c947df247 ipropd: Improve multi-realm support
Running ipropd-slave on a system whose hostname's realm is not the
requested realm breaks.  Since the iprop client principal should really
be in the same realm as the master, we now force it after calling
krb5_sname_to_principal().
2020-09-18 14:31:43 -05:00
Nicolas Williams
0e09fa7fde iprop: Support hierarchical iprop 2020-09-18 14:31:43 -05:00
Nicolas Williams
c12ca129b6 httpkadmind: Fix FD leak
Using `mkstemp()` is nice, but if you don't need the FD, then don't
forget to close it!
2020-09-15 15:24:29 -05:00
Nicolas Williams
4a4ceaf287 httpkadmind: Fix NULL deref on ENOMEM 2020-09-15 11:31:29 -05:00
Nicolas Williams
3c7d12e116 krb5: Fix FD leak in ENOMEM in stdio_from_fd 2020-09-15 11:26:52 -05:00
Nicolas Williams
b2b6599f87 krb5: Fix NULL deref on ENOMEM in fkt_add_entry(2) 2020-09-15 11:26:06 -05:00
Nicolas Williams
f2f2cd18b6 kadm5: Fix auth_context leak on reconnect 2020-09-14 17:11:08 -05:00
Nicolas Williams
096888fe31 krb5: Fix NULL deref on ENOMEM in fkt_add_entry() 2020-09-14 16:38:20 -05:00
Nicolas Williams
821dcaec70 hdb: Test hdb_validate_key_rotations() 2020-09-09 22:45:17 -05:00
Nicolas Williams
ff13573ce5 hdb: Do not apply new service key delay to clients
The new [hdb] new_service_key_delay parameter should not apply to
principal entries when used as clients.  Otherwise new passwords would
not take effect immediately, and that would be very confusing.
2020-09-09 21:48:29 -05:00
Nicolas Williams
18459de867 travis: Install curl too 2020-09-08 14:34:08 -05:00
Nicolas Williams
9574783d04 kdc: Add httpkadmind
TBD:

 - improve error handling, logging, tracing!
 - move all REST services out of kdc/
2020-09-08 14:34:08 -05: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
Nicolas Williams
5447b81fb1 hdb: Move virtual principals into HDB layer
This is a large commit that adds several features:

 - Revamps and moves virtual host-based service principal functionality
   from kdc/ to lib/hdb/ so that it may be automatically visible to
   lib/kadm5/, as well as kadmin(1)/kadmind(8) and ktutil(1).

   The changes are backwards-incompatible.

 - Completes support for documenting a service principal's supported
   enctypes in its HDB entry independently of its long-term keys.  This
   will reduce HDB bloat by not requiring that service principals have
   more long-term keys than they need just to document the service's
   supported enctypes.

 - Adds support for storing krb5.conf content in principals' HDB
   entries.  This may eventually be used for causing Heimdal KDC
   services to reconfigure primary/secondary roles automatically by
   discovering the configured primary in an HDB entry for the realm.

   For now this will be used to help reduce the amount of configuration
   needed by clients of an upcoming HTTP binding of the kadmin service.
2020-09-08 00:25:36 -05:00
Nicolas Williams
ef06b94132 bx509: Fix minor test issues 2020-09-08 00:25:24 -05:00
Nicolas Williams
cb6c57dc36 bx509: Let simple authorizer use the app name 2020-09-08 00:25:24 -05:00
Nicolas Williams
4f0249cd94 hx509/kdc: Move KDC CA utility function into hx509
This is part of the program to move REST services like bx509d out of
kdc/.
2020-09-08 00:25:24 -05:00
Nicolas Williams
e311d05fee bx509d: Further disentanglement from kdc 2020-09-08 00:25:24 -05:00
Nicolas Williams
73c424ea66 bx509d: Get KDC config out of bx509d 2020-09-08 00:25:24 -05:00
Nicolas Williams
c3e99be519 kdc: Get KDC config out of CSR authorizer API
Part of refactoring to split out bx509/bnegotiate, add a kadmin REST service,
and move all of that out of kdc/.
2020-09-08 00:25:24 -05:00