static void
log_call(krb5_context context,
- const char * function,
+ const char *function,
int stage,
krb5_principal princ)
{
assert(ret == 0);
printf("%s: stage %s principal %s\n",
function,
- (stage == KADM5_HOOK_STAGE_PRECOMMIT)? "precommit"
- :"postcommit",
+ (stage == KADM5_HOOK_STAGE_PRECOMMIT) ? "precommit" : "postcommit",
unparsed);
if (unparsed)
krb5_free_unparsed_name(context, unparsed);
}
-static kadm5_ret_t
+static kadm5_ret_t
chpass(krb5_context context,
kadm5_hook_modinfo *modinfo,
int stage,
}
-static kadm5_ret_t
+static kadm5_ret_t
create(krb5_context context,
kadm5_hook_modinfo *modinfo,
int stage,
$(RUNPYTEST) $(srcdir)/t_general.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_anonpkinit.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_lockout.py $(PYTESTFLAGS)
- $(RUNPYTEST) $(srcdir)/t_kadm5_hook.py $(PYTESTFLAGS)
-
+ $(RUNPYTEST) $(srcdir)/t_kadm5_hook.py $(PYTESTFLAGS)
clean::
$(RM) kdc.conf
#!/usr/bin/python
from k5test import *
-plugin = os.path.join(buildtop, "plugins", "kadm5_hook", "test", "kadm5_hook_test.so")
+
+plugin = os.path.join(buildtop, "plugins", "kadm5_hook", "test",
+ "kadm5_hook_test.so")
hook_krb5_conf = {
'all' : {
"plugins" : {
- "kadm5_hook": {
- "module": "test:"+plugin
- }
+ "kadm5_hook" : {
+ "module" : "test:" + plugin
}
}
}
+}
-realm = K5Realm(krb5_conf=hook_krb5_conf, create_user=False,
- create_host=False)
+realm = K5Realm(krb5_conf=hook_krb5_conf, create_user=False, create_host=False)
output = realm.run_kadminl ('addprinc -randkey test')
if "create: stage precommit" not in output:
fail('kadm5_hook test output not found')
-
-
success('kadm5_hook')