Commit Graph

18 Commits

Author SHA1 Message Date
Joseph Sutton
b19633f9b9 Use constant-time memcmp when comparing sensitive buffers
This helps to avoid timing attacks.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-04-30 13:35:52 -04: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
Andrew Bartlett
7686028718 Use UTF-8 in KTH copyright notice
Samba is starting to protect against bi-di attacks and the starting point
is to require that input files be fully UTF-8.  In 2021 this is a reasonable
starting point anyway.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2021-11-29 12:50:26 +11:00
Luke Howard
49f3f5bd99 kdc: support for GSS-API pre-authentication
Add support for GSS-API pre-authentication to the KDC, using a simplified
variation of draft-perez-krb-wg-gss-preauth-02 that encodes GSS-API context
tokens directly in PADATA, and uses FX-COOKIE for state management.

More information on the protocol and implementation may be found in
lib/gssapi/preauth/README.md.
2021-08-12 17:37:01 +10:00
Roland C. Dowdeswell
7d353d0557 Generate a single summary audit line for AS/TGS.
We refactor the code a bit to extend kdc_request_t which until now
was only used for the AS.  We make the structure extensible and
start using it for the TGS as well.  We leave digest and kx509
alone for the time being.

We also define the concept of kv-pairs in our audit trail which
allows us to define a rigorous but extensible format:

type error from-addr client server key1=val1 key2=val2 ...
2019-12-05 00:05:56 -05:00
Roland C. Dowdeswell
c7d4682aed Define log levels in docs and change default to 0-3.
We define the meaning of the various log levels in the man page
for krb5_openlog(3).  If logging configured and levels are not
specified, we change the default levels to 0-3 which should exclude
debugging messages which are generally only desired in exceptional
circumstances.

We also go through the KDC and adjust the levels to be appropriate.
2019-10-21 13:43:01 +01:00
Nicolas Williams
9c51900238 Declare kdc log functions to be printf-like
And add a kdc_vlog() function.
2019-07-09 13:17:06 -05:00
Luke Howard
73fde33757 KCM: restore support for Solaris doors IPC mechanism (#379)
This patch restores support for the Solaris doors IPC mechanism, removed
from KCM when lib/ipc was added.
2018-05-13 15:31:13 +10:00
Nicolas Williams
c9609cdb37 Initial patch for dealing with AD x-realm key rollover
AD issues x-realm TGTs with kvno 0.  On key x-realm trust key change
    we need to be able to try current and previous keys for trust, else
    we will have some failures.
2011-11-15 21:53:33 -06:00
Love Hornquist Astrand
13eeb30a1d Create a request structure 2011-07-24 20:24:37 -07: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
c178563bef use ntlm_service 2011-04-14 12:54:15 -07:00
Love Hornquist Astrand
d9b3c87fc3 use unix sockets too 2011-04-14 12:54:15 -07:00
Andrew Bartlett
f469fc6d49 heimdal Add support for extracting a particular KVNO from the database
This should allow master key rollover.

(but the real reason is to allow multiple krbtgt accounts, as used by
Active Directory to implement RODC support)

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2010-11-28 09:52:54 -08:00
Love Hornquist Astrand
59d1bf12af use "headers.h", add usage 2009-11-22 06:54:11 -08:00
Love Hornquist Astrand
dbb5002e68 generic digest service 2009-11-22 00:26:32 -08:00