Commit Graph

18337 Commits

Author SHA1 Message Date
Taylor R Campbell
f6d1dfd60f *.l: Fix old-style function definitions of yywrap. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
a1d92fefbc Use rk_UNCONST with putenv("...") to pacify -Wwrite-strings. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
7223924aeb roken/hostent_find_fqdn.c: Fix unnecessary const abuse. 2026-01-18 19:06:16 -06:00
Taylor R Campbell
ce43ff7b42 roken/getuserinfo.c: Fix various const abuse. 2026-01-18 19:06:16 -06:00
Nicolas Williams
1a82701a91 osx: Fix warnings/errors 2026-01-18 19:06:16 -06:00
Nicolas Williams
76fbb83e86 hx509: Add a JWT fuzzer 2026-01-18 19:06:16 -06:00
Nicolas Williams
2ff2cc04b8 base: Add a fuzzer for JSON 2026-01-18 19:06:16 -06:00
Nicolas Williams
ae7d6746d1 gsstool: Add GSS-based kinit-like acquire_cred cmd
This has most of the features needed to act as a kinit that uses GSS
APIs, specifically gss_acquire_cred_from() and gss_store_cred_into2().

It's missing some functionality, such as being able to drive prompts
from AS responses (if we add minor status codes for representing KDC
pre-auth proposals, then we do drive prompts, but we would have to
encode a lot of mechanism-specific knowledge into gsstool).

The point of this commit is to explore:

 - GSS functionality for kinit-like actions

 - credential store key/value pairs supported by the mechanisms

 - document the credential store key/value pairs (in gsstool.1)

that might lead to further enhancements.  But gsstool acquire-cred
is quite functional at this point!
2026-01-18 19:06:16 -06:00
Nicolas Williams
b804b22446 gsskrb5: Add cred store PKINIT and FAST options 2026-01-18 19:06:16 -06:00
Nicolas Williams
220a47b000 hx509: Add JOSE functionality 2026-01-18 19:06:16 -06:00
Nicolas Williams
dafe6323fb krb5: Restore 1DES and 3DES 2026-01-18 19:06:16 -06:00
Nicolas Williams
cbe156d927 Use OpenSSL 3.x _only_ and implement RFC 8636
- No more OpenSSL 1.x support
 - Remove 1DES and 3DES
 - Remove NETLOGON, NTLM (client and 'digest' service)
2026-01-18 19:06:16 -06:00
Nicolas Williams
02ce745c6e sl: Fix OS X build (bison) 2026-01-18 16:09:31 -06:00
Nicolas Williams
7439820618 hcrypto, otp: Remove hcrypto and otp!
We must switch to OpenSSL 3.x, and getting lib/hcrypto to provide
OpenSSL 3.x APIs is too large an undertaking.  Plus the hcrypto backend
is not safe, not secure (probably has timing leaks galore), and no one
has the resources to make it a world-class crypto library, so it just
has to go.
2026-01-18 16:09:31 -06:00
Nicolas Williams
b704f45dce iprop: Fix Windows bug 2026-01-18 16:09:30 -06:00
Nicolas Williams
845a9bb0e6 iprop: Fix leaks in ipropd-slave 2026-01-18 16:09:30 -06:00
Nicolas Williams
b8aed2b43e kadm5: Check ftruncate() result 2026-01-18 16:09:30 -06:00
Nicolas Williams
8fbd67005d kadm5: Add KADM5_CONFIG_ASYNC_HDB_WRITES param 2026-01-18 16:09:30 -06:00
Nicolas Williams
49ff8baae4 hdb: Change default_keytypes[] to drop weak enctypes 2026-01-18 16:08:40 -06:00
Nicolas Williams
8a52ba7e0f krb5: Free context at exit time in test_set_kvno0.c 2026-01-18 16:08:40 -06:00
Nicolas Williams
687c7d5fb7 krb5: Fix leak in krb5_sendauth() 2026-01-18 16:08:40 -06:00
Nicolas Williams
69d214b519 krb5: _krb5_pk_octetstring2key() fails to clear keydata 2026-01-18 16:08:40 -06:00
Nicolas Williams
7587003ec6 krb5: Promote AES SHA2 enctypes to preferred 2026-01-18 16:08:40 -06:00
Nicolas Williams
acd62212d5 spnego: Fix negoex leak 2026-01-18 16:08:40 -06:00
Nicolas Williams
10be6a75c4 spnego: Restrict when SANON gets negotiated
There were cases where we weren't negotiating SANON where we should
have.  But we really don't want to overdo it.  In particular we really
never ever want a user with expired or absent Kerberos credentials (say)
to accidentally negotiate SANON as that will then lead to authorization
errors down the line, and those would be hard to diagnose as they would
be masking the real issue (expired or absent credentials).

So basically either the user passes GSS_C_ANON_FLAG or (and/or) they
call gss_set_neg_mechs() to explicitly request SANON.

Partly authored by me, partly authored by Claude with heavy human
guidance, and reviewed by me.
2026-01-18 16:08:40 -06:00
Nicolas Williams
7d16663dfa gsskrb5: Fix part of the enctype negotiation problems 2026-01-18 16:08:40 -06:00
Nicolas Williams
6dc1508e8c gss: Add threaded testing of GSS-API! 2026-01-18 16:08:40 -06:00
Nicolas Williams
1274238948 gss: Fix mech attr matching (test_mech_attrs()) 2026-01-18 16:08:40 -06:00
Nicolas Williams
b0c925797a gss: Use the 'gss_mo' in each mech to find mech_attrs (needed by SPNEGO) 2026-01-18 16:08:40 -06:00
Nicolas Williams
b6c3116400 base: Treat KRB5_TRACE=<path> as KRB5_TRACE=0-5/FILE:<path> 2026-01-18 16:08:40 -06:00
Nicolas Williams
3451950db7 base: NULL-terminate getarg_strings 2026-01-18 16:08:40 -06:00
Nicolas Williams
a7bba71ab8 base: Implement appended-error concat 2026-01-18 16:08:40 -06:00
Nicolas Williams
e74f785367 hxtool: Fix leak in acert sub-command 2026-01-18 16:08:40 -06:00
Nicolas Williams
50244ef92d hxtool: Enable extended MANDOC generation 2026-01-18 16:08:39 -06:00
Nicolas Williams
ff67770aa1 hx509: Quiet warnings 2026-01-18 16:08:39 -06:00
Nicolas Williams
74a613c67d sl: Add extended MANDOC generation 2026-01-18 16:08:39 -06:00
Nicolas Williams
90d116d641 asn1: Quiet warnings 2026-01-18 16:08:39 -06:00
Nicolas Williams
4db2636862 asn1: Print negative enum values correctly 2026-01-18 16:08:39 -06:00
Nicolas Williams
bd9a03d498 asn1: Add ASN1_MALLOC_ENCODE_SAVE() macro 2026-01-18 16:08:39 -06:00
Nicolas Williams
ec942cd5a1 asn1: Add util der_show_heim_oid_sym() for use in gdb 2026-01-18 16:08:39 -06:00
Nicolas Williams
f74b82d6f0 windows: Add missing exports in lib/asn1 2026-01-18 16:08:39 -06:00
Nicolas Williams
4a4567fa17 windows: No SSIZE_MAX on Windows... 2026-01-18 16:08:39 -06:00
Nicolas Williams
1042807a1c base: Fix JSON encoder crash 2026-01-18 16:08:39 -06:00
Nicolas Williams
28b05924c5 roken: Add URL-safe base64 2026-01-18 16:08:39 -06:00
Nicolas Williams
788e2ee3c3 roken: Fix getarg run-on help bug 2026-01-18 16:08:39 -06:00
Nicolas Williams
5fa7d6edd8 roken: Add getdelim()/getline()
Ported from lib/libedit's.
2026-01-18 16:08:39 -06:00
Nicolas Williams
e60f02aed1 roken: Use secure_getenv() in socket_wrapper 2026-01-07 17:49:17 -06:00
Nicolas Williams
771fb1c367 roken: Split up mini_inetd_addrinfo()
To speed up tests/gss/check-gssmask we need to remove the `sleep 10`
found there, and to do that we need to make the gssmask daemons use
roken_detach_prep()/roken_detach_finish(), and to do that we need to
split up mini_inetd_addrinfo().

This commit authored by Claude with human guidance and review.
2026-01-07 17:49:17 -06:00
Stefan Metzmacher
8c3c97bdf6 gsskrb5: let GSS_C_DCE_STYLE imply GSS_C_MUTUAL_FLAG as acceptor
Windows clients forget GSS_C_MUTUAL_FLAG in some situations where they
use GSS_C_DCE_STYLE, in the assumption that GSS_C_MUTUAL_FLAG is
implied.

Both Windows and MIT as server already imply GSS_C_MUTUAL_FLAG
when GSS_C_DCE_STYLE is used.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15740

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-04-16 12:59:37 -04:00
Ihar Hrachyshka
f0fd2d51b6 Link tests with -lresolv that depend on it 2025-04-16 10:37:27 -04:00