diff options
author | Tom Yu <tlyu@mit.edu> | 2006-08-23 18:38:30 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2006-08-23 18:38:30 +0000 |
commit | faf5b88f4b1822ae436a84317ccf3a8f8268d67c (patch) | |
tree | b853028e6a4453d5ab5dcc3efd0b897d1ccd08d1 | |
parent | 58f6d0e72f783f338f8d10f0d7e5331685ebedf3 (diff) | |
download | krb5-faf5b88f4b1822ae436a84317ccf3a8f8268d67c.zip krb5-faf5b88f4b1822ae436a84317ccf3a8f8268d67c.tar.gz krb5-faf5b88f4b1822ae436a84317ccf3a8f8268d67c.tar.bz2 |
pull up r18496 from trunk
r18496@cathode-dark-space: jaltman | 2006-08-22 22:17:12 -0400
ticket: 4172
* 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/branches/krb5-1-5@18508 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/windows/identity/kmm/kmm_reg.c | 19 |
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);
|