aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2006-08-23 02:17:12 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2006-08-23 02:17:12 +0000
commit78ed38bd8bc1e74aedea35deff3cc598ae1c79e4 (patch)
tree70d981232a97f51367e4f3704b77461435d14867
parentde24600e95079ab3ca07ab11a0408726e2c4f7fa (diff)
downloadkrb5-78ed38bd8bc1e74aedea35deff3cc598ae1c79e4.zip
krb5-78ed38bd8bc1e74aedea35deff3cc598ae1c79e4.tar.gz
krb5-78ed38bd8bc1e74aedea35deff3cc598ae1c79e4.tar.bz2
* Fix auto-registration of plug-in modules
if there is no plug-in list specified ticket: 4172 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18496 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/windows/identity/kmm/kmm_reg.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/windows/identity/kmm/kmm_reg.c b/src/windows/identity/kmm/kmm_reg.c
index dcc75d1..60159df 100644
--- a/src/windows/identity/kmm/kmm_reg.c
+++ b/src/windows/identity/kmm/kmm_reg.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2005 Massachusetts Institute of Technology
+ * Copyright (c) 2006 Secure Endpoints Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -198,8 +199,20 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
size_t scb = 0;
rv = khc_read_multi_string(csp_module, L"PluginList", NULL, &cb);
- if(rv != KHM_ERROR_TOO_LONG)
- goto _exit;
+ if(rv != KHM_ERROR_TOO_LONG) {
+ if (rv == KHM_ERROR_NOT_FOUND) {
+
+ scb = cb = cch * sizeof(wchar_t);
+ pl = PMALLOC(cb);
+ multi_string_init(pl, cb);
+ rv = KHM_ERROR_SUCCESS;
+
+ goto add_plugin_to_list;
+
+ } else {
+ goto _exit;
+ }
+ }
cb += cch * sizeof(wchar_t);
scb = cb;
@@ -213,6 +226,8 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
goto _exit;
}
+ add_plugin_to_list:
+
if(!multi_string_find(pl, plugin->name, 0)) {
multi_string_append(pl, &scb, plugin->name);
rv = khc_write_multi_string(csp_module, L"PluginList", pl);