Commit Graph

16 Commits

Author SHA1 Message Date
Joseph Sutton
d5ad04a7f3 kdc: Add function to add encrypted padata
Since plugins no longer have a way of accessing the 'ek' member of the
request structure, this function provides a way for a plugin to add
encrypted padata to the response.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-03-08 18:58:17 +11:00
Stefan Metzmacher
11d8a053f5 kdc-plugin: also pass astgs_request_t to the pac related functions
This is more consistent and allows the pac hooks to be more flexible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2022-03-03 09:58:48 +11:00
Luke Howard
69973757ce gss: remove gss_get_instance() 2022-01-30 14:20:05 -05:00
Luke Howard
87e96b97bd kdc: fix warning in kdc_array_iterate()
Do not call return in a function returning void.
2022-01-29 10:26:54 +11:00
Luke Howard
144caf67fa kdc: add wrappers for heimbase object accessors
Add libkdc wrappers for heimbase object accessors so plugins can use audit and
request attribute APIs without consuming libheimbase. Exposed API surface is
minimal and is limited to reading array collections, and reading/creating base
and custom types.
2022-01-28 17:24:57 -06:00
Luke Howard
366878c230 kdc: kdc_request_add_pac_buffer() make pactype unsigned
The pactype argument to kdc_request_add_pac_buffer() should be unsigned,
matching krb5_pac_add_buffer(). Reindent.
2022-01-22 11:43:38 +11:00
Luke Howard
fce4d19953 kdc: declare calling/linkage conventions for accessors
Decorate generated accessors with KDC_LIB_FUNCTION/KDC_LIB_CALL for correct
linkage on Windows.
2022-01-21 08:22:07 +11:00
Nicolas Williams
588e49a1bc kdc: Fix copy_Principal_ptr() bug (plugin acc.) 2022-01-20 13:32:31 -06:00
Luke Howard
e32f7a4387 kdc: add _nocopy setter for use by mssfu
Add an internal-use setter accessor for use by mssfu.c when principal names are
replaced. This also fixes a leak where r->client_princ was not freed before
being replaced with the impersonated client name.
2022-01-20 17:23:24 +11:00
Luke Howard
ec24edf700 kdc: add accessor functions for KDC request structure
Add accessor functions for use by Samba and other plugin developers.
Documentation is in kdc/kdc-accessors.h.
2022-01-20 17:23:24 +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
40e4a4df09 kdc: use astgs_request_t for client/server name (TGS)
Store the client and server principal name from the TGT and request
(respectively) in the astgs_request_t rather than using local variables.
2022-01-10 15:29:49 +11:00
Luke Howard
7cc4b7a9e6 kdc: KDC plugin API contract notes
Add some notes about the KDC plugin API contract, and require plugins to
explicitly indicate which version of the API they support (remove the macro
alias for the current version).
2022-01-05 13:08:11 +11:00
Luke Howard
ce58eb9081 kdc: annotate libkdc Windows function annotations
Annotate libkdc APIs with KDC_LIB_{CALL,FUNCTION} to ensure correct calling
convention and optimized DLL importing on Windows.

Ensure Windows and libtool export tables are consistent.
2022-01-04 12:27:43 +11:00
Luke Howard
097a3de44e kdc: don't cast away const in krb5plugin_kdc_ftable 2022-01-03 16:17:01 +11:00
Luke Howard
fcff5933ad kdc: rename windc to kdc plugin
Rename the "windc" plugin API to the more general "kdc" plugin API, for two
reasons: the Heimdal KDC uses the Windows PAC even when not emulating a domain
controller, and the plugin API has accreted methods that are not specific to
emulating a domain controller (such as referral_policy and finalize_reply).
2022-01-03 16:17:01 +11:00