Windows NetIDMgr post-1.5 branch commits
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Jul 2006 22:36:00 +0000 (22:36 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 19 Jul 2006 22:36:00 +0000 (22:36 +0000)
The following patch updates the NetIDMgr:

 * allow plug-ins to be marked "do not unload" in order
   to support DLLs that create threads that are not
   properly cleaned up as part of library unload.

 * allow plug-ins to be marked "disabled"

 * Additional changes to deal with Microsoft's efforts
   to deprecate all of the str C runtime functions.

 * Improvements to Manifest processing in the build
   system

 * Addition of Tooltip support to the Toolbar.  Dragging
   the mouse over toolbar buttons displays textual
   descriptions.

 * Correct the behavior of the New Credentials Dialog
   to disable the "Ok" button after it has been pressed.

 * Add support to allow plugin configuration data to
   be distributed as part of transforms to the MSI
   installer.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18344 dc483132-0cff-0310-8789-dd5450dbe970

39 files changed:
src/windows/identity/apiversion.txt
src/windows/identity/config/Makefile.w32
src/windows/identity/kconfig/api.c
src/windows/identity/kconfig/kconfig.h
src/windows/identity/kconfig/kconfiginternal.h
src/windows/identity/kmm/kmm.h
src/windows/identity/kmm/kmm_plugin.c
src/windows/identity/kmm/kmm_reg.c
src/windows/identity/kmm/kmm_registrar.c
src/windows/identity/kmm/kmmconfig.csv
src/windows/identity/kmm/kmminternal.h
src/windows/identity/nidmgrdll/Makefile
src/windows/identity/plugins/krb4/Makefile
src/windows/identity/plugins/krb4/krb4configdlg.c
src/windows/identity/plugins/krb4/krb4funcs.c
src/windows/identity/plugins/krb4/krb4newcreds.c
src/windows/identity/plugins/krb4/krb4plugin.c
src/windows/identity/plugins/krb4/krbconfig.csv
src/windows/identity/plugins/krb5/Makefile
src/windows/identity/plugins/krb5/krb5configcc.c
src/windows/identity/plugins/krb5/krb5configdlg.c
src/windows/identity/plugins/krb5/krb5configid.c
src/windows/identity/plugins/krb5/krb5configids.c
src/windows/identity/plugins/krb5/krb5funcs.c
src/windows/identity/plugins/krb5/krb5newcreds.c
src/windows/identity/plugins/krb5/krbconfig.csv
src/windows/identity/plugins/krb5/krbcred.h
src/windows/identity/ui/Makefile
src/windows/identity/ui/aboutwnd.c
src/windows/identity/ui/configwnd.c
src/windows/identity/ui/lang/en_us/khapp.rc
src/windows/identity/ui/main.c
src/windows/identity/ui/newcredwnd.c
src/windows/identity/ui/resource.h
src/windows/identity/ui/toolbar.c
src/windows/identity/uilib/actions.csv
src/windows/identity/uilib/khnewcred.h
src/windows/identity/uilib/khuidefs.h
src/windows/identity/util/perfstat.c

index 72456acd3ab5464729d987891de355464be9e8bf..813dcd69923b81b0bad5caab87e2ddf2834d0ece 100644 (file)
@@ -158,3 +158,25 @@ Date=(TBD)
 !_report_ts0, _report_ts1, _report_ts2, _report_ts3\r
 # modified to use _vnull() instead of 0 for NULL parameters\r
 \r
++KCONF_FLAG_WRITEIFMOD\r
+# new flag for khc_open_space() indicating that the specified handle should only write to a configuration space if the value read from the handle is different from the value being written\r
+\r
++KCONF_FLAG_IFMODCI\r
+# indicates that the string comparison function used for KCONF_FLAG_WRITEIFMOD should be case insensitive.\r
+\r
+!khc_write_int32(), khc_write_int64(), khc_write_string(), khc_write_multi_string()\r
+# Change of behavior.  If the configuration handle has KCONF_FLAG_WRITEIFMOD flag set, only writes if the value being written to is different from the value being read.\r
+\r
+!khc_read_string(), khc_read_multi_string(), khc_read_int32(), khc_read_int64(), khc_read_binary(), khc_write_string(), khc_write_int32(), khc_write_int64(), khc_write_binary(), khc_get_type(), khc_value_exists(), khc_remove_value()\r
+# The value name parameter is now a constant pointer\r
+\r
+!khc_load_schema(), khc_unload_schema()\r
+# The schema pointer is now a constant pointer\r
+\r
+-Schema:NetIDMgr\PluginManager\Modules\<module name>\Flags\r
+-Schema:NetIDMgr\PluginManager\Plugins\<plugin name>\Flags\r
+# Deprecated.  Replaced by separate values for each of the bits in Flags.  This allows each setting to be deployed independently via GPO.\r
+\r
++Schema:NetIDMgr\PluginManager\Modules\<module name>\Disabled\r
++Schema:NetIDMgr\PluginManager\Plugins\<plugin name>\Disabled\r
+# If non-zero, the corresponding module or plug-in is disabled.\r
index 503e44dc1dbe680ca9e73fd97264b7a1b6fdaeb1..4ffba0c812c4f74df45bad1069904fc216319b3e 100644 (file)
@@ -325,6 +325,14 @@ if exist $@.manifest $(MT) -outputresource:$@;1 -manifest $@.manifest
 \r
 _VC_MANIFEST_EMBED_DLL=$(_VC_MANIFEST_EMBED_EXE)\r
 \r
+# Note that if you are merging manifests, then the VS generated\r
+# manifest should be cleaned up after calling _VC_MANIFEST_EMBED_???.\r
+# This ensures that even if the DLL or EXE is executed in-place, the\r
+# embedded manifest will be used.  Otherwise the $@.manifest file will\r
+# be used.\r
+_VC_MANIFEST_CLEAN= \\r
+if exist $@.manifest $(RM) $@.manifest\r
+\r
 # End of manifest handling\r
 \r
 !endif\r
index ef182fe32c6514dd40df79843ef22052ec1638a9..4ee210d6cdad980ea12c2566c756883da736487b 100644 (file)
@@ -24,6 +24,7 @@
 \r
 /* $Id$ */\r
 \r
+#include<shlwapi.h>\r
 #include<kconfiginternal.h>\r
 #include<assert.h>\r
 \r
@@ -314,6 +315,11 @@ khcint_RegOpenKeyEx(HKEY hkey, LPCWSTR sSubKey, DWORD ulOptions,
     return rv;\r
 }\r
 \r
+/*! \internal\r
+\r
+ \note This function is not a good replacement for RegDeleteKey since\r
+     it deletes all the subkeys in addition to the key being deleted.\r
+ */\r
 LONG\r
 khcint_RegDeleteKey(HKEY hKey,\r
                     LPCWSTR lpSubKey) {\r
@@ -345,7 +351,15 @@ khcint_RegDeleteKey(HKEY hKey,
             /* bingo! ?? */\r
             if ((sk_name[cch] == L'\0' ||\r
                  sk_name[cch] == L'~')) {\r
-                rv = RegDeleteKey(hKey, sk_name);\r
+\r
+                /* instead of calling RegDeleteKey we call SHDeleteKey\r
+                   because we want to blow off all the subkeys as\r
+                   well.  This is different from the behavior of\r
+                   RegDeleteKey making khcint_RegDeleteKey not a very\r
+                   good case sensitive replacement for\r
+                   RegDeleteKey. */\r
+\r
+                rv = SHDeleteKey(hKey, sk_name);\r
                 goto _cleanup;\r
             }\r
         }\r
@@ -891,7 +905,7 @@ khc_close_space(khm_handle csp) {
 \r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_string(khm_handle pconf, \r
-                wchar_t * pvalue, \r
+                const wchar_t * pvalue, \r
                 wchar_t * buf, \r
                 khm_size * bufsize) \r
 {\r
@@ -904,7 +918,7 @@ khc_read_string(khm_handle pconf,
     do {\r
         HKEY hku = NULL;\r
         HKEY hkm = NULL;\r
-        wchar_t * value = NULL;\r
+        const wchar_t * value = NULL;\r
         int free_space = 0;\r
         khm_handle conf = NULL;\r
         DWORD size;\r
@@ -928,7 +942,7 @@ khc_read_string(khm_handle pconf,
 \r
             free_space = 1;\r
 #if 0\r
-            wchar_t * back, * forward;\r
+            const wchar_t * back, * forward;\r
 \r
             back = wcsrchr(pvalue, L'\\');\r
             forward = wcsrchr(pvalue, L'/');\r
@@ -1053,7 +1067,7 @@ _exit:
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_read_int32(khm_handle pconf, wchar_t * pvalue, khm_int32 * buf) {\r
+khc_read_int32(khm_handle pconf, const wchar_t * pvalue, khm_int32 * buf) {\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
 \r
@@ -1070,7 +1084,7 @@ khc_read_int32(khm_handle pconf, wchar_t * pvalue, khm_int32 * buf) {
         HKEY hku = NULL;\r
         HKEY hkm = NULL;\r
 \r
-        wchar_t * value = NULL;\r
+        const wchar_t * value = NULL;\r
         int free_space = 0;\r
         khm_handle conf = NULL;\r
 \r
@@ -1089,7 +1103,7 @@ khc_read_int32(khm_handle pconf, wchar_t * pvalue, khm_int32 * buf) {
                 goto _shadow;\r
             free_space = 1;\r
 #if 0\r
-            wchar_t * back, * forward;\r
+            const wchar_t * back, * forward;\r
 \r
             back = wcsrchr(pvalue, L'\\');\r
             forward = wcsrchr(pvalue, L'/');\r
@@ -1175,7 +1189,7 @@ _exit:
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_read_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 * buf) {\r
+khc_read_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 * buf) {\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
 \r
@@ -1189,7 +1203,7 @@ khc_read_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 * buf) {
         HKEY hku = NULL;\r
         HKEY hkm = NULL;\r
 \r
-        wchar_t * value = NULL;\r
+        const wchar_t * value = NULL;\r
         int free_space = 0;\r
         khm_handle conf = NULL;\r
 \r
@@ -1208,7 +1222,7 @@ khc_read_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 * buf) {
                 goto _shadow;\r
             free_space = 1;\r
 #if 0\r
-            wchar_t * back, *forward;\r
+            const wchar_t * back, *forward;\r
 \r
             back = wcsrchr(pvalue, L'\\');\r
             forward = wcsrchr(pvalue, L'/');\r
@@ -1294,7 +1308,7 @@ _exit:
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_read_binary(khm_handle pconf, wchar_t * pvalue, \r
+khc_read_binary(khm_handle pconf, const wchar_t * pvalue, \r
                 void * buf, khm_size * bufsize) {\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
@@ -1309,7 +1323,7 @@ khc_read_binary(khm_handle pconf, wchar_t * pvalue,
         HKEY hku = NULL;\r
         HKEY hkm = NULL;\r
 \r
-        wchar_t * value = NULL;\r
+        const wchar_t * value = NULL;\r
         int free_space = 0;\r
         khm_handle conf = NULL;\r
 \r
@@ -1326,7 +1340,7 @@ khc_read_binary(khm_handle pconf, wchar_t * pvalue,
                 goto _shadow;\r
             free_space = 1;\r
 #if 0\r
-            wchar_t * back, *forward;\r
+            const wchar_t * back, *forward;\r
 \r
             back = wcsrchr(pvalue, L'\\');\r
             forward = wcsrchr(pvalue, L'/');\r
@@ -1419,7 +1433,7 @@ _exit:
 \r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_string(khm_handle pconf, \r
-                 wchar_t * pvalue, \r
+                 const wchar_t * pvalue, \r
                  wchar_t * buf) \r
 {\r
     HKEY pk = NULL;\r
@@ -1427,7 +1441,7 @@ khc_write_string(khm_handle pconf,
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
     LONG hr;\r
     size_t cbsize;\r
-    wchar_t * value = NULL;\r
+    const wchar_t * value = NULL;\r
     int free_space = 0;\r
     khm_handle conf = NULL;\r
 \r
@@ -1438,20 +1452,53 @@ khc_write_string(khm_handle pconf,
     if(pconf && !khc_is_machine_handle(pconf) && !khc_is_user_handle(pconf))\r
         return KHM_ERROR_INVALID_OPERATION;\r
 \r
+    if(FAILED(StringCbLength(buf, KCONF_MAXCB_STRING, &cbsize))) {\r
+        rv = KHM_ERROR_INVALID_PARAM;\r
+        goto _exit;\r
+    }\r
+\r
+    cbsize += sizeof(wchar_t);\r
+\r
+    if (khc_handle_flags(pconf) & KCONF_FLAG_WRITEIFMOD) {\r
+        wchar_t tmpbuf[512];\r
+        wchar_t * buffer;\r
+        size_t tmpsize = cbsize;\r
+        khm_boolean is_equal = FALSE;\r
+\r
+        if (cbsize <= sizeof(tmpbuf)) {\r
+            buffer = tmpbuf;\r
+        } else {\r
+            buffer = PMALLOC(cbsize);\r
+        }\r
+\r
+        if (KHM_SUCCEEDED(khc_read_string(pconf, pvalue, buffer, &tmpsize)) &&\r
+            tmpsize == cbsize) {\r
+            if (khc_handle_flags(pconf) & KCONF_FLAG_IFMODCI)\r
+                is_equal = !_wcsicmp(buffer, buf);\r
+            else\r
+                is_equal = !wcscmp(buffer, buf);\r
+        }\r
+\r
+        if (buffer != tmpbuf)\r
+            PFREE(buffer);\r
+\r
+        if (is_equal) {\r
+            return KHM_ERROR_SUCCESS;\r
+        }\r
+    }\r
+\r
     if(wcschr(pvalue, L'\\')\r
 #if 0\r
        || wcschr(pvalue, L'/')\r
 #endif\r
        ) {\r
-        if(KHM_FAILED(khc_open_space(\r
-            pconf, \r
-            pvalue, \r
-            KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0), \r
-            &conf)))\r
+        if(KHM_FAILED(khc_open_space(pconf, pvalue, \r
+                                     KCONF_FLAG_TRAILINGVALUE | (pconf?khc_handle_flags(pconf):0), \r
+                                     &conf)))\r
             return KHM_ERROR_INVALID_PARAM;\r
         free_space = 1;\r
 #if 0\r
-        wchar_t * back, *forward;\r
+        const wchar_t * back, *forward;\r
 \r
         back = wcsrchr(pvalue, L'\\');\r
         forward = wcsrchr(pvalue, L'/');\r
@@ -1472,13 +1519,6 @@ khc_write_string(khm_handle pconf,
 \r
     c = khc_space_from_handle(conf);\r
 \r
-    if(FAILED(StringCbLength(buf, KCONF_MAXCB_STRING, &cbsize))) {\r
-        rv = KHM_ERROR_INVALID_PARAM;\r
-        goto _exit;\r
-    }\r
-\r
-    cbsize += sizeof(wchar_t);\r
-\r
     if(khc_is_user_handle(conf)) {\r
         pk = khcint_space_open_key(c, KHM_PERM_WRITE | KHM_FLAG_CREATE);\r
     } else {\r
@@ -1498,14 +1538,14 @@ _exit:
 \r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_int32(khm_handle pconf, \r
-                wchar_t * pvalue, \r
+                const wchar_t * pvalue, \r
                 khm_int32 buf) \r
 {\r
     HKEY pk = NULL;\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
     LONG hr;\r
-    wchar_t * value = NULL;\r
+    const wchar_t * value = NULL;\r
     int free_space = 0;\r
     khm_handle conf = NULL;\r
 \r
@@ -1516,6 +1556,15 @@ khc_write_int32(khm_handle pconf,
     if(pconf && !khc_is_machine_handle(pconf) && !khc_is_user_handle(pconf))\r
         return KHM_ERROR_INVALID_OPERATION;\r
 \r
+    if (khc_handle_flags(pconf) & KCONF_FLAG_WRITEIFMOD) {\r
+        khm_int32 tmpvalue;\r
+\r
+        if (KHM_SUCCEEDED(khc_read_int32(pconf, pvalue, &tmpvalue)) &&\r
+            tmpvalue == buf) {\r
+            return KHM_ERROR_SUCCESS;\r
+        }\r
+    }\r
+\r
     if(wcschr(pvalue, L'\\')\r
 #if 0\r
        || wcschr(pvalue, L'/')\r
@@ -1529,7 +1578,7 @@ khc_write_int32(khm_handle pconf,
             return KHM_ERROR_INVALID_PARAM;\r
         free_space = 1;\r
 #if 0\r
-        wchar_t * back, *forward;\r
+        const wchar_t * back, *forward;\r
 \r
         back = wcsrchr(pvalue, L'\\');\r
         forward = wcsrchr(pvalue, L'/');\r
@@ -1566,12 +1615,12 @@ khc_write_int32(khm_handle pconf,
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_write_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 buf) {\r
+khc_write_int64(khm_handle pconf, const wchar_t * pvalue, khm_int64 buf) {\r
     HKEY pk = NULL;\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
     LONG hr;\r
-    wchar_t * value = NULL;\r
+    const wchar_t * value = NULL;\r
     int free_space = 0;\r
     khm_handle conf = NULL;\r
 \r
@@ -1582,6 +1631,15 @@ khc_write_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 buf) {
     if(pconf && !khc_is_machine_handle(pconf) && !khc_is_user_handle(pconf))\r
         return KHM_ERROR_INVALID_OPERATION;\r
 \r
+    if (khc_handle_flags(pconf) & KCONF_FLAG_WRITEIFMOD) {\r
+        khm_int64 tmpvalue;\r
+\r
+        if (KHM_SUCCEEDED(khc_read_int64(pconf, pvalue, &tmpvalue)) &&\r
+            tmpvalue == buf) {\r
+            return KHM_ERROR_SUCCESS;\r
+        }\r
+    }\r
+\r
     if(wcschr(pvalue, L'\\')\r
 #if 0\r
        || wcschr(pvalue, L'/')\r
@@ -1595,7 +1653,7 @@ khc_write_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 buf) {
             return KHM_ERROR_INVALID_PARAM;\r
         free_space = 1;\r
 #if 0\r
-        wchar_t * back, *forward;\r
+        const wchar_t * back, *forward;\r
 \r
         back = wcsrchr(pvalue, L'\\');\r
         forward = wcsrchr(pvalue, L'/');\r
@@ -1633,13 +1691,13 @@ khc_write_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 buf) {
 \r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_binary(khm_handle pconf, \r
-                 wchar_t * pvalue, \r
+                 const wchar_t * pvalue, \r
                  void * buf, khm_size bufsize) {\r
     HKEY pk = NULL;\r
     kconf_conf_space * c;\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
     LONG hr;\r
-    wchar_t * value = NULL;\r
+    const wchar_t * value = NULL;\r
     int free_space = 0;\r
     khm_handle conf = NULL;\r
 \r
@@ -1663,7 +1721,7 @@ khc_write_binary(khm_handle pconf,
             return KHM_ERROR_INVALID_PARAM;\r
         free_space = 1;\r
 #if 0\r
-        wchar_t * back, *forward;\r
+        const wchar_t * back, *forward;\r
 \r
         back = wcsrchr(pvalue, L'\\');\r
         forward = wcsrchr(pvalue, L'/');\r
@@ -1761,7 +1819,7 @@ khc_get_config_space_parent(khm_handle conf, khm_handle * parent) {
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_get_type(khm_handle conf, wchar_t * value) {\r
+khc_get_type(khm_handle conf, const wchar_t * value) {\r
     HKEY hkm = NULL;\r
     HKEY hku = NULL;\r
     kconf_conf_space * c;\r
@@ -1819,7 +1877,7 @@ khc_get_type(khm_handle conf, wchar_t * value) {
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_value_exists(khm_handle conf, wchar_t * value) {\r
+khc_value_exists(khm_handle conf, const wchar_t * value) {\r
     HKEY hku = NULL;\r
     HKEY hkm = NULL;\r
     kconf_conf_space * c;\r
@@ -1858,7 +1916,7 @@ khc_value_exists(khm_handle conf, wchar_t * value) {
 }\r
 \r
 KHMEXP khm_int32 KHMAPI\r
-khc_remove_value(khm_handle conf, wchar_t * value, khm_int32 flags) {\r
+khc_remove_value(khm_handle conf, const wchar_t * value, khm_int32 flags) {\r
     HKEY hku = NULL;\r
     HKEY hkm = NULL;\r
     kconf_conf_space * c;\r
@@ -2030,7 +2088,7 @@ khcint_is_valid_name(wchar_t * name)
 }\r
 \r
 khm_int32 \r
-khcint_validate_schema(kconf_schema * schema,\r
+khcint_validate_schema(const kconf_schema * schema,\r
                        int begin,\r
                        int *end)\r
 {\r
@@ -2092,7 +2150,7 @@ khcint_validate_schema(kconf_schema * schema,
 }\r
 \r
 khm_int32 \r
-khcint_load_schema_i(khm_handle parent, kconf_schema * schema, \r
+khcint_load_schema_i(khm_handle parent, const kconf_schema * schema, \r
                      int begin, int * end)\r
 {\r
     int i;\r
@@ -2153,7 +2211,7 @@ khcint_load_schema_i(khm_handle parent, kconf_schema * schema,
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_load_schema(khm_handle conf, kconf_schema * schema)\r
+khc_load_schema(khm_handle conf, const kconf_schema * schema)\r
 {\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
 \r
@@ -2174,7 +2232,7 @@ khc_load_schema(khm_handle conf, kconf_schema * schema)
 }\r
 \r
 khm_int32 \r
-khcint_unload_schema_i(khm_handle parent, kconf_schema * schema, \r
+khcint_unload_schema_i(khm_handle parent, const kconf_schema * schema, \r
                        int begin, int * end)\r
 {\r
     int i;\r
@@ -2235,7 +2293,7 @@ khcint_unload_schema_i(khm_handle parent, kconf_schema * schema,
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_unload_schema(khm_handle conf, kconf_schema * schema)\r
+khc_unload_schema(khm_handle conf, const kconf_schema * schema)\r
 {\r
     khm_int32 rv = KHM_ERROR_SUCCESS;\r
 \r
@@ -2363,7 +2421,7 @@ khc_enum_subspaces(khm_handle conf,
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_write_multi_string(khm_handle conf, wchar_t * value, wchar_t * buf)\r
+khc_write_multi_string(khm_handle conf, const wchar_t * value, wchar_t * buf)\r
 {\r
     size_t cb;\r
     wchar_t vbuf[KCONF_MAXCCH_STRING];\r
@@ -2394,7 +2452,7 @@ khc_write_multi_string(khm_handle conf, wchar_t * value, wchar_t * buf)
 }\r
 \r
 KHMEXP khm_int32 KHMAPI \r
-khc_read_multi_string(khm_handle conf, wchar_t * value, \r
+khc_read_multi_string(khm_handle conf, const wchar_t * value, \r
                       wchar_t * buf, khm_size * bufsize)\r
 {\r
     wchar_t vbuf[KCONF_MAXCCH_STRING];\r
index 5ec65f703c20c7703c7008893d957410d9d98597..518dc4f46a9bd4e9d4a5c662a1ca6491516c00e4 100644 (file)
@@ -143,6 +143,31 @@ typedef struct tag_kconf_schema {
 /*! \brief Indicates that the last component of the given configuration path is to be considered to be a configuration value */\r
 #define KCONF_FLAG_TRAILINGVALUE 0x00000020\r
 \r
+/*! \brief Only write values back there is a change\r
+\r
+    Any write operations using the handle with check if the value\r
+    being written is different from the value being read from the\r
+    handle.  It will only be written if the value is different.\r
+\r
+    \note Note that the value being read from a handle takes schema and\r
+    shadowed configuration handles into consideration while the value\r
+    being written is only written to the topmost layer of\r
+    configuration that can be written to.\r
+\r
+    \note Note also that this flag does not affect binary values.\r
+ */\r
+#define KCONF_FLAG_WRITEIFMOD    0x00000040\r
+\r
+/*! \brief Use case-insensitive comparison for KCONF_FLAG_WRITEIFMOD\r
+\r
+    When used in combination with \a KCONF_FLAG_WRITEIFMOD , the\r
+    string comparison used when determining whether the string read\r
+    from the configuration handle is the same as the string being\r
+    written will be case insensitive.  If this flag is not set, the\r
+    comparison will be case sensitive.\r
+ */\r
+#define KCONF_FLAG_IFMODCI     0x00000080\r
+\r
 /*! \brief Do not parse the configuration space name\r
 \r
     If set, disables the parsing of the configuration space for\r
@@ -262,7 +287,7 @@ khc_close_space(khm_handle conf);
 \r
 /*! \brief Read a string value from a configuration space\r
 \r
-    The \a value parameter specifies the value to read from the\r
+    The \a value_name parameter specifies the value to read from the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -290,6 +315,10 @@ khc_close_space(khm_handle conf);
     in the call to khc_open_space() is equivalent to specifying all\r
     three.\r
 \r
+    If the value is not found in the configuration space and any\r
+    shadowed configuration spaces, the function returns \a\r
+    KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.\r
+\r
     \param[in] buf Buffer to copy the string to.  Specify NULL to just\r
         retrieve the number of required bytes.\r
     \r
@@ -303,18 +332,19 @@ khc_close_space(khm_handle conf);
     \retval KHM_ERROR_TYPE_MISMATCH The specified value is not a string\r
     \retval KHM_ERROR_TOO_LONG \a buf was NULL or the size of the buffer was insufficient.  The required size is in bufsize.\r
     \retval KHM_ERROR_SUCCESS Success.  The number of bytes copied is in bufsize.\r
+    \retval KHM_ERROR_NOT_FOUND The value was not found.\r
 \r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_string(khm_handle conf, \r
-                wchar_t * value, \r
+                const wchar_t * value_name, \r
                 wchar_t * buf, \r
                 khm_size * bufsize);\r
 \r
 /*! \brief Read a multi-string value from a configuration space\r
 \r
-    The \a value parameter specifies the value to read from the\r
+    The \a value_name parameter specifies the value to read from the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -350,6 +380,10 @@ khc_read_string(khm_handle conf,
     in the call to khc_open_space() is equivalent to specifying all\r
     three.\r
 \r
+    If the value is not found in the configuration space and any\r
+    shadowed configuration spaces, the function returns \a\r
+    KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.\r
+\r
     \param[in] buf Buffer to copy the multi-string to.  Specify NULL\r
         to just retrieve the number of required bytes.\r
     \r
@@ -363,18 +397,19 @@ khc_read_string(khm_handle conf,
     \retval KHM_ERROR_TYPE_MISMATCH The specified value is not a string\r
     \retval KHM_ERROR_TOO_LONG \a buf was NULL or the size of the buffer was insufficient.  The required size is in bufsize.\r
     \retval KHM_ERROR_SUCCESS Success.  The number of bytes copied is in bufsize.\r
+    \retval KHM_ERROR_NOT_FOUND The value was not found.\r
 \r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_multi_string(khm_handle conf, \r
-                      wchar_t * value, \r
+                      const wchar_t * value_name, \r
                       wchar_t * buf, \r
                       khm_size * bufsize);\r
 \r
 /*! \brief Read a 32 bit integer value from a configuration space\r
 \r
-    The \a value parameter specifies the value to read from the\r
+    The \a value_name parameter specifies the value to read from the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -402,6 +437,10 @@ khc_read_multi_string(khm_handle conf,
     in the call to khc_open_space() is equivalent to specifying all\r
     three.\r
 \r
+    If the value is not found in the configuration space and any\r
+    shadowed configuration spaces, the function returns \a\r
+    KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.\r
+\r
     \param[in] conf Handle to a configuration space\r
     \param[in] value The value to query\r
     \param[out] buf The buffer to receive the value\r
@@ -415,12 +454,12 @@ khc_read_multi_string(khm_handle conf,
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_int32(khm_handle conf, \r
-               wchar_t * value, \r
+               const wchar_t * value_name, \r
                khm_int32 * buf);\r
 \r
 /*! \brief Read a 64 bit integer value from a configuration space\r
 \r
-    The \a value parameter specifies the value to read from the\r
+    The \a value_name parameter specifies the value to read from the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -448,8 +487,12 @@ khc_read_int32(khm_handle conf,
     in the call to khc_open_space() is equivalent to specifying all\r
     three.\r
 \r
+    If the value is not found in the configuration space and any\r
+    shadowed configuration spaces, the function returns \a\r
+    KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.\r
+\r
     \param[in] conf Handle to a configuration space\r
-    \param[in] value The value to query\r
+    \param[in] value_name The value to query\r
     \param[out] buf The buffer to receive the value\r
 \r
     \retval KHM_ERROR_NOT_READY The configuration provider has not started\r
@@ -462,12 +505,12 @@ khc_read_int32(khm_handle conf,
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_int64(khm_handle conf, \r
-               wchar_t * value, \r
+               const wchar_t * value_name, \r
                khm_int64 * buf);\r
 \r
 /*! \brief Read a binary value from a configuration space\r
 \r
-    The \a value parameter specifies the value to read from the\r
+    The \a value_name parameter specifies the value to read from the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -493,6 +536,10 @@ khc_read_int64(khm_handle conf,
     three. Also note that the schema store (KCONF_FLAG_SCHEMA) does\r
     not support binary values.\r
 \r
+    If the value is not found in the configuration space and any\r
+    shadowed configuration spaces, the function returns \a\r
+    KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.\r
+\r
     \param[in] buf Buffer to copy the string to.  Specify NULL to just\r
         retrieve the number of required bytes.\r
     \r
@@ -509,13 +556,13 @@ khc_read_int64(khm_handle conf,
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_read_binary(khm_handle conf, \r
-                wchar_t * value, \r
+                const wchar_t * value_name, \r
                 void * buf, \r
                 khm_size * bufsize);\r
 \r
 /*! \brief Write a string value to a configuration space\r
 \r
-    The \a value parameter specifies the value to write to the\r
+    The \a value_name parameter specifies the value to write to the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -530,31 +577,40 @@ khc_read_binary(khm_handle conf,
     khc_open_space().  The precedence of configuration stores are as\r
     follows:\r
 \r
-    - If KCONF_FLAG_USER was specified, then the user configuration\r
+    - If \a KCONF_FLAG_USER was specified, then the user configuration\r
       space.\r
 \r
-    - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine\r
-      configuration space.\r
+    - Otherwise, if \a KCONF_FLAG_MACHINE was specified, then the\r
+      machine configuration space.\r
 \r
     Note that not specifying any of the configuration store specifiers\r
     in the call to khc_open_space() is equivalent to specifying all\r
     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is\r
     readonly.\r
 \r
+    If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to\r
+    khc_open_space() for obtaining the configuration handle, the\r
+    specified string will only be written if it is different from the\r
+    value being read from the handle.\r
+\r
+    If the \a KCONF_FLAG_IFMODCI flag is specified along with the \a\r
+    KCONF_FLAG_WRITEIFMOD flag, then the string comparison used will\r
+    be case insensitive.\r
+\r
     \param[in] conf Handle to a configuration space\r
-    \param[in] value Name of value to write\r
+    \param[in] value_name Name of value to write\r
     \param[in] buf A NULL terminated unicode string not exceeding KCONF_MAXCCH_STRING in characters including terminating NULL\r
 \r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_string(khm_handle conf, \r
-                 wchar_t * value, \r
+                 const wchar_t * value_name, \r
                  wchar_t * buf);\r
 \r
 /*! \brief Write a multi-string value to a configuration space\r
 \r
-    The \a value parameter specifies the value to write to the\r
+    The \a value_name parameter specifies the value to write to the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -586,16 +642,25 @@ khc_write_string(khm_handle conf,
     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is\r
     readonly.\r
 \r
+    If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to\r
+    khc_open_space() for obtaining the configuration handle, the\r
+    specified string will only be written if it is different from the\r
+    value being read from the handle.\r
+\r
+    If the \a KCONF_FLAG_IFMODCI flag is specified along with the \a\r
+    KCONF_FLAG_WRITEIFMOD flag, then the string comparison used will\r
+    be case insensitive.\r
+\r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_multi_string(khm_handle conf, \r
-                       wchar_t * value, \r
+                       const wchar_t * value_name, \r
                        wchar_t * buf);\r
 \r
 /*! \brief Write a 32 bit integer value to a configuration space\r
 \r
-    The \a value parameter specifies the value to write to the\r
+    The \a value_name parameter specifies the value to write to the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -621,16 +686,21 @@ khc_write_multi_string(khm_handle conf,
     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is\r
     readonly.\r
 \r
+    If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to\r
+    khc_open_space() for obtaining the configuration handle, the\r
+    specified string will only be written if it is different from the\r
+    value being read from the handle.\r
+\r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_int32(khm_handle conf, \r
-                wchar_t * value, \r
+                const wchar_t * value_name, \r
                 khm_int32 buf);\r
 \r
 /*! \brief Write a 64 bit integer value to a configuration space\r
 \r
-    The \a value parameter specifies the value to write to the\r
+    The \a value_name parameter specifies the value to write to the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -656,16 +726,21 @@ khc_write_int32(khm_handle conf,
     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is\r
     readonly.\r
 \r
+    If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to\r
+    khc_open_space() for obtaining the configuration handle, the\r
+    specified string will only be written if it is different from the\r
+    value being read from the handle.\r
+\r
     \see khc_open_space()\r
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_int64(khm_handle conf, \r
-                wchar_t * value, \r
+                const wchar_t * value_name, \r
                 khm_int64 buf);\r
 \r
 /*! \brief Write a binary value to a configuration space\r
 \r
-    The \a value parameter specifies the value to write to the\r
+    The \a value_name parameter specifies the value to write to the\r
     configuration space.  This can be either a value name or a value\r
     path consisting of a series nested configuration space names\r
     followed by the value name all separated by backslashes or forward\r
@@ -695,7 +770,7 @@ khc_write_int64(khm_handle conf,
 */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_write_binary(khm_handle conf, \r
-                 wchar_t * value, \r
+                 const wchar_t * value_name, \r
                  void * buf, \r
                  khm_size bufsize);\r
 \r
@@ -705,7 +780,7 @@ khc_write_binary(khm_handle conf,
         KC_NONE if the value does not exist.\r
  */\r
 KHMEXP khm_int32 KHMAPI \r
-khc_get_type(khm_handle conf, wchar_t * value);\r
+khc_get_type(khm_handle conf, const wchar_t * value_name);\r
 \r
 /*! \brief Check which configuration stores contain a specific value.\r
 \r
@@ -722,7 +797,7 @@ khc_get_type(khm_handle conf, wchar_t * value);
         value.\r
  */\r
 KHMEXP khm_int32 KHMAPI \r
-khc_value_exists(khm_handle conf, wchar_t * value);\r
+khc_value_exists(khm_handle conf, const wchar_t * value);\r
 \r
 /*! \brief Remove a value from a configuration space\r
 \r
@@ -745,7 +820,7 @@ khc_value_exists(khm_handle conf, wchar_t * value);
 \r
     \param[in] conf Handle to configuration space to remove value from\r
 \r
-    \param[in] value Value to remove\r
+    \param[in] value_name Value to remove\r
 \r
     \param[in] flags Specifies which configuration stores will be\r
         affected by the removal.  See above.\r
@@ -763,7 +838,7 @@ khc_value_exists(khm_handle conf, wchar_t * value);
         other stores.\r
  */\r
 KHMEXP khm_int32 KHMAPI\r
-khc_remove_value(khm_handle conf, wchar_t * value, khm_int32 flags);\r
+khc_remove_value(khm_handle conf, const wchar_t * value_name, khm_int32 flags);\r
 \r
 /*! \brief Get the name of a configuration space\r
 \r
@@ -805,13 +880,13 @@ khc_get_config_space_parent(khm_handle conf,
  */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_load_schema(khm_handle conf, \r
-                kconf_schema * schema);\r
+                const kconf_schema * schema);\r
 \r
 /*! \brief Unload a schema from a configuration space\r
  */\r
 KHMEXP khm_int32 KHMAPI \r
 khc_unload_schema(khm_handle conf, \r
-                  kconf_schema * schema);\r
+                  const kconf_schema * schema);\r
 \r
 /*! \brief Enumerate the subspaces of a configuration space\r
 \r
index 24929a989acba5f9962a61ada9a27121e5b89fa8..b4c39ee2d540b9145a258d8b5b4718636a26fa8f 100644 (file)
 #define __KHIMAIRA_KCONFIGINTERNAL_H\r
 \r
 #include<windows.h>\r
-#include<strsafe.h>\r
 #include<kconfig.h>\r
 #include<khlist.h>\r
 #include<kherror.h>\r
 #include<utils.h>\r
+#include<strsafe.h>\r
 \r
 /* TODO: Implement configuration provider interfaces\r
 \r
@@ -56,7 +56,7 @@ typedef struct kconf_conf_space_t {
     khm_int32   refcount;\r
     khm_int32   flags;\r
 \r
-    kconf_schema * schema;\r
+    const kconf_schema * schema;\r
     khm_int32   nSchema;\r
 \r
     TDCL(struct kconf_conf_space_t);\r
index be2981b96c41165a3399711d137e1e401f7f6845..d10f2150e634c0f50f8666ded344b1519090822a 100644 (file)
@@ -161,7 +161,7 @@ typedef struct tag_kmm_plugin_info {
     flags , but the \a state of the plugin will indicate that the\r
     plugin is running.\r
  */\r
-#define KMM_PLUGIN_FLAG_DISABLED    0x0400\r
+#define KMM_PLUGIN_FLAG_DISABLED    0x00000400\r
 \r
 /*! \name Plugin types\r
 @{*/\r
index 665eb6330a1a2429219fbca175a3fffd6ed6044c..18a46b7c469122ef8a3c6d8b081f93698094e4f3 100644 (file)
@@ -165,7 +165,6 @@ kmm_enable_plugin(kmm_plugin p, khm_boolean enable) {
     kmm_plugin_i * pi;\r
     khm_int32 rv = KHM_ERROR_NOT_FOUND; /* default to error */\r
     khm_handle csp_plugin = NULL;\r
-    khm_int32 flags;\r
 \r
     EnterCriticalSection(&cs_kmm);\r
     if (!kmm_is_plugin(p)) {\r
@@ -179,19 +178,7 @@ kmm_enable_plugin(kmm_plugin p, khm_boolean enable) {
         goto _cleanup;\r
     }\r
 \r
-    if (KHM_FAILED(rv = khc_read_int32(csp_plugin, L"Flags", &flags))) {\r
-        goto _cleanup;\r
-    }\r
-\r
-    if (enable) {\r
-        flags &= ~KMM_PLUGIN_FLAG_DISABLED;\r
-        pi->flags &= ~KMM_PLUGIN_FLAG_DISABLED;\r
-    } else {\r
-        flags |= KMM_PLUGIN_FLAG_DISABLED;\r
-        pi->flags |= KMM_PLUGIN_FLAG_DISABLED;\r
-    }\r
-\r
-    if (KHM_FAILED(rv = khc_write_int32(csp_plugin, L"Flags", flags))) {\r
+    if (KHM_FAILED(rv = khc_write_int32(csp_plugin, L"Disabled", !enable))) {\r
         goto _cleanup;\r
     }\r
 \r
index 98b3cdd92df7108d02505781c4f0d5963067a64f..dcc75d13e74dcc2c657ce4d128324ed2f22829f8 100644 (file)
@@ -188,7 +188,8 @@ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags)
 \r
     rv = khc_write_int32(csp_plugin, L"Type", plugin->type);\r
     CKRV;\r
-    rv = khc_write_int32(csp_plugin, L"Flags", plugin->flags);\r
+    rv = khc_write_int32(csp_plugin, L"Disabled",\r
+                         !!(plugin->flags & KMM_PLUGIN_FLAG_DISABLED));\r
     CKRV;\r
 \r
     {\r
@@ -259,7 +260,7 @@ kmm_register_module(kmm_module_reg * module, khm_int32 config_flags)
     rv = khc_write_string(csp_module, L"ImagePath", module->path);\r
     CKRV;\r
 \r
-    rv = khc_write_int32(csp_module, L"Flags", 0);\r
+    rv = khc_write_int32(csp_module, L"Disabled", 0);\r
     CKRV;\r
 \r
     /* FileVersion and ProductVersion will be set when the module\r
index 742ccc7d73d899ef1bf00099b647a3ce2f245bca..f93363e5883e14f7c07612639bf8d0844dbcd39f 100644 (file)
@@ -342,8 +342,7 @@ void kmmint_init_plugin(kmm_plugin_i * p) {
         goto _exit;\r
     }\r
 \r
-    if(KHM_FAILED(kmm_get_plugin_config(p->p.name, 0, &csp_plugin)) ||\r
-       KHM_FAILED(khc_read_int32(csp_plugin, L"Flags", &t))) {\r
+    if(KHM_FAILED(kmm_get_plugin_config(p->p.name, 0, &csp_plugin))) {\r
         if(KHM_FAILED(kmm_register_plugin(&(p->p), 0))) {\r
             _report_mr0(KHERR_ERROR, MSG_IP_NOT_REGISTERED);\r
 \r
@@ -357,17 +356,9 @@ void kmmint_init_plugin(kmm_plugin_i * p) {
             p->state = KMM_PLUGIN_STATE_FAIL_NOT_REGISTERED;\r
             goto _exit;\r
         }\r
-\r
-        if(KHM_FAILED(khc_read_int32(csp_plugin, L"Flags", &t))) {\r
-            _report_mr0(KHERR_ERROR, MSG_IP_NOT_REGISTERED);\r
-\r
-            p->state = KMM_PLUGIN_STATE_FAIL_NOT_REGISTERED;\r
-            goto _exit;\r
-        }\r
-\r
     }\r
 \r
-    if(t & KMM_PLUGIN_FLAG_DISABLED) {\r
+    if (KHM_SUCCEEDED(khc_read_int32(csp_plugin, L"Disabled", &t)) && t) {\r
         p->flags |= KMM_PLUGIN_FLAG_DISABLED;\r
         p->state = KMM_PLUGIN_STATE_FAIL_DISABLED;\r
         goto _exit;\r
@@ -619,15 +610,17 @@ void kmmint_init_module(kmm_module_i * m) {
         goto _exit;\r
     }\r
 \r
-    if(KHM_SUCCEEDED(khc_read_int32(csp_mod, L"Flags", &i)) &&\r
-       (i & KMM_MODULE_FLAG_DISABLED)) {\r
-\r
+    if(KHM_SUCCEEDED(khc_read_int32(csp_mod, L"Disabled", &i)) && i) {\r
         _report_mr0(KHERR_INFO, MSG_IM_DISABLED);\r
 \r
         m->state = KMM_MODULE_STATE_FAIL_DISABLED;\r
         goto _exit;\r
     }\r
 \r
+    if(KHM_SUCCEEDED(khc_read_int32(csp_mod, L"NoUnload", &i)) && i) {\r
+        m->flags |= KMM_MODULE_FLAG_NOUNLOAD;\r
+    }\r
+\r
     if(KHM_SUCCEEDED(khc_read_int32(csp_mod, L"FailureCount", &i))) {\r
         khm_int64 tm;\r
         khm_int64 ct;\r
@@ -963,11 +956,13 @@ void kmmint_exit_module(kmm_module_i * m) {
 \r
     LeaveCriticalSection(&cs_kmm);\r
 \r
-    if(m->h_module) {\r
+    if(!(m->flags & KMM_MODULE_FLAG_NOUNLOAD) &&\r
+       m->h_module) {\r
         FreeLibrary(m->h_module);\r
     }\r
 \r
-    if(m->h_resource && (m->h_resource != m->h_module)) {\r
+    if(!(m->flags & KMM_MODULE_FLAG_NOUNLOAD) &&\r
+       m->h_resource && (m->h_resource != m->h_module)) {\r
         FreeLibrary(m->h_resource);\r
     }\r
 \r
index 171d667ddd274542d64e7398d0e94cea404f6051..43bb48cdc94b3e90650be69b66fe1fca136fb543 100644 (file)
@@ -8,7 +8,9 @@ PluginManager,KC_SPACE,0,Plugin Manager Configuration
       Description,KC_STRING,<Description>,Description of the plugin\r
       Dependencies,KC_STRING,<Dependencies>,Multi string of plugin names of plugins that this plugin depends on\r
       Type,KC_INT32,0,The type of the plugin\r
-      Flags,KC_INT32,0,Flags\r
+#      Flags,KC_INT32,0,Flags (Deprecated)\r
+      Disabled,KC_INT32,0,Plug-in is disabled (Boolean)\r
+      NoUnload,KC_INT32,0,Do not unload the plugin (Boolean)\r
       FailureCount,KC_INT32,0,Number of failed loads\r
       FailureTime,KC_INT64,0,FILETIME of first failure\r
       FailureReason,KC_INT32,0,Reason for first failure.  One of the plugin status values.\r
@@ -21,12 +23,14 @@ PluginManager,KC_SPACE,0,Plugin Manager Configuration
     ModuleFailureCountResetTime,KC_INT64,72000,Time after first failure at which the failure count is reset\r
     _Schema,KC_SPACE,0,Module schema\r
       ImagePath,KC_STRING,<Path to the library binary>,Path to the DLL (including DLL name)\r
-      Flags,KC_INT32,0,Flags\r
+#      Flags,KC_INT32,0,Flags (Deprecated)\r
+      Disabled,KC_INT32,0,Module is disabled (Boolean)\r
       FailureCount,KC_INT32,0,Number of failed loads\r
       FailureTime,KC_INT64,0,FILETIME of first failure\r
       FailureReason,KC_INT32,0,Reason for last failure.  One of the module status values.\r
       PluginList,KC_STRING,<plugins>,List of plugins implemented in the module\r
     _Schema,KC_ENDSPACE,0,\r
+# The OpenAFS plug-in is installed separately.\r
 #    OpenAFS,KC_SPACE,0,OpenAFS Module\r
 #      ImagePath,KC_STRING,afscred.dll,\r
 #      PluginList,KC_STRING,AfsCred,\r
index e0ce6b270f8d4d281594c7343e676aac3b9bde3c..41eaa73658531fccb5333d82050b44a217bb3a0c 100644 (file)
@@ -85,21 +85,24 @@ typedef struct kmm_module_i_t {
 #define kmm_handle_from_module(m) ((kmm_module) m)\r
 \r
 /* LoadLibrary succeeded for module */\r
-#define KMM_MODULE_FLAG_LOADED      1\r
+#define KMM_MODULE_FLAG_LOADED      0x00000001\r
 \r
 /* init_module entry called */\r
-#define KMM_MODULE_FLAG_INITP       2\r
+#define KMM_MODULE_FLAG_INITP       0x00000002\r
 \r
 /* the resources have been loaded */\r
-#define KMM_MODULE_FLAG_RES_LOADED  8\r
+#define KMM_MODULE_FLAG_RES_LOADED  0x00000008\r
 \r
 /* the signature has been verified */\r
-#define KMM_MODULE_FLAG_SIG         16\r
+#define KMM_MODULE_FLAG_SIG         0x00000010\r
 \r
 /* the module is disabled by the user\r
-   (option specifed in configuration) */\r
-#define KMM_MODULE_FLAG_DISABLED    1024\r
+   (option specified in configuration) */\r
+#define KMM_MODULE_FLAG_DISABLED    0x00000400\r
 \r
+/* the module should not be unloaded\r
+   (option specified in configuration)*/\r
+#define KMM_MODULE_FLAG_NOUNLOAD    0x00000800\r
 \r
 typedef struct kmm_plugin_i_t {\r
     kmm_plugin_reg p;\r
@@ -131,15 +134,15 @@ typedef struct kmm_plugin_i_t {
 #define kmm_plugin_from_handle(ph) ((kmm_plugin_i *) ph)\r
 \r
 /* the plugin has already been marked for unload */\r
-#define KMM_PLUGIN_FLAG_UNLOAD      0x0001\r
+#define KMM_PLUGIN_FLAG_UNLOAD      0x00000001\r
 \r
 /* the plugin is in the kmm_listed_plugins list */\r
-#define KMM_PLUGIN_FLAG_IN_LIST     0x0002\r
+#define KMM_PLUGIN_FLAG_IN_LIST     0x00000002\r
 \r
 /* the plugin is in the module's plugin list */\r
-#define KMM_PLUGIN_FLAG_IN_MODLIST  0x0004\r
+#define KMM_PLUGIN_FLAG_IN_MODLIST  0x00000004\r
 \r
-#define KMM_PLUGIN_FLAG_IN_QUEUE    0x0010\r
+#define KMM_PLUGIN_FLAG_IN_QUEUE    0x00000010\r
 \r
 /* the plugin is disabled by the user\r
     (option specified in configuration) */\r
index 701a79d7de06699a2832f9fabec12690b8e92f75..d18ac510d0a79d7425ef01529372f9fb0e9af3f6 100644 (file)
@@ -114,6 +114,7 @@ SCLIB=
 $(DLLFILE): $(OBJFILES) $(RESFILES)
        $(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
        $(_VC_MANIFEST_EMBED_DLL)
+       $(_VC_MANIFEST_CLEAN)
 
 all: mkdirs $(DLLFILE)
 
index c5226aaaa07d33000a1f02d692746adccfbd708a..d57a213aafedf8fade267ac6d2be6b360154ddb9 100644 (file)
@@ -71,6 +71,7 @@ $(OBJ)\krb4config.c: krbconfig.csv $(CONFDIR)\csvschema.cfg
 $(DLLFILE): $(OBJFILES) $(VERRESFILE) $(MSGRESFILE)
        $(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
        $(_VC_MANIFEST_EMBED_DLL)
+       $(_VC_MANIFEST_CLEAN)
 
 all: mkdirs $(MSGRESFILE) $(DLLFILE) lang
 
index e6eb890df3c5c86059ca594cfa1f1dcc67071ea2..3186633c457d67a758c10694af783cd949343d8b 100644 (file)
@@ -150,10 +150,26 @@ krb4_id_config_proc(HWND hwnd,
             khm_size cb;\r
             khui_config_init_data * d;\r
             khm_handle ident = NULL;\r
+            khm_handle csp_ident = NULL;\r
+            khm_handle csp_idk4 = NULL;\r
             khm_int32 gettix = 0;\r
             khm_int32 flags = 0;\r
+            khm_int32 t;\r
+            khm_boolean is_default_ident = FALSE;\r
 \r
-            d = (khui_config_init_data *) lParam;\r
+            d = PMALLOC(sizeof(khui_config_init_data));\r
+\r
+            if (!d)\r
+                break;\r
+\r
+            ZeroMemory(d, sizeof(*d));\r
+\r
+            *d = *((khui_config_init_data *) lParam);\r
+\r
+#pragma warning(push)\r
+#pragma warning(disable: 4244)\r
+            SetWindowLongPtr(hwnd, DWLP_USER, (LONG_PTR) d);\r
+#pragma warning(pop)\r
 \r
             khc_read_int32(csp_params, L"Krb4NewCreds", &gettix);\r
             if (gettix == 0)\r
@@ -172,14 +188,118 @@ krb4_id_config_proc(HWND hwnd,
 \r
             kcdb_identity_get_flags(ident, &flags);\r
 \r
-            kcdb_identity_release(ident);\r
+            if (!(flags & KCDB_IDENT_FLAG_DEFAULT)) {\r
+                gettix = 0;\r
+                goto set_ui;\r
+            }\r
+\r
+            is_default_ident = TRUE;\r
+\r
+            if (KHM_FAILED(kcdb_identity_get_config(ident, 0, &csp_ident)))\r
+                goto set_ui;\r
 \r
-            if (!(flags & KCDB_IDENT_FLAG_DEFAULT))\r
+            if (KHM_FAILED(khc_open_space(csp_ident, CSNAME_KRB4CRED,\r
+                                          0, &csp_idk4)))\r
+                goto close_config;\r
+\r
+            if (KHM_SUCCEEDED(khc_read_int32(csp_idk4, L"Krb4NewCreds", &t)) &&\r
+                !t)\r
                 gettix = 0;\r
 \r
+        close_config:\r
+            if (csp_ident)\r
+                khc_close_space(csp_ident);\r
+\r
+            if (csp_idk4)\r
+                khc_close_space(csp_idk4);\r
+\r
         set_ui:\r
             CheckDlgButton(hwnd, IDC_CFG_GETTIX,\r
                            (gettix)?BST_CHECKED: BST_UNCHECKED);\r
+            EnableWindow(GetDlgItem(hwnd, IDC_CFG_GETTIX),\r
+                         is_default_ident);\r
+\r
+            if (ident)\r
+                kcdb_identity_release(ident);\r
+        }\r
+        break;\r
+\r
+    case KHUI_WM_CFG_NOTIFY:\r
+        {\r
+            khui_config_init_data * d;\r
+\r
+            d = (khui_config_init_data *) (LONG_PTR)\r
+                GetWindowLongPtr(hwnd, DWLP_USER);\r
+\r
+            if (!d)\r
+                break;\r
+\r
+            if (HIWORD(wParam) == WMCFG_APPLY) {\r
+                wchar_t idname[KCDB_IDENT_MAXCCH_NAME];\r
+                khm_size cb_idname = sizeof(idname);\r
+                khm_handle ident = NULL;\r
+                khm_int32 flags = 0;\r
+                khm_handle csp_ident = NULL;\r
+                khm_handle csp_idk4 = NULL;\r
+                khm_int32 gettix = 0;\r
+                khm_int32 applied = FALSE;\r
+\r
+                khui_cfg_get_name(d->ctx_node, idname, &cb_idname);\r
+\r
+                kcdb_identity_create(idname, 0, &ident);\r
+\r
+                if (ident == NULL)\r
+                    break;\r
+\r
+                kcdb_identity_get_flags(ident, &flags);\r
+\r
+                if (!(flags & KCDB_IDENT_FLAG_DEFAULT))\r
+                    goto done_apply;\r
+\r
+                if (IsDlgButtonChecked(hwnd, IDC_CFG_GETTIX) == BST_CHECKED)\r
+                    gettix = TRUE;\r
+\r
+                if (KHM_FAILED(kcdb_identity_get_config(ident, KHM_FLAG_CREATE,\r
+                                                        &csp_ident)))\r
+                    goto done_apply;\r
+\r
+                if (KHM_FAILED(khc_open_space(csp_ident, CSNAME_KRB4CRED,\r
+                                              KHM_FLAG_CREATE | KCONF_FLAG_WRITEIFMOD,\r
+                                              &csp_idk4)))\r
+                    goto done_apply;\r
+\r
+                khc_write_int32(csp_idk4, L"Krb4NewCreds", gettix);\r
+\r
+                applied = TRUE;\r
+\r
+            done_apply:\r
+                if (ident)\r
+                    kcdb_identity_release(ident);\r
+\r
+                if (csp_ident)\r
+                    khc_close_space(csp_ident);\r
+\r
+                if (csp_idk4)\r
+                    khc_close_space(csp_ident);\r
+\r
+                khui_cfg_set_flags_inst(d,\r
+                                        ((applied)? KHUI_CNFLAG_APPLIED: 0),\r
+                                        (KHUI_CNFLAG_APPLIED | KHUI_CNFLAG_MODIFIED));\r
+            }\r
+        }\r
+        break;\r
+\r
+    case WM_DESTROY:\r
+        {\r
+            khui_config_init_data * d;\r
+\r
+            d = (khui_config_init_data *) (LONG_PTR)\r
+                GetWindowLongPtr(hwnd, DWLP_USER);\r
+\r
+            if (!d)\r
+                break;\r
+\r
+            PFREE(d);\r
         }\r
         break;\r
     }\r
index 18c05981fc499800600663954f12e8eb3bd4059d..728d2db4a3f8e402e4fca133eeffab700001f7ab 100644 (file)
@@ -425,9 +425,9 @@ wchar_t * khm_krb5_get_realm_list(void)
 #if _MSC_VER >= 1400\r
             !fopen_s(&file, krb_conf, "rt")\r
 #else\r
-           (file = fopen(krb_conf, "rt"))\r
+            (file = fopen(krb_conf, "rt"))\r
 #endif\r
-            )\r
+            )\r
         {\r
             char lineBuf[256];\r
 \r
index 407c30fedf914ee30a1cd5a76f92859c978b4959..851f2e85a69a902a598df0cde63c98ebf7586a10 100644 (file)
@@ -220,7 +220,9 @@ void k4_write_identity_data(k4_dlg_data * d) {
         KHM_SUCCEEDED(kcdb_identity_get_config(d->nc->identities[0],\r
                                                KHM_FLAG_CREATE,\r
                                                &csp_ident))) {\r
-        khc_open_space(csp_ident, CSNAME_KRB4CRED, KHM_FLAG_CREATE, &csp_k4);\r
+        khc_open_space(csp_ident, CSNAME_KRB4CRED,\r
+                       KHM_FLAG_CREATE | KCONF_FLAG_WRITEIFMOD,\r
+                       &csp_k4);\r
 \r
         if (csp_k4) {\r
             khc_write_int32(csp_k4, L"Krb4NewCreds", !!d->k4_enabled);\r
index fb6a88307e440612b620579440fcdfc0f15936f7..c47f5c82873bcfbfd5a46f217c6a43a3b743faac 100644 (file)
@@ -209,6 +209,8 @@ krb4_msg_system(khm_int32 msg_type, khm_int32 msg_subtype,
 \r
     case KMSG_SYSTEM_EXIT:\r
 #ifdef _WIN64\r
+        /* See above.  On 64-bit platforms, we don't support Krb4 at\r
+           all. */\r
         return 0;\r
 #else\r
         if(credtype_id_krb4 >= 0)\r
index 9aa7cd944edd75330104459f59f126e2b83c2557..d77abbffafbe0ee6246ff96d352cfd3581739c8a 100644 (file)
@@ -6,7 +6,7 @@ Krb4Cred,KC_SPACE,0,"Kerberos IV Credentials Provider"
   Type,KC_INT32,1,\r
   Flags,KC_INT32,0,\r
   Parameters,KC_SPACE,0,Parameters for KrbCred\r
-    Krb4NewCreds,KC_INT32,1,Obtain Kerberos 4 tickets\r
+    Krb4NewCreds,KC_INT32,1,Obtain Kerberos 4 tickets (Boolean)\r
     Krb4Method,KC_INT32,0,Method for acquiring K4 tix. 0-Auto;1-Password;2-K524\r
     CreateMissingConfig,KC_INT32,0,Create missing configuration files\r
     DefaultLifetime,KC_INT32,36000,Default ticket lifetime\r
index cfee907b2ad13d33ebe50e68ee61424ae44d5951..cc797893aa8403241f1edd6cd802bec5ab45afe2 100644 (file)
@@ -75,6 +75,7 @@ $(OBJ)\krb5config.c: krbconfig.csv $(CONFDIR)\csvschema.cfg
 $(DLLFILE):  $(OBJFILES) $(VERRESFILE) 
        $(DLLGUILINK) $(MSGRESFILE) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
        $(_VC_MANIFEST_EMBED_DLL)
+       $(_VC_MANIFEST_CLEAN)
 
 $(MSGRESFILE): $(OBJ)\krb5_msgs.rc
 
index 425d13430f8b6782dcaf07d4935b3031c30b63e0..5edc02b1fe8ef306773e2fe5f3f65a919d86f9f4 100644 (file)
@@ -29,8 +29,6 @@
 #define _WIN32_WINNT 0x501\r
 #endif\r
 \r
-#define STRSAFE_NO_DEPRECATE\r
-\r
 #include<krbcred.h>\r
 #include<krb5.h>\r
 #include<assert.h>\r
index 65f010840e997598670f49c48aa166c2fc8a3eaa..b8bdc55f999143bfd1ec15adb23b57dbc04568aa 100644 (file)
 
 /* $Id$ */
 
-#define STRSAFE_NO_DEPRECATE
-
 #include<krbcred.h>
 #include<krb5.h>
 #include<assert.h>
 #include<lm.h>
 #include<commctrl.h>
 #include<shlwapi.h>
-
 #include<strsafe.h>
 
 typedef struct tag_k5_realm_kdc {
index ebec91e997d3bd8f0949f285f6978cd82eb8d8a0..6e3a4517358c822e00c3a44adc24ec5e26a6fbf3 100644 (file)
@@ -24,8 +24,6 @@
 \r
 /* $Id$ */\r
 \r
-#define STRSAFE_NO_DEPRECATE\r
-\r
 #include<krbcred.h>\r
 #include<krb5.h>\r
 #include<assert.h>\r
index 579b9f712d3194c5cca452076bfc9a08ce40bbd8..afd86e541c4d9e9a7ed3dcbc897c00be0632c34c 100644 (file)
 \r
 /* $Id$ */\r
 \r
-#define STRSAFE_NO_DEPRECATE\r
-\r
 #include<krbcred.h>\r
 #include<krb5.h>\r
 #include<assert.h>\r
 #include<lm.h>\r
 #include<commctrl.h>\r
-\r
-#pragma warning(push)\r
-#pragma warning(disable: 4995)\r
 #include<shlwapi.h>\r
-#pragma warning(pop)\r
+\r
 \r
 typedef struct tag_k5_ids_dlg_data {\r
     khui_config_init_data cfg;\r
index 1f7b2bdad138b6a07d748e4a6790581a0b593dbd..31626311903c9c25bfd63a7006970fb2e9ce4652 100644 (file)
@@ -1918,9 +1918,9 @@ khm_krb5_get_realm_list(void)
 #if _MSC_VER >= 1400\r
             !fopen_s(&file, krb_conf, "rt")\r
 #else\r
-           (file = fopen(krb_conf, "rt"))\r
+            (file = fopen(krb_conf, "rt"))\r
 #endif\r
-            )\r
+            )\r
         {\r
             char lineBuf[256];\r
 \r
index daa80b84528f653e2993543da796430bf0c945e5..179ec4ede3c3690bb954a6ed724a571ab3d728b2 100644 (file)
@@ -656,6 +656,10 @@ k5_cached_kinit_prompter(void) {
 \r
         goto _cleanup;\r
 \r
+    /* we found a prompt cache.  We take this to imply that the\r
+       principal is valid. */\r
+    g_fjob.valid_principal = TRUE;\r
+\r
     /* check if there are any prompts currently showing.  If there are\r
        we check if they are the same as the ones we are going to show.\r
        In which case we just reuse the exisitng prompts */\r
@@ -821,6 +825,9 @@ k5_kinit_prompter(krb5_context context,
 \r
     khm_handle csp_prcache = NULL;\r
 \r
+    /* we got prompts?  Then we assume that the principal is valid */\r
+    g_fjob.valid_principal = TRUE;\r
+\r
     nc = g_fjob.nc;\r
 \r
     if(pkrb5_get_prompt_types)\r
@@ -1102,6 +1109,128 @@ k5_kinit_prompter(krb5_context context,
         return code;\r
 }\r
 \r
+/*\r
+\r
+  The configuration information for each identity comes from a\r
+  multitude of layers organized as follows.  The ordering is\r
+  decreasing in priority.  When looking up a value, the value will be\r
+  looked up in each layer in turn starting at level 0.  The first\r
+  instance of the value found will be the effective value.\r
+\r
+  0  : <identity configuration>\Krb5Cred\r
+\r
+  0.1: per user\r
+\r
+  0.2: per machine\r
+\r
+  1  : <plugin configuration>\Parameters\Realms\<realm of identity>\r
+\r
+  1.1: per user\r
+\r
+  1.2: per machine\r
+\r
+  2  : <plugin configuration>\Parameters\r
+\r
+  2.1: per user\r
+\r
+  2.2: per machine\r
+\r
+  2.3: schema\r
+\r
+ */\r
+khm_int32\r
+k5_open_config_handle(khm_handle ident,\r
+                      khm_int32 flags,\r
+                      khm_handle * ret_csp) {\r
+\r
+    khm_int32 rv = KHM_ERROR_SUCCESS;\r
+    khm_handle csp_i = NULL;\r
+    khm_handle csp_ik5 = NULL;\r
+    khm_handle csp_realms = NULL;\r
+    khm_handle csp_realm = NULL;\r
+    khm_handle csp_plugins = NULL;\r
+    khm_handle csp_krbcfg = NULL;\r
+    khm_handle csp_rv = NULL;\r
+    wchar_t realm[KCDB_IDENT_MAXCCH_NAME];\r
+\r
+    realm[0] = L'\0';\r
+\r
+    if (ident) {\r
+        wchar_t idname[KCDB_IDENT_MAXCCH_NAME];\r
+        wchar_t * trealm;\r
+        khm_size cb_idname = sizeof(idname);\r
+\r
+        rv = kcdb_identity_get_name(ident, idname, &cb_idname);\r
+        if (KHM_SUCCEEDED(rv) &&\r
+            (trealm = khm_get_realm_from_princ(idname)) != NULL) {\r
+            StringCbCopy(realm, sizeof(realm), trealm);\r
+        }\r
+    }\r
+\r
+    if (ident) {\r
+        rv = kcdb_identity_get_config(ident, flags, &csp_i);\r
+        if (KHM_FAILED(rv))\r
+            goto done;\r
+\r
+        rv = khc_open_space(csp_i, CSNAME_KRB5CRED, flags, &csp_ik5);\r
+        if (KHM_FAILED(rv))\r
+            goto done;\r
+\r
+        if (realm[0] == L'\0')\r
+            goto done_shadow_realm;\r
+\r
+        rv = khc_open_space(csp_params, CSNAME_REALMS, flags, &csp_realms);\r
+        if (KHM_FAILED(rv))\r
+            goto done_shadow_realm;\r
+\r
+        rv = khc_open_space(csp_realms, realm, flags, &csp_realm);\r
+        if (KHM_FAILED(rv))\r
+            goto done_shadow_realm;\r
+\r
+        rv = khc_shadow_space(csp_realm, csp_params);\r
+\r
+    done_shadow_realm:\r
+\r
+        if (csp_realm)\r
+            rv = khc_shadow_space(csp_ik5, csp_realm);\r
+        else\r
+            rv = khc_shadow_space(csp_ik5, csp_params);\r
+\r
+        csp_rv = csp_ik5;\r
+\r
+    } else {\r
+\r
+        /* No valid identity specified. We default to the parameters key. */\r
+        rv = kmm_get_plugins_config(0, &csp_plugins);\r
+        if (KHM_FAILED(rv))\r
+            goto done;\r
+\r
+        rv = khc_open_space(csp_plugins, CSNAME_KRB5CRED, flags, &csp_krbcfg);\r
+        if (KHM_FAILED(rv))\r
+            goto done;\r
+\r
+        rv = khc_open_space(csp_krbcfg, CSNAME_PARAMS, flags, &csp_rv);\r
+    }\r
+\r
+ done:\r
+\r
+    *ret_csp = csp_rv;\r
+\r
+    /* leave csp_ik5.  If it's non-NULL, then it's the return value */\r
+    /* leave csp_rv.  It's the return value. */\r
+    if (csp_i)\r
+        khc_close_space(csp_i);\r
+    if (csp_realms)\r
+        khc_close_space(csp_realms);\r
+    if (csp_realm)\r
+        khc_close_space(csp_realm);\r
+    if (csp_plugins)\r
+        khc_close_space(csp_plugins);\r
+    if (csp_krbcfg)\r
+        khc_close_space(csp_krbcfg);\r
+\r
+    return rv;\r
+}\r
 \r
 void \r
 k5_read_dlg_params(khm_handle conf, \r
@@ -1173,11 +1302,11 @@ k5_write_dlg_params(khm_handle conf,
     khc_write_int32(conf, L"Addressless", d->addressless);\r
     khc_write_int32(conf, L"PublicIP", d->publicIP);\r
 \r
-    khc_write_int32(conf, L"DefaultLifetime", \r
+    khc_write_int32(conf, L"DefaultLifetime",\r
                     (khm_int32) d->tc_lifetime.current);\r
-    khc_write_int32(conf, L"MaxLifetime", \r
+    khc_write_int32(conf, L"MaxLifetime",\r
                     (khm_int32) d->tc_lifetime.max);\r
-    khc_write_int32(conf, L"MinLifetime", \r
+    khc_write_int32(conf, L"MinLifetime",\r
                     (khm_int32) d->tc_lifetime.min);\r
 \r
     khc_write_int32(conf, L"DefaultRenewLifetime", \r
@@ -1241,6 +1370,7 @@ k5_prep_kinit_job(khui_new_creds * nc)
     g_fjob.code = 0;\r
     g_fjob.identity = ident;\r
     g_fjob.prompt_set = 0;\r
+    g_fjob.valid_principal = FALSE;\r
 \r
     /* if we have external parameters, we should use them as well */\r
     if (nc->ctx.cb_vparam == sizeof(NETID_DLGINFO) &&\r
@@ -1346,6 +1476,106 @@ k5_find_tgt_filter(khm_handle cred,
     return rv;\r
 }\r
 \r
+khm_int32\r
+k5_update_LRU(khm_handle identity)\r
+{\r
+    wchar_t * wbuf = NULL;\r
+    wchar_t * idname = NULL;\r
+    wchar_t * realm = NULL;\r
+    khm_size cb;\r
+    khm_size cb_ms;\r
+    khm_int32 rv = KHM_ERROR_SUCCESS;\r
+\r
+    rv = kcdb_identity_get_name(identity, NULL, &cb);\r
+    assert(rv == KHM_ERROR_TOO_LONG);\r
+\r
+    idname = PMALLOC(cb);\r
+    assert(idname);\r
+\r
+    rv = kcdb_identity_get_name(identity, idname, &cb);\r
+    assert(KHM_SUCCEEDED(rv));\r
+\r
+    rv = khc_read_multi_string(csp_params, L"LRUPrincipals", NULL, &cb_ms);\r
+    if (rv != KHM_ERROR_TOO_LONG)\r
+        cb_ms = cb + sizeof(wchar_t);\r
+    else\r
+        cb_ms += cb + sizeof(wchar_t);\r
+\r
+    wbuf = PMALLOC(cb_ms);\r
+    assert(wbuf);\r
+\r
+    cb = cb_ms;\r
+\r
+    if (rv == KHM_ERROR_TOO_LONG) {\r
+        rv = khc_read_multi_string(csp_params, L"LRUPrincipals", wbuf, &cb);\r
+        assert(KHM_SUCCEEDED(rv));\r
+\r
+        if (multi_string_find(wbuf, idname, KHM_CASE_SENSITIVE) != NULL) {\r
+            /* it's already there.  We remove it here and add it at\r
+               the top of the LRU list. */\r
+            multi_string_delete(wbuf, idname, KHM_CASE_SENSITIVE);\r
+        }\r
+    } else {\r
+        multi_string_init(wbuf, cb_ms);\r
+    }\r
+\r
+    cb = cb_ms;\r
+    rv = multi_string_prepend(wbuf, &cb, idname);\r
+    assert(KHM_SUCCEEDED(rv));\r
+\r
+    rv = khc_write_multi_string(csp_params, L"LRUPrincipals", wbuf);\r
+\r
+    realm = khm_get_realm_from_princ(idname);\r
+    if (realm == NULL || *realm == L'\0')\r
+        goto _done_with_LRU;\r
+\r
+    cb = cb_ms;\r
+    rv = khc_read_multi_string(csp_params, L"LRURealms", wbuf, &cb);\r
+\r
+    if (rv == KHM_ERROR_TOO_LONG) {\r
+        PFREE(wbuf);\r
+        wbuf = PMALLOC(cb);\r
+        assert(wbuf);\r
+\r
+        cb_ms = cb;\r
+\r
+        rv = khc_read_multi_string(csp_params, L"LRURealms", wbuf, &cb);\r
+\r
+        assert(KHM_SUCCEEDED(rv));\r
+    } else if (rv == KHM_ERROR_SUCCESS) {\r
+        if (multi_string_find(wbuf, realm, KHM_CASE_SENSITIVE) != NULL) {\r
+            /* remove the realm and add it at the top later. */\r
+            multi_string_delete(wbuf, realm, KHM_CASE_SENSITIVE); \r
+        }\r
+    } else {\r
+        multi_string_init(wbuf, cb_ms);\r
+    }\r
+\r
+    cb = cb_ms;\r
+    rv = multi_string_prepend(wbuf, &cb, realm);\r
+\r
+    if (rv == KHM_ERROR_TOO_LONG) {\r
+        wbuf = PREALLOC(wbuf, cb);\r
+\r
+        rv = multi_string_prepend(wbuf, &cb, realm);\r
+\r
+        assert(KHM_SUCCEEDED(rv));\r
+    }\r
+\r
+    rv = khc_write_multi_string(csp_params, L"LRURealms", wbuf);\r
+    \r
+    assert(KHM_SUCCEEDED(rv));\r
+\r
+ _done_with_LRU:\r
+\r
+    if (wbuf)\r
+        PFREE(wbuf);\r
+    if (idname)\r
+        PFREE(idname);\r
+\r
+    return rv;\r
+}\r
+\r
 /* Handler for CRED type messages\r
 \r
     Runs in the context of the Krb5 plugin\r
@@ -1508,34 +1738,22 @@ k5_msg_cred_dialog(khm_int32 msg_type,
             if(/* !d->dirty && */ nc->n_identities > 0 &&\r
                nc->subtype == KMSG_CRED_NEW_CREDS) {\r
 \r
-                khm_handle h_id = NULL;\r
-                khm_handle h_idk5 = NULL;\r
+                khm_handle h_idcfg = NULL;\r
 \r
                 do {\r
-                    if(KHM_FAILED\r
-                       (kcdb_identity_get_config(nc->identities[0],\r
-                                                 0,\r
-                                                 &h_id)))\r
+                    if (KHM_FAILED\r
+                        (k5_open_config_handle(nc->identities[0],\r
+                                               0, &h_idcfg)))\r
                         break;\r
 \r
-                    if(KHM_FAILED\r
-                       (khc_open_space(h_id, CSNAME_KRB5CRED, \r
-                                       0, &h_idk5)))\r
-                        break;\r
-\r
-                    if(KHM_FAILED(khc_shadow_space(h_idk5, csp_params)))\r
-                        break;\r
-\r
-                    k5_read_dlg_params(h_idk5, d);\r
+                    k5_read_dlg_params(h_idcfg, d);\r
 \r
                     PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY, \r
                                 MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);\r
                 } while(FALSE);\r
 \r
-                if(h_id)\r
-                    khc_close_space(h_id);\r
-                if(h_idk5)\r
-                    khc_close_space(h_idk5);\r
+                if(h_idcfg)\r
+                    khc_close_space(h_idcfg);\r
             }\r
 \r
             khui_cw_unlock_nc(nc);\r
@@ -1825,17 +2043,18 @@ k5_msg_cred_dialog(khm_int32 msg_type,
                     assert(g_fjob.state == FIBER_STATE_NONE);\r
 #endif\r
 \r
+                    if (g_fjob.valid_principal &&\r
+                        nc->n_identities > 0 &&\r
+                        nc->identities[0]) {\r
+                        /* the principal was valid, so we can go ahead\r
+                           and update the LRU */\r
+                        k5_update_LRU(nc->identities[0]);\r
+                    }\r
+\r
                 } else if (nc->result == KHUI_NC_RESULT_PROCESS &&\r
                            g_fjob.state == FIBER_STATE_NONE) {\r
-                    khm_handle sp = NULL;\r
-                    khm_handle ep = NULL;\r
+                    khm_handle csp_idcfg = NULL;\r
                     krb5_context ctx = NULL;\r
-                    wchar_t * wbuf;\r
-                    wchar_t * idname;\r
-                    wchar_t * atsign;\r
-                    khm_size cb;\r
-                    khm_size cb_ms;\r
-                    khm_int32 rv;\r
 \r
                    _reportf(L"Tickets successfully acquired");\r
 \r
@@ -1849,20 +2068,16 @@ k5_msg_cred_dialog(khm_int32 msg_type,
                     assert(nc->n_identities > 0);\r
                     assert(nc->identities[0]);\r
 \r
-                    if(KHM_SUCCEEDED\r
-                       (kcdb_identity_get_config(nc->identities[0],\r
-                                                 KHM_FLAG_CREATE,\r
-                                                 &sp)) &&\r
-                       KHM_SUCCEEDED\r
-                       (khc_open_space(sp, CSNAME_KRB5CRED, \r
-                                       KHM_FLAG_CREATE, &ep))) {\r
-                        k5_write_dlg_params(ep, d);\r
+                    if (KHM_SUCCEEDED\r
+                        (k5_open_config_handle(nc->identities[0],\r
+                                               KHM_FLAG_CREATE |\r
+                                               KCONF_FLAG_WRITEIFMOD,\r
+                                               &csp_idcfg))) {\r
+                        k5_write_dlg_params(csp_idcfg, d);\r
                     }\r
 \r
-                    if(ep != NULL)\r
-                        khc_close_space(ep);\r
-                    if(sp != NULL)\r
-                        khc_close_space(sp);\r
+                    if(csp_idcfg != NULL)\r
+                        khc_close_space(csp_idcfg);\r
 \r
                     /* We should also quickly refresh the credentials\r
                        so that the identity flags and ccache\r
@@ -1892,135 +2107,11 @@ k5_msg_cred_dialog(khm_int32 msg_type,
                         }\r
                     }\r
 \r
-                    /* also add the principal and the realm in to the\r
-                       LRU lists */\r
-                    rv = kcdb_identity_get_name(nc->identities[0],\r
-                                                NULL,\r
-                                                &cb);\r
-                    assert(rv == KHM_ERROR_TOO_LONG);\r
-\r
-                    idname = PMALLOC(cb);\r
-                    assert(idname);\r
-\r
-                    rv = kcdb_identity_get_name(nc->identities[0],\r
-                                                idname,\r
-                                                &cb);\r
-                    assert(KHM_SUCCEEDED(rv));\r
+                    /* and update the LRU */\r
+                    k5_update_LRU(nc->identities[0]);\r
 \r
-                    rv = khc_read_multi_string(csp_params,\r
-                                               L"LRUPrincipals",\r
-                                               NULL,\r
-                                               &cb_ms);\r
-                    if (rv != KHM_ERROR_TOO_LONG)\r
-                        cb_ms = cb + sizeof(wchar_t);\r
-                    else\r
-                        cb_ms += cb + sizeof(wchar_t);\r
-\r
-                    wbuf = PMALLOC(cb_ms);\r
-                    assert(wbuf);\r
-\r
-                    cb = cb_ms;\r
-\r
-                    if (rv == KHM_ERROR_TOO_LONG) {\r
-                        rv = khc_read_multi_string(csp_params,\r
-                                                   L"LRUPrincipals",\r
-                                                   wbuf,\r
-                                                   &cb);\r
-                        assert(KHM_SUCCEEDED(rv));\r
-\r
-                        if (multi_string_find(wbuf,\r
-                                              idname,\r
-                                              KHM_CASE_SENSITIVE) \r
-                            != NULL) {\r
-                            /* it's already there.  We remove it here\r
-                               and add it at the top of the LRU\r
-                               list. */\r
-                            multi_string_delete(wbuf, idname, KHM_CASE_SENSITIVE);\r
-                        }\r
-                    } else {\r
-                        multi_string_init(wbuf, cb_ms);\r
-                    }\r
-\r
-                    cb = cb_ms;\r
-                    rv = multi_string_prepend(wbuf, &cb, idname);\r
-                    assert(KHM_SUCCEEDED(rv));\r
-\r
-                    rv = khc_write_multi_string(csp_params,\r
-                                                L"LRUPrincipals",\r
-                                                wbuf);\r
-\r
-                    atsign = wcschr(idname, L'@');\r
-                    if (atsign == NULL)\r
-                        goto _done_with_LRU;\r
-\r
-                    atsign++;\r
-\r
-                    if (*atsign == L'\0')\r
-                        goto _done_with_LRU;\r
-\r
-                    cb = cb_ms;\r
-                    rv = khc_read_multi_string(csp_params,\r
-                                               L"LRURealms",\r
-                                               wbuf,\r
-                                               &cb);\r
-\r
-                    if (rv == KHM_ERROR_TOO_LONG) {\r
-                        PFREE(wbuf);\r
-                        wbuf = PMALLOC(cb);\r
-                        assert(wbuf);\r
-\r
-                        cb_ms = cb;\r
-\r
-                        rv = khc_read_multi_string(csp_params,\r
-                                                   L"LRURealms",\r
-                                                   wbuf,\r
-                                                   &cb);\r
-\r
-                        assert(KHM_SUCCEEDED(rv));\r
-                    } else if (rv == KHM_ERROR_SUCCESS) {\r
-                        if (multi_string_find(wbuf,\r
-                                              atsign,\r
-                                              KHM_CASE_SENSITIVE)\r
-                            != NULL) {\r
-                            /* remove the realm and add it at the top\r
-                               later. */\r
-                            multi_string_delete(wbuf, atsign, KHM_CASE_SENSITIVE); \r
-                        }\r
-                    } else {\r
-                        multi_string_init(wbuf, cb_ms);\r
-                    }\r
-\r
-                    cb = cb_ms;\r
-                    rv = multi_string_prepend(wbuf,\r
-                                              &cb,\r
-                                              atsign);\r
-\r
-                    if (rv == KHM_ERROR_TOO_LONG) {\r
-                        wbuf = PREALLOC(wbuf, cb);\r
-\r
-                        rv = multi_string_prepend(wbuf,\r
-                                                  &cb,\r
-                                                  atsign);\r
-\r
-                        assert(KHM_SUCCEEDED(rv));\r
-                    }\r
-\r
-                    rv = khc_write_multi_string(csp_params,\r
-                                                L"LRURealms",\r
-                                                wbuf);\r
-                    assert(KHM_SUCCEEDED(rv));\r
-\r
-                _done_with_LRU:\r
-                    \r
                     if (ctx != NULL)\r
                         pkrb5_free_context(ctx);\r
-\r
-                    if (idname)\r
-                        PFREE(idname);\r
-\r
-                    if (wbuf)\r
-                        PFREE(wbuf);\r
-\r
                 } else if (g_fjob.state == FIBER_STATE_NONE) {\r
                     /* the user cancelled the operation */\r
                     r = KHUI_NC_RESPONSE_EXIT | \r
index 49da4f2df4c21830907d8dd4054914679179718d..b6754409e1590cdec9111c8dcf69d9215752aebb 100644 (file)
@@ -36,5 +36,7 @@ Krb5Cred,KC_SPACE,0,Kerberos V Credentials Provider
         Flags,KC_INT32,0,\r
       (n),KC_ENDSPACE,0,\r
     PromptCache,KC_ENDSPACE,0,\r
+    Realms,KC_SPACE,0,Realm specific configuration (same schema as per identity config)\r
+    Realms,KC_ENDSPACE,0,\r
   Parameters,KC_ENDSPACE,0,\r
 Krb5Cred,KC_ENDSPACE,0,\r
index 4b9373d08103d4691becbf26b393df7ea84be39b..f31bde4e62272a7514fd5018cbfb0c6841057061 100644 (file)
 #define KHERR_FACILITY k5_facility\r
 #define KHERR_FACILITY_ID 64\r
 \r
-#include<khdefs.h>\r
-#include<kcreddb.h>\r
-#include<kmm.h>\r
-#include<kconfig.h>\r
-#include<khuidefs.h>\r
-#include<kherr.h>\r
-#include<utils.h>\r
+#include<netidmgr.h>\r
 \r
 #include<krb5funcs.h>\r
 #include<krb5common.h>\r
@@ -105,6 +99,7 @@ extern khm_ui_4  k5_commctl_version;
 #define CSNAME_KRB5CRED      L"Krb5Cred"\r
 #define CSNAME_PARAMS        L"Parameters"\r
 #define CSNAME_PROMPTCACHE   L"PromptCache"\r
+#define CSNAME_REALMS        L"Realms"\r
 \r
 /* plugin constants */\r
 #define KRB5_PLUGIN_NAME    L"Krb5Cred"\r
@@ -173,6 +168,7 @@ typedef struct _fiber_job_t {
     int     prompt_set;\r
 \r
     BOOL    null_password;\r
+    BOOL    valid_principal;\r
 } fiber_job;\r
 \r
 extern fiber_job g_fjob;   /* global fiber job object */\r
index 35c19bdba16b6862199922d89f738a1e67e85c4b..c3355041dce0d8fbcab892e2a68c0a2ed31ec3fe 100644 (file)
@@ -97,5 +97,6 @@ SCLIB=
 $(EXEFILE): $(OBJFILES) $(RESFILES) $(LIBFILES)
        $(EXEGUILINK) $(SDKLIBFILES) $(SCLIB)
        $(_VC_MANIFEST_EMBED_EXE) $(MANIFESTFILE)
+       $(_VC_MANIFEST_CLEAN)
 
 all: mkdirs $(MANIFESTFILE) $(EXEFILE)
index da7abdfee37a1bc0769bfd8c603fca2adda3cec7..242b1c589082351073de9689db1f06632d132e39 100644 (file)
@@ -118,13 +118,14 @@ about_dlg_proc(HWND hwnd,
         return FALSE;\r
 \r
     case WM_DESTROY:\r
-        khm_leave_modal();\r
         khm_del_dialog(hwnd);\r
         return TRUE;\r
 \r
     case WM_COMMAND:\r
-        if (wParam == MAKEWPARAM(IDOK, BN_CLICKED))\r
+        if (wParam == MAKEWPARAM(IDOK, BN_CLICKED)) {\r
+            khm_leave_modal();\r
             DestroyWindow(hwnd);\r
+        }\r
         return TRUE;\r
     }\r
 \r
index 5059dba28b44d4ced7cb05b814dc711f836d210e..24f9a619c4eeffabd0aafc20d5bbac42dea09235 100644 (file)
@@ -581,7 +581,6 @@ cfgui_dlgproc(HWND hwnd,
         khui_delete_bitmap(&d->kbmp_logo);\r
         DeleteObject(d->hbr_white);\r
 \r
-        khm_leave_modal();\r
         khm_del_dialog(hwnd);\r
 \r
         SetForegroundWindow(khm_hwnd_main);\r
@@ -643,6 +642,7 @@ cfgui_dlgproc(HWND hwnd,
     case WM_COMMAND:\r
         switch(wParam) {\r
         case MAKEWPARAM(IDCANCEL, BN_CLICKED):\r
+            khm_leave_modal();\r
             DestroyWindow(hwnd);\r
             break;\r
 \r
@@ -652,6 +652,7 @@ cfgui_dlgproc(HWND hwnd,
 \r
         case MAKEWPARAM(IDOK, BN_CLICKED):\r
             cfgui_apply_settings(NULL);\r
+            khm_leave_modal();\r
             DestroyWindow(hwnd);\r
             break;\r
         }\r
index 5a795dd994c8ffaa7ddf66d185a3590604cf20db..93e7805755f2897c5fc999cab89e4c127ce2dc1a 100644 (file)
@@ -167,24 +167,15 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    LTEXT           "UI Row2",IDC_NC_TPL_ROW_LG,7,31,287,18,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
-    LTEXT           "TplPanel",IDC_NC_TPL_PANEL,7,7,287,153,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
-    LTEXT           "UI Row",IDC_NC_TPL_ROW,7,7,287,18,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
-    LTEXT           "TplLabel",IDC_NC_TPL_LABEL,7,8,45,10,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
-    LTEXT           "TplInput",IDC_NC_TPL_INPUT,54,7,240,13,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
-    LTEXT           "TplLabelLg",IDC_NC_TPL_LABEL_LG,7,33,146,10,NOT \r
-                    WS_VISIBLE | WS_BORDER\r
-    LTEXT           "TplInputLg",IDC_NC_TPL_INPUT_LG,155,31,139,13,NOT \r
-                    WS_VISIBLE | WS_BORDER\r
-    LTEXT           "&Credentials",IDC_NC_CREDTEXT_LABEL,7,66,41,10,NOT \r
-                    WS_GROUP\r
-    CONTROL         "",IDC_NC_CREDTEXT,"KhmHtWnd",WS_TABSTOP,54,65,240,73,\r
-                    WS_EX_CLIENTEDGE\r
+    LTEXT           "UI Row2",IDC_NC_TPL_ROW_LG,7,31,287,18,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "TplPanel",IDC_NC_TPL_PANEL,7,7,287,153,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "UI Row",IDC_NC_TPL_ROW,7,7,287,18,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "TplLabel",IDC_NC_TPL_LABEL,7,8,45,10,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "TplInput",IDC_NC_TPL_INPUT,54,7,240,13,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "TplLabelLg",IDC_NC_TPL_LABEL_LG,7,33,146,10,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "TplInputLg",IDC_NC_TPL_INPUT_LG,155,31,139,13,NOT WS_VISIBLE | WS_BORDER\r
+    LTEXT           "&Credentials",IDC_NC_CREDTEXT_LABEL,7,66,41,10,NOT WS_GROUP\r
+    CONTROL         "",IDC_NC_CREDTEXT,"KhmHtWnd",WS_TABSTOP,54,65,240,73,WS_EX_CLIENTEDGE\r
     PUSHBUTTON      "&Ok",IDOK,57,142,89,18,WS_DISABLED\r
     PUSHBUTTON      "&Cancel",IDCANCEL,158,142,54,18\r
     PUSHBUTTON      "&Options >>",IDC_NC_OPTIONS,223,142,71,18\r
@@ -214,18 +205,12 @@ CAPTION "Identity"
 FONT 8, "MS Shell Dlg", 0, 0, 0x0\r
 BEGIN\r
     LTEXT           "Name",IDC_STATIC,7,8,19,12\r
-    LTEXT           "IdentityName",IDC_PP_IDNAME,34,7,194,12,NOT WS_GROUP,\r
-                    WS_EX_CLIENTEDGE\r
-    CONTROL         "Default identity",IDC_PP_IDDEF,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,34,22,71,12\r
-    CONTROL         "Searchable",IDC_PP_IDSEARCH,"Button",BS_AUTOCHECKBOX | \r
-                    WS_DISABLED | WS_TABSTOP,117,36,74,12\r
-    CONTROL         "Custom1",IDC_PP_PROPLIST,"NetIDMgrPropertyWnd",\r
-                    WS_TABSTOP,7,51,221,80\r
-    CONTROL         "Always visible (sticky)",IDC_PP_STICKY,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,117,22,85,12\r
-    PUSHBUTTON      "Identity configuration ...",IDC_PP_CONFIG,117,135,111,\r
-                    14\r
+    LTEXT           "IdentityName",IDC_PP_IDNAME,34,7,194,12,NOT WS_GROUP,WS_EX_CLIENTEDGE\r
+    CONTROL         "Default identity",IDC_PP_IDDEF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,34,22,71,12\r
+    CONTROL         "Searchable",IDC_PP_IDSEARCH,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,117,36,74,12\r
+    CONTROL         "Custom1",IDC_PP_PROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,51,221,80\r
+    CONTROL         "Always visible (sticky)",IDC_PP_STICKY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,22,85,12\r
+    PUSHBUTTON      "Identity configuration ...",IDC_PP_CONFIG,117,135,111,14\r
 END\r
 \r
 IDD_PP_CRED DIALOGEX 0, 0, 236, 158\r
@@ -233,25 +218,19 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION
 CAPTION "Credential"\r
 FONT 8, "MS Shell Dlg", 0, 0, 0x0\r
 BEGIN\r
-    CONTROL         "Check1",IDC_PP_DUMMY,"Button",BS_AUTOCHECKBOX | NOT \r
-                    WS_VISIBLE | WS_TABSTOP,0,1,39,10\r
-    CONTROL         "Custom1",IDC_PP_CPROPLIST,"NetIDMgrPropertyWnd",\r
-                    WS_TABSTOP,7,7,222,144\r
+    CONTROL         "Check1",IDC_PP_DUMMY,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,0,1,39,10\r
+    CONTROL         "Custom1",IDC_PP_CPROPLIST,"NetIDMgrPropertyWnd",WS_TABSTOP,7,7,222,144\r
 END\r
 \r
 IDD_CFG_MAIN DIALOGEX 0, 0, 357, 222\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | \r
-    WS_SYSMENU\r
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
 EXSTYLE WS_EX_CONTEXTHELP\r
 CAPTION "NetIDMgr Configuration"\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     LTEXT           "Title",IDC_CFG_TITLE,0,0,357,20,SS_CENTERIMAGE\r
-    CONTROL         "",IDC_CFG_NODELIST,"SysTreeView32",TVS_HASBUTTONS | \r
-                    TVS_HASLINES | TVS_LINESATROOT | TVS_TRACKSELECT | \r
-                    WS_TABSTOP | 0x800,0,20,100,182\r
-    LTEXT           "Static",IDC_CFG_PANE,102,20,255,182,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
+    CONTROL         "",IDC_CFG_NODELIST,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_TRACKSELECT | WS_TABSTOP | 0x800,0,20,100,182\r
+    LTEXT           "Static",IDC_CFG_PANE,102,20,255,182,NOT WS_VISIBLE | WS_BORDER\r
     PUSHBUTTON      "&Ok",IDOK,162,205,78,16\r
     PUSHBUTTON      "&Cancel",IDCANCEL,246,205,51,16\r
     PUSHBUTTON      "&Apply",IDAPPLY,303,205,51,16,WS_DISABLED\r
@@ -261,8 +240,7 @@ IDD_CFG_GENERIC DIALOGEX 0, 0, 255, 182
 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CTEXT           "Please select one of the configuration categories on the left.",\r
-                    IDC_STATIC,21,17,212,18,SS_CENTERIMAGE,WS_EX_TRANSPARENT\r
+    CTEXT           "Please select one of the configuration categories on the left.",IDC_STATIC,21,17,212,18,SS_CENTERIMAGE,WS_EX_TRANSPARENT\r
 END\r
 \r
 IDD_CFG_GENERAL DIALOGEX 0, 0, 255, 182\r
@@ -270,29 +248,22 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     GROUPBOX        "Startup / Shutdown",IDC_CFG_STARTUP_GROUP,7,7,241,50\r
-    CONTROL         "&Obtain new credentials at startup (if none are present)",\r
-                    IDC_CFG_AUTOINIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,\r
-                    16,22,196,10\r
+    CONTROL         "&Obtain new credentials at startup (if none are present)",IDC_CFG_AUTOINIT,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,22,196,10\r
     CONTROL         "&Destroy all credentials on exit",IDC_CFG_DESTROYALL,\r
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,39,111,10\r
     CONTROL         "&Start NetIDMgr during Windows logon",IDC_CFG_AUTOSTART,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | \r
-                    WS_TABSTOP,16,48,135,10\r
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,16,48,135,10\r
     GROUPBOX        "Other",IDC_CFG_OTHER,7,63,241,85\r
-    CONTROL         "&Run NetIDMgr in system tray after window close",\r
-                    IDC_CFG_KEEPRUNNING,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,16,78,170,10\r
-    CONTROL         "Monitor network connectivity",IDC_CFG_NETDETECT,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,16,96,106,10\r
-    CONTROL         "Log trace events to trace log at the following location:",\r
-                    IDC_CFG_LOGTOFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,\r
-                    16,113,225,10\r
-    EDITTEXT        IDC_CFG_LOGPATH,16,127,173,14,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    CONTROL         "&Run NetIDMgr in system tray after window close",IDC_CFG_KEEPRUNNING,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,78,170,10\r
+    CONTROL         "Monitor network connectivity",IDC_CFG_NETDETECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,96,106,10\r
+    CONTROL         "Log trace events to trace log at the following location:",IDC_CFG_LOGTOFILE,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,113,225,10\r
+    EDITTEXT        IDC_CFG_LOGPATH,16,127,173,14,ES_AUTOHSCROLL | ES_READONLY\r
     PUSHBUTTON      "Show log ...",IDC_CFG_SHOWLOG,193,127,50,14\r
-    CONTROL         "A&utomatically import Windows logon identity",\r
-                    IDC_CFG_AUTOIMPORT,"Button",BS_AUTOCHECKBOX | NOT \r
-                    WS_VISIBLE | WS_TABSTOP,16,158,165,10\r
+    CONTROL         "A&utomatically import Windows logon identity",IDC_CFG_AUTOIMPORT,\r
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,16,158,165,10\r
 END\r
 \r
 IDD_CFG_IDENTITIES DIALOGEX 0, 0, 255, 182\r
@@ -301,8 +272,7 @@ EXSTYLE WS_EX_CONTROLPARENT
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168\r
-    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
+    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER\r
 END\r
 \r
 IDD_CFG_NOTIF DIALOGEX 0, 0, 255, 182\r
@@ -310,21 +280,16 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "&Renew automatically at",IDC_NOTIF_RENEW,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,9,100,10\r
+    CONTROL         "&Renew automatically at",IDC_NOTIF_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,9,100,10\r
     EDITTEXT        IDC_NOTIF_RENEW_THR,122,7,126,14,ES_AUTOHSCROLL\r
-    CONTROL         "Renew at &half life intervals when possible",\r
-                    IDC_NOTIF_HALFLIFE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,\r
-                    48,27,148,10\r
-    CONTROL         "Initial warning at",IDC_NOTIF_WARN1,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,46,100,10\r
+    CONTROL         "Renew at &half life intervals when possible",IDC_NOTIF_HALFLIFE,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,48,27,148,10\r
+    CONTROL         "Initial warning at",IDC_NOTIF_WARN1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,46,100,10\r
     EDITTEXT        IDC_NOTIF_WARN1_THR,122,44,126,14,ES_AUTOHSCROLL\r
-    CONTROL         "Final warning at",IDC_NOTIF_WARN2,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,68,100,10\r
+    CONTROL         "Final warning at",IDC_NOTIF_WARN2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,68,100,10\r
     EDITTEXT        IDC_NOTIF_WARN2_THR,122,66,126,14,ES_AUTOHSCROLL\r
     CONTROL         "&Monitor credential expiration",IDC_NOTIF_MONITOR,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,\r
-                    103,139,10\r
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,103,139,10\r
 END\r
 \r
 IDD_CFG_PLUGINS DIALOGEX 0, 0, 255, 182\r
@@ -332,33 +297,23 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "",IDC_CFG_PLUGINS,"SysListView32",LVS_REPORT | \r
-                    LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | \r
-                    WS_TABSTOP,7,7,75,168\r
+    CONTROL         "",IDC_CFG_PLUGINS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,75,168\r
     ICON            IDI_CFG_PLUGIN,IDC_CFG_ICON,87,11,20,20\r
-    EDITTEXT        IDC_CFG_DESC,128,7,120,30,ES_MULTILINE | ES_AUTOVSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_DESC,128,7,120,30,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY\r
     LTEXT           "&Module",IDC_CFG_LBL_MOD,87,43,24,8\r
-    EDITTEXT        IDC_CFG_MODULE,128,43,120,12,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_MODULE,128,43,120,12,ES_AUTOHSCROLL | ES_READONLY\r
     LTEXT           "&Version",IDC_STATIC,87,59,24,8\r
-    EDITTEXT        IDC_CFG_VERSION,128,59,120,12,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_VERSION,128,59,120,12,ES_AUTOHSCROLL | ES_READONLY\r
     LTEXT           "Ve&ndor",IDC_CFG_LBL_VEN,87,75,24,8\r
-    EDITTEXT        IDC_CFG_VENDOR,128,75,120,12,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_VENDOR,128,75,120,12,ES_AUTOHSCROLL | ES_READONLY\r
     LTEXT           "De&pends on",IDC_CFG_LBL_DEPS,87,93,39,8\r
-    LISTBOX         IDC_CFG_DEPS,128,93,120,34,LBS_SORT | \r
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP\r
+    LISTBOX         IDC_CFG_DEPS,128,93,120,34,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP\r
     LTEXT           "&Status",IDC_CFG_LBL_STATE,87,129,22,8\r
-    EDITTEXT        IDC_CFG_STATE,128,129,120,12,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_STATE,128,129,120,12,ES_AUTOHSCROLL | ES_READONLY\r
     PUSHBUTTON      "&Enable ...",IDC_CFG_ENABLE,128,144,50,14,WS_DISABLED\r
     PUSHBUTTON      "&Disable ...",IDC_CFG_DISABLE,198,144,50,14,WS_DISABLED\r
-    PUSHBUTTON      "&Unregister plugin ...",IDC_CFG_UNREGISTER,87,161,72,14,\r
-                    WS_DISABLED\r
-    PUSHBUTTON      "&Register new plugin ...",IDC_CFG_REGISTER,169,161,79,\r
-                    14,NOT WS_VISIBLE | WS_DISABLED\r
+    PUSHBUTTON      "&Unregister plugin ...",IDC_CFG_UNREGISTER,87,161,72,14,WS_DISABLED\r
+    PUSHBUTTON      "&Register new plugin ...",IDC_CFG_REGISTER,169,161,79,14,NOT WS_VISIBLE | WS_DISABLED\r
 END\r
 \r
 IDD_CFG_IDENTITY DIALOGEX 0, 0, 255, 182\r
@@ -367,8 +322,7 @@ EXSTYLE WS_EX_CONTROLPARENT
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     CONTROL         "",IDC_CFG_TAB,"SysTabControl32",WS_TABSTOP,7,7,241,168\r
-    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | \r
-                    WS_BORDER\r
+    LTEXT           "Static",IDC_CFG_TARGET,10,21,235,151,NOT WS_VISIBLE | WS_BORDER\r
 END\r
 \r
 IDD_CFG_IDS_TAB DIALOGEX 0, 0, 235, 151\r
@@ -376,13 +330,10 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
-    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
-    CONTROL         "Always show in the credentials list (Pinned)",\r
-                    IDC_CFG_STICKY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,\r
-                    34,151,10\r
+    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
+    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
+    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10\r
     PUSHBUTTON      "&Add new identity...",IDC_CFG_ADDIDENT,17,120,86,14\r
 END\r
 \r
@@ -391,30 +342,24 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "Always show in the credentials list (Pinned)",\r
-                    IDC_CFG_STICKY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,\r
-                    34,151,10\r
-    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
-    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
+    CONTROL         "Always show in the credentials list (Pinned)",IDC_CFG_STICKY,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,151,10\r
+    CONTROL         "Monitor credential expiration",IDC_CFG_MONITOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,107,10\r
+    CONTROL         "Automatically renew",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,20,81,10\r
     PUSHBUTTON      "Remove identity ...",IDC_CFG_REMOVE,139,122,78,14\r
 END\r
 \r
 IDD_ABOUT DIALOGEX 0, 0, 268, 170\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | \r
-    WS_SYSMENU\r
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
 CAPTION "About Network Identity Manager"\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     DEFPUSHBUTTON   "OK",IDOK,211,7,50,14\r
     LTEXT           "Productname",IDC_PRODUCT,41,7,163,13,NOT WS_GROUP\r
-    LTEXT           "© 2005 Massachusetts Institute of Technology",\r
-                    IDC_COPYRIGHT,41,23,220,18,NOT WS_GROUP\r
+    LTEXT           "© 2005 Massachusetts Institute of Technology",IDC_COPYRIGHT,41,23,220,18,NOT WS_GROUP\r
     LTEXT           "BuildInfo",IDC_BUILDINFO,41,41,220,17,NOT WS_GROUP\r
     ICON            IDI_MAIN_APP,IDC_STATIC,6,7,21,20\r
-    CONTROL         "",IDC_MODULES,"SysListView32",LVS_REPORT | \r
-                    LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,41,72,220,91\r
+    CONTROL         "",IDC_MODULES,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,41,72,220,91\r
     LTEXT           "Loaded modules",IDC_STATIC,41,60,52,8\r
 END\r
 \r
@@ -425,27 +370,18 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN\r
     GROUPBOX        "Font for credentials display",IDC_STATIC,7,7,241,137\r
     LTEXT           "&Font name",IDC_STATIC,17,22,35,8\r
-    COMBOBOX        IDC_CFG_FONTS,62,20,178,30,CBS_DROPDOWNLIST | CBS_SORT | \r
-                    WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_CFG_FONTS,62,20,178,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
     LTEXT           "&Size",IDC_STATIC,62,43,14,8\r
-    COMBOBOX        IDC_CFG_SIZE,87,41,48,14,CBS_DROPDOWNLIST | WS_VSCROLL | \r
-                    WS_TABSTOP\r
-    CONTROL         "&Bold",IDC_CFG_BOLD,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,162,42,29,10\r
-    CONTROL         "&Italics",IDC_CFG_ITALICS,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,205,42,35,10\r
-    EDITTEXT        IDC_CFG_SAMPLE_NORMAL,62,66,178,21,ES_AUTOHSCROLL | \r
-                    ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,\r
-                    WS_EX_STATICEDGE\r
-    EDITTEXT        IDC_CFG_SAMPLE_BOLD,62,91,178,21,ES_AUTOHSCROLL | \r
-                    ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,\r
-                    WS_EX_STATICEDGE\r
+    COMBOBOX        IDC_CFG_SIZE,87,41,48,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+    CONTROL         "&Bold",IDC_CFG_BOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,42,29,10\r
+    CONTROL         "&Italics",IDC_CFG_ITALICS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,205,42,35,10\r
+    EDITTEXT        IDC_CFG_SAMPLE_NORMAL,62,66,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE\r
+    EDITTEXT        IDC_CFG_SAMPLE_BOLD,62,91,178,21,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE\r
     PUSHBUTTON      "&Revert to default",IDC_CFG_REVERT,168,122,72,14\r
 END\r
 \r
 IDD_CFG_ADDIDENT DIALOGEX 0, 0, 325, 70\r
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | \r
-    WS_SYSMENU\r
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU\r
 CAPTION "Add new identity"\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
@@ -631,7 +567,7 @@ BEGIN
     IDS_ACTION_PASSWD_ID    "Change &password ..."\r
     IDS_ACTION_CHOOSE_COLS  "View columns"\r
     IDS_ACTION_DEBUG_WINDOW "Debug window ..."\r
-    IDS_ACTION_VIEW_REFRESH "Refresh"\r
+    IDS_ACTION_VIEW_REFRESH "Refresh view"\r
     IDS_MENU_LAYOUT         "Layout"\r
     IDS_MENU_TOOLBARS       "Toolbars"\r
 END\r
@@ -645,7 +581,7 @@ BEGIN
     IDS_ACTION_OPT_KHIM     "General ..."\r
     IDS_ACTION_OPT_IDENTS   "Identities ..."\r
     IDS_ACTION_OPT_NOTIF    "Notifications ..."\r
-    IDS_ACTION_HELP_CTX     "Context"\r
+    IDS_ACTION_HELP_CTX     "Help Index"\r
     IDS_ACTION_HELP_CONTENTS "Contents ..."\r
     IDS_ACTION_HELP_INDEX   "Index ..."\r
     IDS_ACTION_HELP_ABOUT   "About NetIDMgr ..."\r
@@ -814,6 +750,26 @@ BEGIN
     IDS_CFG_IDNAME_CCC      "Can't create identity configuration.  This may be caused by lack or resources or not having the correct permissions to create the configuration space.  The code returned was %d."\r
     IDS_CFG_LOGF_CS         "Can't show log file"\r
     IDS_CFG_LOGF_CSR        "The log file %s does not exist."\r
+    IDS_ACTIONT_PROPERTIES  "Show properties for the current selection"\r
+END\r
+\r
+STRINGTABLE \r
+BEGIN\r
+    IDS_ACTIONT_EXIT        "Exit Network Identity Manager"\r
+    IDS_ACTIONT_SET_DEF_ID  "Set the currently selected identity as the default identity"\r
+    IDS_ACTIONT_PASSWD_ID   "Change the password the currently selected identity"\r
+    IDS_ACTIONT_NEW_CRED    "Obtain new credentials"\r
+    IDS_ACTIONT_RENEW_CRED  "Renew or re-obtain credentials for the currently selected identity"\r
+    IDS_ACTIONT_DESTROY_CRED "Destroy the selected credentials or identities"\r
+    IDS_ACTIONT_VIEW_REFRESH \r
+                            "Re-obtain information about credentials and refresh the credentials display"\r
+    IDS_ACTIONT_OPT_IDENTS  "Change options for identities"\r
+    IDS_ACTIONT_OPT_KHIM    "Change general application settings for NetIDMgr"\r
+    IDS_ACTIONT_OPT_NOTIF   "Change notification options"\r
+    IDS_ACTIONT_OPT_PLUGINS "Change options for plug-ins and modules"\r
+    IDS_ACTIONT_OPT_APPEAR  "Change appearance and display settings"\r
+    IDS_ACTIONT_HELP_CTX    "Display user documentation"\r
+    IDS_ACTIONT_IMPORT      "Import credentials from external sources such as the Windows LSA"\r
 END\r
 \r
 #endif    // English (U.S.) resources\r
index cad5dc5667db1c0f41dbb97796b6df0d14cc08e4..ad39de7eeb8bb8d875e75a18a2d736b9162dca45 100644 (file)
@@ -226,8 +226,10 @@ void khm_leave_modal(void) {
     }\r
 \r
     EnableWindow(khm_hwnd_main, TRUE);\r
+#if 0\r
     if (khui_main_window_active)\r
         SetForegroundWindow(khm_hwnd_main);\r
+#endif\r
 \r
     khui_modal_dialog = NULL;\r
 }\r
index e263f7c87ebc20b720f747ea53c7abff21fb1656..39e670179c0830e4a7d3f932ed01522e1f1c4b32 100644 (file)
@@ -466,16 +466,18 @@ nc_update_credtext(khui_nc_wnd_data * d)
         }\r
     }\r
 \r
-    if(validId || d->nc->subtype == KMSG_CRED_PASSWORD) {\r
-        /* TODO: check if all the required fields have valid values\r
-           before enabling the Ok button */\r
-        okEnable = TRUE;\r
-    }\r
+    if (!(d->nc->response & KHUI_NC_RESPONSE_PROCESSING)) {\r
+        if(validId || d->nc->subtype == KMSG_CRED_PASSWORD) {\r
+            /* TODO: check if all the required fields have valid values\r
+               before enabling the Ok button */\r
+            okEnable = TRUE;\r
+        }\r
 \r
-    hw = GetDlgItem(d->dlg_main, IDOK);\r
-    EnableWindow(hw, okEnable);\r
-    hw = GetDlgItem(d->dlg_bb, IDOK);\r
-    EnableWindow(hw, okEnable);\r
+        hw = GetDlgItem(d->dlg_main, IDOK);\r
+        EnableWindow(hw, okEnable);\r
+        hw = GetDlgItem(d->dlg_bb, IDOK);\r
+        EnableWindow(hw, okEnable);\r
+    }\r
 }\r
 \r
 #define CW_PARAM DWLP_USER\r
@@ -908,7 +910,7 @@ nc_handle_wm_command(HWND hwnd,
         case IDCANCEL:\r
             /* the default value for d->nc->result is set to\r
                KHUI_NC_RESULT_CANCEL */\r
-            d->nc->response = 0;\r
+            d->nc->response = KHUI_NC_RESPONSE_PROCESSING;\r
 \r
             nc_notify_types(d->nc, \r
                             KHUI_WM_NC_NOTIFY, \r
@@ -1640,6 +1642,8 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
 \r
             nc = d->nc;\r
 \r
+            nc->response &= ~KHUI_NC_RESPONSE_PROCESSING;\r
+\r
             if(nc->response & KHUI_NC_RESPONSE_NOEXIT) {\r
                 HWND hw;\r
 \r
index 77e9dcee1ba70d4eec61c1da485762317bcfe572..49fcf70e451042179417337537e95a6f9d17f67b 100644 (file)
 #define IDS_CFG_IDNAME_CCC              268\r
 #define IDS_CFG_LOGF_CS                 269\r
 #define IDS_CFG_LOGF_CSR                270\r
+#define IDS_ACTIONT_PROPERTIES          271\r
+#define IDS_ACTIONT_EXIT                272\r
+#define IDS_ACTIONT_SET_DEF_ID          273\r
+#define IDS_ACTIONT_PASSWD_ID           274\r
+#define IDS_ACTIONT_NEW_CRED            275\r
+#define IDS_ACTIONT_RENEW_CRED          276\r
+#define IDS_ACTIONT_DESTROY_CRED        277\r
+#define IDS_ACTIONT_VIEW_REFRESH        278\r
+#define IDS_ACTIONT_OPT_IDENTS          279\r
+#define IDS_ACTIONT_OPT_KHIM            280\r
+#define IDS_ACTIONT_OPT_NOTIF           281\r
+#define IDS_ACTIONT_OPT_PLUGINS         282\r
+#define IDS_ACTIONT_OPT_APPEAR          283\r
+#define IDS_ACTIONT_HELP_CTX            284\r
+#define IDS_ACTIONT_IMPORT              285\r
 #define IDC_NC_USERNAME                 1007\r
 #define IDC_NC_PASSWORD                 1008\r
 #define IDC_NC_CREDTEXT_LABEL           1009\r
index 801d6cc52caf246278cde58f31f6cf5333a7d263..7157563e4aeb1f4fec15d2c447a7459a23d88004 100644 (file)
@@ -42,72 +42,135 @@ void khui_exit_toolbar(void) {
 \r
 LRESULT khm_toolbar_notify(LPNMHDR notice) {\r
     switch(notice->code) {\r
-        case NM_CUSTOMDRAW:\r
-            {\r
-                LPNMTBCUSTOMDRAW nmcd = (LPNMTBCUSTOMDRAW) notice;\r
-                if(nmcd->nmcd.dwDrawStage == CDDS_PREPAINT) {\r
-                    return CDRF_NOTIFYITEMDRAW | CDRF_NOTIFYPOSTERASE;\r
-                } else if(nmcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT) {\r
-                    return CDRF_NOTIFYPOSTPAINT;\r
-                } else if(nmcd->nmcd.dwDrawStage == CDDS_ITEMPOSTPAINT) {\r
-                    /* draw the actual icon */\r
-                    int iidx;\r
-                    int ibmp;\r
-                    HBITMAP hbmp;\r
-                    RECT r;\r
-\r
-                    khui_action * act = \r
-                        khui_find_action((int) nmcd->nmcd.dwItemSpec);\r
-\r
-                    if(!act || !act->ib_normal)\r
-                        return CDRF_DODEFAULT;\r
-\r
-                    if((act->state & KHUI_ACTIONSTATE_DISABLED) && \r
-                       act->ib_disabled) {\r
-                        ibmp = act->ib_disabled;\r
-                    } else if(act->ib_hot && \r
-                              ((nmcd->nmcd.uItemState & CDIS_HOT) || \r
-                               (nmcd->nmcd.uItemState & CDIS_SELECTED))){\r
-                        ibmp = act->ib_hot;\r
-                    } else {\r
-                        ibmp = act->ib_normal;\r
-                    }\r
-\r
-                    iidx = khui_ilist_lookup_id(ilist_toolbar, ibmp);\r
-                    if(iidx < 0) {\r
-                        hbmp = LoadImage(khm_hInstance, \r
-                                         MAKEINTRESOURCE(ibmp), \r
-                                         IMAGE_BITMAP, \r
-                                         KHUI_TOOLBAR_IMAGE_WIDTH, \r
-                                         KHUI_TOOLBAR_IMAGE_HEIGHT, 0);\r
-                        iidx = \r
-                            khui_ilist_add_masked_id(ilist_toolbar, \r
-                                                     hbmp, \r
-                                                     KHUI_TOOLBAR_BGCOLOR, \r
-                                                     ibmp);\r
-                        DeleteObject(hbmp);\r
+    case TBN_GETINFOTIP:\r
+        {\r
+            LPNMTBGETINFOTIP git = (LPNMTBGETINFOTIP) notice;\r
+            int cmd;\r
+            khui_action * a;\r
+\r
+            cmd = git->iItem;\r
+            a = khui_find_action(cmd);\r
+\r
+            if (a) {\r
+                if (a->caption) {\r
+                    StringCchCopy(git->pszText, git->cchTextMax, a->caption);\r
+                } else if (a->tooltip) {\r
+                    StringCchCopy(git->pszText, git->cchTextMax, a->tooltip);\r
+                } else if (a->is_caption) {\r
+                    wchar_t buf[INFOTIPSIZE];\r
+\r
+                    buf[0] = L'\0';\r
+                    LoadString(khm_hInstance, a->is_caption,\r
+                               buf, ARRAYLENGTH(buf));\r
+\r
+                    StringCchCopy(git->pszText, git->cchTextMax, buf);\r
+                } else {\r
+                    StringCchCopy(git->pszText, git->cchTextMax, L"");\r
+                }\r
+            } else {\r
+                StringCchCopy(git->pszText,\r
+                              git->cchTextMax,\r
+                              L"");\r
+            }\r
+        }\r
+        break;\r
+\r
+    case TBN_HOTITEMCHANGE:\r
+        {\r
+            LPNMTBHOTITEM hi = (LPNMTBHOTITEM) notice;\r
+\r
+            if (hi->dwFlags & HICF_LEAVING) {\r
+                khm_statusbar_set_part(KHUI_SBPART_INFO, NULL, L"");\r
+            } else {\r
+                khui_action * a;\r
+                int cmd;\r
+                wchar_t buf[256];\r
+\r
+                cmd = hi->idNew;\r
+                a = khui_find_action(cmd);\r
+\r
+                buf[0] = L'\0';\r
+\r
+                if (a) {\r
+                    if (a->tooltip)\r
+                        StringCbCopy(buf, sizeof(buf), a->tooltip);\r
+                    else if (a->is_tooltip) {\r
+                        LoadString(khm_hInstance, a->is_tooltip,\r
+                                   buf, ARRAYLENGTH(buf));\r
                     }\r
+                }\r
 \r
-                    if(iidx < 0)\r
-                        return CDRF_DODEFAULT;\r
+                khm_statusbar_set_part(KHUI_SBPART_INFO, NULL, buf);\r
+            }\r
+        }\r
+        break;\r
+\r
+    case NM_CUSTOMDRAW:\r
+        {\r
+            LPNMTBCUSTOMDRAW nmcd = (LPNMTBCUSTOMDRAW) notice;\r
+            if(nmcd->nmcd.dwDrawStage == CDDS_PREPAINT) {\r
+                return CDRF_NOTIFYITEMDRAW | CDRF_NOTIFYPOSTERASE;\r
+            } else if(nmcd->nmcd.dwDrawStage == CDDS_ITEMPREPAINT) {\r
+                return CDRF_NOTIFYPOSTPAINT;\r
+            } else if(nmcd->nmcd.dwDrawStage == CDDS_ITEMPOSTPAINT) {\r
+                /* draw the actual icon */\r
+                int iidx;\r
+                int ibmp;\r
+                HBITMAP hbmp;\r
+                RECT r;\r
+\r
+                khui_action * act = \r
+                    khui_find_action((int) nmcd->nmcd.dwItemSpec);\r
+\r
+                if(!act || !act->ib_normal)\r
+                    return CDRF_DODEFAULT;\r
 \r
-                    CopyRect(&r, &(nmcd->nmcd.rc));\r
-                    r.left += ((r.right - r.left) - \r
-                               KHUI_TOOLBAR_IMAGE_WIDTH) / 2;\r
-                    r.top += ((r.bottom - r.top) -\r
-                              KHUI_TOOLBAR_IMAGE_HEIGHT) / 2;\r
+                if((act->state & KHUI_ACTIONSTATE_DISABLED) && \r
+                   act->ib_disabled) {\r
+                    ibmp = act->ib_disabled;\r
+                } else if(act->ib_hot && \r
+                          ((nmcd->nmcd.uItemState & CDIS_HOT) || \r
+                           (nmcd->nmcd.uItemState & CDIS_SELECTED))){\r
+                    ibmp = act->ib_hot;\r
+                } else {\r
+                    ibmp = act->ib_normal;\r
+                }\r
 \r
-                    khui_ilist_draw(ilist_toolbar, \r
-                                    iidx, \r
-                                    nmcd->nmcd.hdc, \r
-                                    r.left,\r
-                                    r.top, \r
-                                    0);\r
+                iidx = khui_ilist_lookup_id(ilist_toolbar, ibmp);\r
+                if(iidx < 0) {\r
+                    hbmp = LoadImage(khm_hInstance, \r
+                                     MAKEINTRESOURCE(ibmp), \r
+                                     IMAGE_BITMAP, \r
+                                     KHUI_TOOLBAR_IMAGE_WIDTH, \r
+                                     KHUI_TOOLBAR_IMAGE_HEIGHT, 0);\r
+                    iidx = \r
+                        khui_ilist_add_masked_id(ilist_toolbar, \r
+                                                 hbmp, \r
+                                                 KHUI_TOOLBAR_BGCOLOR, \r
+                                                 ibmp);\r
+                    DeleteObject(hbmp);\r
+                }\r
 \r
+                if(iidx < 0)\r
                     return CDRF_DODEFAULT;\r
-                }\r
+\r
+                CopyRect(&r, &(nmcd->nmcd.rc));\r
+                r.left += ((r.right - r.left) - \r
+                           KHUI_TOOLBAR_IMAGE_WIDTH) / 2;\r
+                r.top += ((r.bottom - r.top) -\r
+                          KHUI_TOOLBAR_IMAGE_HEIGHT) / 2;\r
+                \r
+                khui_ilist_draw(ilist_toolbar, \r
+                                iidx, \r
+                                nmcd->nmcd.hdc, \r
+                                r.left,\r
+                                r.top, \r
+                                0);\r
+\r
+                return CDRF_DODEFAULT;\r
             }\r
-            break;\r
+        }\r
+        break;\r
     }\r
     return 0;\r
 }\r
@@ -246,6 +309,14 @@ void khm_create_standard_toolbar(HWND rebar) {
 \r
     def = khui_find_menu(KHUI_TOOLBAR_STANDARD);\r
 \r
+    if (!def) {\r
+#ifdef DEBUG\r
+        assert(FALSE);\r
+#else\r
+        return;\r
+#endif\r
+    }\r
+\r
     hwtb = CreateWindowEx(0\r
 #if (_WIN32_IE >= 0x0501)\r
                           | TBSTYLE_EX_MIXEDBUTTONS\r
@@ -257,6 +328,7 @@ void khm_create_standard_toolbar(HWND rebar) {
                           TBSTYLE_FLAT |\r
                           TBSTYLE_AUTOSIZE | \r
                           TBSTYLE_LIST |\r
+                          TBSTYLE_TOOLTIPS |\r
                           CCS_NORESIZE | \r
                           CCS_NOPARENTALIGN |\r
                           CCS_ADJUSTABLE |\r
index 5549776678ca3ea6cf8dba52de9d69989eda93ff..50c19d4f5db8be8bf78d7bd810535a613a670d00 100644 (file)
@@ -7,33 +7,33 @@ KHUI_MENU_HELP,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_MENU_HELP,0,IDH_MENU_HELP,
 KHUI_MENU_LAYOUT,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_MENU_LAYOUT,0,0,0\r
 KHUI_MENU_TOOLBARS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_MENU_TOOLBARS,0,0,0\r
 KHUI_MENU_COLUMNS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_CHOOSE_COLS,0,IDH_ACTION_CHOOSE_COLS,0\r
-KHUI_ACTION_PROPERTIES,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_PROPERTIES,0,IDH_ACTION_PROPERTIES,0\r
-KHUI_ACTION_EXIT,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_EXIT,0,IDH_ACTION_EXIT,0\r
-KHUI_ACTION_SET_DEF_ID,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_SET_DEF_ID,0,IDH_ACTION_SET_DEF_ID,0\r
+KHUI_ACTION_PROPERTIES,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_PROPERTIES,IDS_ACTIONT_PROPERTIES,IDH_ACTION_PROPERTIES,0\r
+KHUI_ACTION_EXIT,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_EXIT,IDS_ACTIONT_EXIT,IDH_ACTION_EXIT,0\r
+KHUI_ACTION_SET_DEF_ID,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_SET_DEF_ID,IDS_ACTIONT_SET_DEF_ID,IDH_ACTION_SET_DEF_ID,0\r
 KHUI_ACTION_SET_SRCH_ID,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_SET_SRCH_ID,0,IDH_ACTION_SET_SRCH_ID,KHUI_ACTIONSTATE_DISABLED\r
-KHUI_ACTION_PASSWD_ID,KHUI_ACTIONTYPE_TRIGGER,,IDB_CHPW,0,IDB_CHPW_DIS,IDB_CHPW_SM,IDB_CHPW_DIS_SM,IDS_ACTION_PASSWD_ID,0,IDH_ACTION_PASSWD_ID,0\r
-KHUI_ACTION_NEW_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_NEW,0,IDB_TK_NEW_DIS,IDB_TK_NEW_SM,IDB_TK_NEW_DIS_SM,IDS_ACTION_NEW_CRED,0,IDH_ACTION_NEW_CRED,0\r
-KHUI_ACTION_RENEW_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_REFRESH,0,IDB_TK_REFRESH_DIS,IDB_TK_REFRESH_SM,IDB_TK_REFRESH_DIS_SM,IDS_ACTION_RENEW_CRED,0,0,0\r
-KHUI_ACTION_DESTROY_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_DELETE,0,IDB_TK_DELETE_DIS,IDB_TK_DELETE_SM,IDB_TK_DELETE_DIS_SM,IDS_ACTION_DESTROY_CRED,0,0,0\r
+KHUI_ACTION_PASSWD_ID,KHUI_ACTIONTYPE_TRIGGER,,IDB_CHPW,0,IDB_CHPW_DIS,IDB_CHPW_SM,IDB_CHPW_DIS_SM,IDS_ACTION_PASSWD_ID,IDS_ACTIONT_PASSWD_ID,IDH_ACTION_PASSWD_ID,0\r
+KHUI_ACTION_NEW_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_NEW,0,IDB_TK_NEW_DIS,IDB_TK_NEW_SM,IDB_TK_NEW_DIS_SM,IDS_ACTION_NEW_CRED,IDS_ACTIONT_NEW_CRED,IDH_ACTION_NEW_CRED,0\r
+KHUI_ACTION_RENEW_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_REFRESH,0,IDB_TK_REFRESH_DIS,IDB_TK_REFRESH_SM,IDB_TK_REFRESH_DIS_SM,IDS_ACTION_RENEW_CRED,IDS_ACTIONT_RENEW_CRED,0,0\r
+KHUI_ACTION_DESTROY_CRED,KHUI_ACTIONTYPE_TRIGGER,,IDB_TK_DELETE,0,IDB_TK_DELETE_DIS,IDB_TK_DELETE_SM,IDB_TK_DELETE_DIS_SM,IDS_ACTION_DESTROY_CRED,IDS_ACTIONT_DESTROY_CRED,0,0\r
 KHUI_ACTION_LAYOUT_ID,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_ID,0,0,KHUI_ACTIONSTATE_CHECKED\r
 KHUI_ACTION_LAYOUT_TYPE,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_TYPE,0,0,0\r
 KHUI_ACTION_LAYOUT_LOC,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_LOC,0,0,0\r
 KHUI_ACTION_LAYOUT_CUST,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_LAYOUT_CUST,0,0,0\r
 KHUI_ACTION_TB_STANDARD,KHUI_ACTIONTYPE_TRIGGER | KHUI_ACTIONTYPE_TOGGLE,,0,0,0,0,0,IDS_ACTION_TB_STANDARD,0,0,KHUI_ACTIONSTATE_CHECKED|KHUI_ACTIONSTATE_DISABLED\r
 KHUI_ACTION_DEBUG_WINDOW,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_DEBUG_WINDOW,0,IDH_ACTION_DEBUG_WINDOW,KHUI_ACTIONSTATE_DISABLED\r
-KHUI_ACTION_VIEW_REFRESH,KHUI_ACTIONTYPE_TRIGGER,,IDB_VW_REFRESH,0,0,IDB_VW_REFRESH_SM,0,IDS_ACTION_VIEW_REFRESH,0,IDH_ACTION_VIEW_REFRESH,0\r
-KHUI_ACTION_OPT_IDENTS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_IDENTS,0,IDH_ACTION_OPT_INIT,0\r
-KHUI_ACTION_OPT_KHIM,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_KHIM,0,IDH_ACTION_OPT_KHIM,0\r
-KHUI_ACTION_OPT_NOTIF,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_NOTIF,0,IDH_ACTION_OPT_NOTIF,0\r
-KHUI_ACTION_OPT_PLUGINS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_PLUGINS,0,IDH_ACTION_OPT_KHIM,0\r
-KHUI_ACTION_OPT_APPEAR,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_APPEAR,0,0,0\r
-KHUI_ACTION_HELP_CTX,KHUI_ACTIONTYPE_TRIGGER,,IDB_HELP,0,0,IDB_HELP_SM,0,IDS_ACTION_HELP_CTX,0,0,0\r
+KHUI_ACTION_VIEW_REFRESH,KHUI_ACTIONTYPE_TRIGGER,,IDB_VW_REFRESH,0,0,IDB_VW_REFRESH_SM,0,IDS_ACTION_VIEW_REFRESH,IDS_ACTIONT_VIEW_REFRESH,IDH_ACTION_VIEW_REFRESH,0\r
+KHUI_ACTION_OPT_IDENTS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_IDENTS,IDS_ACTIONT_OPT_IDENTS,IDH_ACTION_OPT_INIT,0\r
+KHUI_ACTION_OPT_KHIM,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_KHIM,IDS_ACTIONT_OPT_KHIM,IDH_ACTION_OPT_KHIM,0\r
+KHUI_ACTION_OPT_NOTIF,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_NOTIF,IDS_ACTIONT_OPT_NOTIF,IDH_ACTION_OPT_NOTIF,0\r
+KHUI_ACTION_OPT_PLUGINS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_PLUGINS,IDS_ACTIONT_OPT_PLUGINS,IDH_ACTION_OPT_KHIM,0\r
+KHUI_ACTION_OPT_APPEAR,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPT_APPEAR,IDS_ACTIONT_OPT_APPEAR,0,0\r
+KHUI_ACTION_HELP_CTX,KHUI_ACTIONTYPE_TRIGGER,,IDB_HELP,0,0,IDB_HELP_SM,0,IDS_ACTION_HELP_CTX,IDS_ACTIONT_HELP_CTX,0,0\r
 KHUI_ACTION_HELP_CONTENTS,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_HELP_CONTENTS,0,0,0\r
 KHUI_ACTION_HELP_INDEX,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_HELP_INDEX,0,0,0\r
 KHUI_ACTION_HELP_ABOUT,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_HELP_ABOUT,0,0,0\r
 KHUI_ACTION_OPEN_APP,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_OPEN_APP,0,0,0\r
 KHUI_ACTION_CLOSE_APP,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_ACTION_CLOSE_APP,0,0,0\r
-KHUI_ACTION_IMPORT,KHUI_ACTIONTYPE_TRIGGER,,IDB_IMPORT,0,IDB_IMPORT_DIS,IDB_IMPORT_SM,IDB_IMPORT_SM_DIS,IDS_ACTION_IMPORT,0,0,0\r
+KHUI_ACTION_IMPORT,KHUI_ACTIONTYPE_TRIGGER,,IDB_IMPORT,0,IDB_IMPORT_DIS,IDB_IMPORT_SM,IDB_IMPORT_SM_DIS,IDS_ACTION_IMPORT,IDS_ACTIONT_IMPORT,0,0\r
 KHUI_PACTION_OK,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_PACTION_OK,0,0,0\r
 KHUI_PACTION_CANCEL,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_PACTION_CANCEL,0,0,0\r
 KHUI_PACTION_CLOSE,KHUI_ACTIONTYPE_TRIGGER,,0,0,0,0,0,IDS_PACTION_CLOSE,0,0,0\r
index e561eb10832e2528e18c1b1a066dbdbf04d880b9..dc553f74089d344f9d7abc01e1e4421f9d7df397 100644 (file)
@@ -367,6 +367,13 @@ typedef struct tag_khui_new_creds {
  */\r
 #define KHUI_NC_RESPONSE_COMPLETED 0x00000020\r
 \r
+/*! \brief Processing\r
+\r
+    This is an internal flag set while the credentials acquisition\r
+    process is executing.\r
+ */\r
+#define KHUI_NC_RESPONSE_PROCESSING 0x00010000\r
+\r
 #define KHUI_NCMASK_RESPONSE (KHUI_NC_RESPONSE_EXIT|KHUI_NC_RESPONSE_NOEXIT)\r
 #define KHUI_NCMASK_RESULT  (KHUI_NC_RESPONSE_SUCCESS|KHUI_NC_RESPONSE_FAILED|KHUI_NC_RESPONSE_PENDING)\r
 /*@}*/\r
index 67d8db33dd9c5d62a2c82db19d1997a0bff57742..de28979257383a354650bd6dd9678378e9e4c1fd 100644 (file)
@@ -46,8 +46,6 @@
 \r
 #include<khremote.h>\r
 \r
-#include<strsafe.h>\r
-\r
 /*! \internal */\r
 KHMEXP void KHMAPI\r
 khm_version_init(void);\r
index c9996b31cd1d59ef368ce76a37476fc2b0ca4799..4d7e8fa7c476f1e235e773dda639165f6d9daa58 100644 (file)
@@ -253,7 +253,7 @@ perf_dump(char * file) {
 #else\r
     f = fopen(file, "w");\r
     if (!f)\r
-       return;\r
+        return;\r
 #endif\r
 \r
     fprintf(f, "Leaked allocations list ....\n");\r