Commit Graph

31082 Commits

Author SHA1 Message Date
Nicolas Williams
add30d09f9 kadmin: Make maximum ticket lifetime and renew time signed integers 2026-01-22 11:39:05 -06:00
Joseph Sutton
96a5c0b82a hdb: Make maximum ticket lifetime and renew time signed integers
This allows for negative lifetimes to be encoded, and fits in better
with our use elsewhere of time_t, which in POSIX is a signed integer
type.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2026-01-22 11:39:05 -06:00
Nicolas Williams
55287b56bc sqlite: Fix Windows build 2026-01-22 11:38:51 -06:00
Nicolas Williams
bab1bca910 sqlite: Don't rename types / macros 2026-01-22 11:31:34 -06:00
Nicolas Williams
8961f81de7 sqlite: Add gen-sqlite3-namespace.sh script for upgrades 2026-01-22 11:23:57 -06:00
Nicolas Williams
118004e85c Revert "tests: Speed up tests/gss/check-gssmask"
This reverts commit 366016b1f6.
2026-01-22 10:48:59 -06:00
Nicolas Williams
474f07cfa9 NEWS: Fix formatting 2026-01-22 00:02:05 -06:00
Nicolas Williams
a1220ce6d2 sqlite: Rename symbols (fix #1142) 2026-01-22 00:02:05 -06:00
Nicolas Williams
41591932b8 krb5: Nonces in krb5.asn1 should be unsigned 2026-01-22 00:02:05 -06:00
Nicolas Williams
1faea3ffcf kdc: Make MAX_TIME INT32_MAX always
This just to be consistent with a likely coming change to make
HDB_entry's max_life signed.  68 years is long enough.
2026-01-22 00:02:05 -06:00
Nicolas Williams
c1c0be207e kdc: Get altsecid_gss_preauth_authorize building 2026-01-22 00:02:05 -06:00
Nicolas Williams
fdf107353e hdb: Get LDAP backend building again 2026-01-22 00:02:05 -06:00
Taylor R Campbell
0c14d60c8c gssmask: Disable Nagle.
This reduces the check-gssmask runtime from around 7min to 1-2sec on
my laptop.

It is, perhaps, suboptimal to disable Nagle for a program that writes
successive 4-byte units of a protocol message in separate syscalls
rather than a single batch, and might be better to instead disable
delayed acks, but:

(a) there's no portable API for disabling delayed acks, and
(b) this program appears to be used exclusively for testing anyway.

fix https://github.com/heimdal/heimdal/issues/1139
2026-01-21 23:57:41 -06:00
Taylor R Campbell
82f7b8072c Nix bashisms.
This isn't fully POSIX shell, because POSIX shell still doesn't have
`local' variable declarations, but at least it is reasonably portable
now.

fix https://github.com/heimdal/heimdal/issues/1299
2026-01-21 12:40:26 -06:00
Nicolas Williams
f11debe689 krb5: Make socksdrawer setprogname() 2026-01-21 11:45:45 -06:00
Nicolas Williams
4584b22511 hx509: Make fuzz_jose use getarg() 2026-01-21 11:45:28 -06:00
Nicolas Williams
ea3024a706 base: Make fuzz_json use getarg() (fix #1298) 2026-01-21 11:45:06 -06:00
Nicolas Williams
4d80b16a30 Revert "kdc: Fix kinit of principal aliases"
This reverts commit d2047065bd.
2026-01-21 11:37:25 -06:00
Taylor R Campbell
253a001ebc Fix use of accept() in test socks4a proxy.
The read() in readall() to read the SOCKS4a request was sometimes
failing with EAGAIN, which it wasn't prepared for, causing the
request to be rejected and the test to fail.

I wrote this code specifically under the assumption the fd would be
in blocking mode, and in the original draft I wrote with stdin/stdout
under socat that was true.  But when I adapted this to do its own
bind/listen/accept logic, I broke it, because POSIX leaves it
unspecified whether accept() inherits the O_NONBLOCK setting or not:

https://pubs.opengroup.org/onlinepubs/9799919799/functions/accept4.html

And the traditional BSD semantics is to inherit O_NONBLOCK.

So, just explicitly clear O_NONBLOCK on the fd returned by accept().
2026-01-21 10:35:22 -06:00
Nicolas Williams
112a82dd25 kdc: Fix memset_s() calls (fix #1296) 2026-01-20 16:05:36 -06:00
Nicolas Williams
d2047065bd kdc: Fix kinit of principal aliases 2026-01-20 13:48:25 -06:00
Nicolas Williams
b02d4d4569 krb5: Add SOCKS4a test 2026-01-20 12:57:01 -06:00
Nicolas Williams
31651f8e61 krb5: Add socksdrawer for testing SOCKS4 2026-01-20 12:57:01 -06:00
Taylor R Campbell
c768567929 krb5_set_password: Use target principal for SOCKS4a userid.
This enables Tor stream isolation.
2026-01-20 12:57:01 -06:00
Taylor R Campbell
5c5cb66c05 krb5: Set principal as proxy userid when getting creds.
This enables Tor stream isolation.
2026-01-20 12:57:01 -06:00
Taylor R Campbell
7321fd71c6 krb5: Default TCP transport to KDC when SOCKS4a proxy is configured.
Default of UDP transport doesn't work over SOCKS4a anyway, so this
makes configuration with socks4a_proxy easier.
2026-01-20 12:27:05 -06:00
Taylor R Campbell
3b0d00c743 New option [libdefaults] socks4a_proxy.
All network traffic to KDC goes through the SOCKS4a proxy if it is
configured.

This is deliberately kept simple -- and is not generalized to SOCKS4
or SOCKS5 or other types of proxies -- so it is easy to audit for
network and DNS leaks.  (SOCKS4 works in IP addresses, and so invites
DNS leaks.  SOCKS5 can be OK, if used judiciously, but takes more
work to implement.)

This only affects krb5_sendto -- the other initiator of network
traffic in libkrb5, krb5_change_password, will be fixed to respect
socks4a_proxy in a subsequent commit.

XXX Need to figure out where the socks4a.c code should go.

fix https://github.com/heimdal/heimdal/issues/1151
2026-01-20 12:27:05 -06:00
Nicolas Williams
3d2c2e0f16 GHA: Fix Windows build (fix Appveyor removal) 2026-01-20 12:26:55 -06:00
Nicolas Williams
4bca716446 GHA: Add Coveralls build 2026-01-19 12:46:19 -06:00
Nicolas Williams
2b2c71a7c1 README.md: Drop Coveralls badge (not updating)
For now.  We'll see if we can build a GHA workflow that replaces it or works
with it.
2026-01-19 12:33:43 -06:00
Nicolas Williams
54b71041b6 CI: Drop references to Appveyor and Travis 2026-01-19 12:33:43 -06:00
Michael Richardson
a0dcf9bffd if a CSR has multiple extRequests, keep only last
The code already keeps the last entry, but it leaks the previous copies.  @nicowilliams noticed this.
2026-01-19 00:18:47 -06:00
Nicolas Williams
76db37d833 sanon: Do not acquire creds for GSS_C_NO_NAME 2026-01-18 23:47:40 -06:00
fossdd
d233bf84d7 Use <poll.h> insted of <sys/poll.h>
Acording to POSIX <poll.h> should be used instead of <sys/poll.h>.

Libcs like musl libc added a redict due maintain compat with older
glibcs and added the following warning:

	/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
	    1 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
	      |  ^~~~~~~

Ref: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html
2026-01-18 23:27:57 -06:00
Nicolas Williams
bbfc116686 gsskrb5: display_name(NO_NAME) should not crash (fix #1288) 2026-01-18 20:48:42 -06:00
Alexander Boström
5580b3fe91 Add SPDX-License-Identifier for Secure Endpoints Inc 2026-01-18 20:06:06 -06:00
Alexander Boström
0fcc1d4225 Add SPDX-License-Identifier for Apple, Inc 2026-01-18 20:06:06 -06:00
Alexander Boström
0e9e2a13e0 Add SPDX-License-Identifier for The NetBSD Foundation, Inc. 2026-01-18 20:06:06 -06:00
Alexander Boström
9536b1d116 Add SPDX-License-Identifier for PADL Software Pty Ltd 2026-01-18 20:06:06 -06:00
Alexander Boström
eab82e40ad Add SPDX-License-Identifier for Doug Rabson 2026-01-18 20:06:06 -06:00
Alexander Boström
8a03cda949 Add SPDX-License-Identifier for The Regents of the University of California. 2026-01-18 20:06:06 -06:00
Alexander Boström
37d5df6078 Add SPDX-License-Identifier for The Regents of the University of California 2026-01-18 20:06:06 -06:00
Alexander Boström
1151d88402 Add SPDX-License-Identifier for Massachusetts Institute of Technology 2026-01-18 20:06:06 -06:00
Alexander Boström
d3e6c52baf Add SPDX-License-Identifier for Kungliga Tekniska Högskolan 2026-01-18 20:06:06 -06:00
Nicolas Williams
3be4426f9d Update NEWS release notes for upcoming 8.0 release 2026-01-18 19:06:17 -06:00
Nicolas Williams
fa43b2d3c4 asn1: Fix UB in two tests 2026-01-18 19:06:17 -06:00
Nicolas Williams
a1dfcc8453 krb5: Constify krb5_kuserok() 2026-01-18 19:06:17 -06:00
Nicolas Williams
10732be94c gss: Constify gss_str_to_oid() 2026-01-18 19:06:17 -06:00
Nicolas Williams
d67e0b6d39 cf: clang -Wimplicit-fallthrough for flex code 2026-01-18 19:06:17 -06:00
Nicolas Williams
75affc8f55 cf: clang pretends to be GCC 4 2026-01-18 19:06:17 -06:00