Commit Graph

30053 Commits

Author SHA1 Message Date
Jeffrey Altman
1685c34b0d remove (krb5_enctype) cast for ETYPE_xxx
Now that ETYPE_xxx names are macros to the KRB5_ENCTYPE_xxx
symbols there is no longer a need to cast to (krb5_enctype).

Change-Id: Ib561f6e45346abac7a53eb1db0bfef60ee3bcb74
2022-01-15 22:05:50 -05:00
Jeffrey Altman
90e51a3d18 krb5.h: do not use anonymous enum for alternate E[NC]TYPE names
Use of an anonymous enum for ETYPE_xxx and ENCTYPE_xxx alternative
names results in loss of the original KRB5_ENCTYPE_xxx type.
Use CPP macros instead.

Change-Id: I84620aabd672db1d2cd0ff7a65f3ae8b34c0c684
2022-01-15 22:05:50 -05:00
Jeffrey Altman
7145a8e908 gssapi/mech: mech_locl.h roken.h must be included earlier
If included roken.h should be immediately following config.h.
Doing so ensures that all platform specific headers are
included in the proper order and avoids unnecessary includes
of headers managed by roken.h.

Change-Id: I27f11b42300b6ebcfbcc8d2c53915e96b6eec1d9
2022-01-15 21:24:10 -05:00
Nicolas Williams
c74d1992e1 GitHub: Output artifacts (fix yaml moar) 2022-01-15 19:31:05 -06:00
Nicolas Williams
27deb05e72 GitHub: Output artifacts (fix yaml) 2022-01-15 19:27:16 -06:00
Nicolas Williams
1e205ca77e GitHub: Output artifacts 2022-01-15 19:20:23 -06:00
Nicolas Williams
6ea0520388 GitHub: Special builds for more branches
Instead of triggering scan-build builds on pushes to the `scan-build` branch,
or valgrind builds on pushes to the `valgrind` branch, let's have pushes to
branches matching `scan-build*` and `valgrind*` branch name globs trigger the
corresponding builds.

Do not forget to delete those branches when you're done!
2022-01-15 16:29:11 -06:00
Nicolas Williams
1ba296dc6a GitHub: Add more build types
- s/build.yml/${build}.yml/ for the existing builds

 - add filter on branches on push

 - add scan-build build triggered by pushes to the scan-build branch or by PRs
   that touch the scan-build.yml

 - add valgrind build triggered by pushes to the valgrind branch or by PRs that
   touch the valgrind.yml
2022-01-15 16:18:03 -06:00
Luke Howard
867457871a krb5: make krb5_pac a heim_object_t
Make krb5_pac a heim_object_t and use heim_retain() (i.e. reference count +1)
as the copy constructor for the type decoration.

Note: this assumes that PACs included in naming attributes are immutable.
2022-01-15 18:54:57 +11:00
Luke Howard
5a952ee7b5 krb5: decorate PrincipalNameAttrs with krb5_pac
Add krb5_pac to PrincipalNameAttrs to avoid needing to re-parse it each time
gss_get_name_attribute() is called.
2022-01-15 18:54:57 +11:00
Luke Howard
0e8c4ccc6e hdb: eliminate hdb_entry_ex
Remove hdb_entry_ex and revert to the original design of hdb_entry (except with
an additional context member in hdb_entry which is managed by the free_entry
method in HDB).
2022-01-15 18:54:57 +11:00
Luke Howard
c5551775e2 hdb: decorate HDB_entry with context member
Decorate HDB_entry with context and move free_entry callback into HDB structure
itself. Requires updating hdb_free_entry() signature to include HDB parameter.
A follow-up commit will consolidate hdb_entry_ex (which has a single hdb_entry
member) into hdb_entry.
2022-01-15 18:54:57 +11:00
Jeffrey Altman
923067e099 lib/kadm5: kadm_connect do not close 's' more than once
If 's' is closed before exiting, it must be set to rk_INVALID_SOCKET.

Change-Id: I63caf992aa3a6b2c86c918a660025fc054d396d6
2022-01-14 23:21:16 -05:00
Nicolas Williams
a4e6c33780 asn1: Fix double-free in asn1parse.y 2022-01-14 22:16:50 -06:00
Jeffrey Altman
9f3004bfd5 gssapi/krb5: _gsskrb5_export_sec_context copy/paste error
80f3194a76
("gssapi/krb5/{export,import}_sec_context: make smaller tokens.")
stored the source principal when it should have stored the target
principal.

Change-Id: Ife6b137f9fe8f63cdb78b4212f74d502080ec2a2
2022-01-14 23:01:30 -05:00
Luke Howard
4891d713fb bn_s_mp_rand_platform.c: s_read_urandom: correctly handle split read
s_read_urandom has a while loop to handle read() that returns less
than the full buffer (either due to EINTR or because more than the
atomic guarantee from urandom was requested). However, the target
of the read was always the base pointer p instead of the updated
pointer q, so in the end less than the requested randomness is returned.

Use q instead of p in the read() call.

Upstream pull request:
https://github.com/libtom/libtommath/pull/512

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2022-01-15 13:38:18 +11:00
Luke Howard
046675ce0e Revert "tommath: Fix warning in s_read_getrandom()"
This reverts commit 489da75e65.

Will be replaced with upstream commit.
2022-01-15 13:37:33 +11:00
Nicolas Williams
f076ed57cc Fix make dist 2022-01-14 20:10:19 -06:00
Nicolas Williams
754a49bd6b test_set_kvno0: Fix leak 2022-01-14 17:59:49 -06:00
Nicolas Williams
d0f3d826dd otp: Fix warnings 2022-01-14 17:59:49 -06:00
Nicolas Williams
cfa7865518 kimpersonate: Fix leaks 2022-01-14 17:59:49 -06:00
Nicolas Williams
fc964cd545 klist: Fix warnings 2022-01-14 17:59:49 -06:00
Nicolas Williams
060b831c4d ktutil: Fix a warning 2022-01-14 17:59:49 -06:00
Nicolas Williams
c7feeab7eb kswitch: Fix warning 2022-01-14 17:59:49 -06:00
Nicolas Williams
ef9bb8850e kgetcred: Fix warning 2022-01-14 17:59:49 -06:00
Nicolas Williams
cf2bab411d kdc: Fix warnings 2022-01-14 17:59:49 -06:00
Nicolas Williams
5a3706db5b httpkadmind: Fix warnings 2022-01-14 17:59:49 -06:00
Nicolas Williams
5dcad4635b bx509d: Fix warnings 2022-01-14 17:59:49 -06:00
Nicolas Williams
23190a3f5e hpropd: Fix warning 2022-01-14 17:54:55 -06:00
Nicolas Williams
3c1c48c68f kstash: Fix warning 2022-01-14 17:54:55 -06:00
Nicolas Williams
c4e962ea04 kafs: Fix a warning 2022-01-14 17:54:55 -06:00
Nicolas Williams
55fa5bf7d2 gsskrb5: Fix warnings 2022-01-14 17:39:05 -06:00
Nicolas Williams
96b7ea671d gss: Fix warnings 2022-01-14 17:39:05 -06:00
Nicolas Williams
65caff79a3 gss-token: Fix leak 2022-01-14 17:39:05 -06:00
Nicolas Williams
4f8399a433 hdb: Fix warnings and leaks 2022-01-14 17:10:16 -06:00
Nicolas Williams
fb553dde1d krb5: Fix warnings 2022-01-14 17:10:16 -06:00
Nicolas Williams
82a8744787 krb5: Fix SQLite3 ccache bugs/warnings 2022-01-14 17:10:16 -06:00
Nicolas Williams
cb751670dd kpasswdd: Fix warning 2022-01-14 17:10:16 -06:00
Nicolas Williams
aea18c3006 Use fallthrough statement attribute (moar)
GCC is very finicky.
2022-01-14 16:58:59 -06:00
Nicolas Williams
c607135a03 Use fallthrough statement attribute (moar) 2022-01-14 16:53:34 -06:00
Nicolas Williams
ddc6113610 Use fallthrough statement attribute 2022-01-14 16:32:58 -06:00
Nicolas Williams
367f9ddd7d kadm5: Revert part of 69eee19541 2022-01-14 15:41:32 -06:00
Nicolas Williams
489da75e65 tommath: Fix warning in s_read_getrandom()
See https://github.com/libtom/libtommath/pull/512

(Note: this has not shipped.  Only OS X would be affected, specifically
RSA key gen would be affected on OS X.)
2022-01-14 15:26:59 -06:00
Nicolas Williams
318b73f002 krb5: Drop duplicated krb5.conf.5 content 2022-01-14 14:59:02 -06:00
Nicolas Williams
b7bf5ca6e8 kadmin: Fix warnings 2022-01-14 14:59:02 -06:00
Nicolas Williams
69eee19541 kadm5: Fix warnings 2022-01-14 14:58:59 -06:00
Nicolas Williams
6be334bfee kcm: Fix warnings 2022-01-14 14:47:13 -06:00
Nicolas Williams
6f467b8097 wind: Fix some warnings 2022-01-14 14:47:13 -06:00
Nicolas Williams
005a43da96 gsspa: Quiet GCC fallthrough warning
Somehow GCC was honoring lower-case "fallthrough" comments elsewhere but
not here.  Anyways, there was no need to fall through, so now we don't.
2022-01-14 14:47:13 -06:00
Jeffrey Altman
6426e7550f roken: do not globally define 'timezone' and 'tzname'
ec866e635e
("Windows 10 SDK build fixes") introduced CPP macros

  timezone -> _timezone
  tzname   -> _tzname

but these names are common and the macros rewrite too much.

The name mapping is only required when building strftime.c
with Visual Studio 2017 and later.  Move the definitions
into strftime.c.

Change-Id: Ic813bff842124595fd3d86761cee6dcea4ae44e4
2022-01-14 14:56:39 -05:00