xref: /freebsd/crypto/krb5/doc/html/_sources/plugindev/kadm5_hook.rst.txt (revision b670c9bafc0e31c7609969bf374b2e80bdc00211)
1.. _kadm5_hook_plugin:
2
3KADM5 hook interface (kadm5_hook)
4=================================
5
6The kadm5_hook interface allows modules to perform actions when
7changes are made to the Kerberos database through :ref:`kadmin(1)`.
8For a detailed description of the kadm5_hook interface, see the header
9file ``<krb5/kadm5_hook_plugin.h>``.
10
11The kadm5_hook interface has five primary methods: **chpass**,
12**create**, **modify**, **remove**, and **rename**.  (The **rename**
13method was introduced in release 1.14.)  Each of these methods is
14called twice when the corresponding administrative action takes place,
15once before the action is committed and once afterwards.  A module can
16prevent the action from taking place by returning an error code during
17the pre-commit stage.
18
19A module can create and destroy per-process state objects by
20implementing the **init** and **fini** methods.  State objects have
21the type kadm5_hook_modinfo, which is an abstract pointer type.  A
22module should typically cast this to an internal type for the state
23object.
24
25Because the kadm5_hook interface is tied closely to the kadmin
26interface (which is explicitly unstable), it may not remain as stable
27across versions as other public pluggable interfaces.
28