!_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
\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
\r
/* $Id$ */\r
\r
+#include<shlwapi.h>\r
#include<kconfiginternal.h>\r
#include<assert.h>\r
\r
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
/* 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
\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
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
\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
}\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
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
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
}\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
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
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
}\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
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
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
\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
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
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
\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
\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
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
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
}\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
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
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
\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
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
}\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
}\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
}\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
}\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
}\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
}\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
}\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
}\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
}\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
}\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
/*! \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
\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
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
\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
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
\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
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
*/\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
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
*/\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
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
*/\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
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
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
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
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
*/\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
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
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
\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
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
*/\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
#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
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
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
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
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
\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
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
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
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
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
\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
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
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
#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
#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
$(DLLFILE): $(OBJFILES) $(RESFILES)
$(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
$(_VC_MANIFEST_EMBED_DLL)
+ $(_VC_MANIFEST_CLEAN)
all: mkdirs $(DLLFILE)
$(DLLFILE): $(OBJFILES) $(VERRESFILE) $(MSGRESFILE)
$(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
$(_VC_MANIFEST_EMBED_DLL)
+ $(_VC_MANIFEST_CLEAN)
all: mkdirs $(MSGRESFILE) $(DLLFILE) lang
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
\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
#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
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
\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
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
$(DLLFILE): $(OBJFILES) $(VERRESFILE)
$(DLLGUILINK) $(MSGRESFILE) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
$(_VC_MANIFEST_EMBED_DLL)
+ $(_VC_MANIFEST_CLEAN)
$(MSGRESFILE): $(OBJ)\krb5_msgs.rc
#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
/* $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 {
\r
/* $Id$ */\r
\r
-#define STRSAFE_NO_DEPRECATE\r
-\r
#include<krbcred.h>\r
#include<krb5.h>\r
#include<assert.h>\r
\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
#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
\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
\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
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
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
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
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
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
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
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
}\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
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
#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
#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
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
$(EXEFILE): $(OBJFILES) $(RESFILES) $(LIBFILES)
$(EXEGUILINK) $(SDKLIBFILES) $(SCLIB)
$(_VC_MANIFEST_EMBED_EXE) $(MANIFESTFILE)
+ $(_VC_MANIFEST_CLEAN)
all: mkdirs $(MANIFESTFILE) $(EXEFILE)
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
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
case WM_COMMAND:\r
switch(wParam) {\r
case MAKEWPARAM(IDCANCEL, BN_CLICKED):\r
+ khm_leave_modal();\r
DestroyWindow(hwnd);\r
break;\r
\r
\r
case MAKEWPARAM(IDOK, BN_CLICKED):\r
cfgui_apply_settings(NULL);\r
+ khm_leave_modal();\r
DestroyWindow(hwnd);\r
break;\r
}\r
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
}\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
}\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
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
\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
#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
\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
\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
TBSTYLE_FLAT |\r
TBSTYLE_AUTOSIZE | \r
TBSTYLE_LIST |\r
+ TBSTYLE_TOOLTIPS |\r
CCS_NORESIZE | \r
CCS_NOPARENTALIGN |\r
CCS_ADJUSTABLE |\r
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
*/\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
\r
#include<khremote.h>\r
\r
-#include<strsafe.h>\r
-\r
/*! \internal */\r
KHMEXP void KHMAPI\r
khm_version_init(void);\r
#else\r
f = fopen(file, "w");\r
if (!f)\r
- return;\r
+ return;\r
#endif\r
\r
fprintf(f, "Leaked allocations list ....\n");\r