summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/windows/identity/kconfig/api.c48
-rw-r--r--src/windows/identity/kconfig/kconfiginternal.h2
2 files changed, 41 insertions, 9 deletions
diff --git a/src/windows/identity/kconfig/api.c b/src/windows/identity/kconfig/api.c
index 39e72ecf5..41b6ccb11 100644
--- a/src/windows/identity/kconfig/api.c
+++ b/src/windows/identity/kconfig/api.c
@@ -260,7 +260,11 @@ khcint_RegOpenKeyEx(HKEY hkey, LPCWSTR sSubKey, DWORD ulOptions,
goto _cleanup;
}
- if (!(wcsncmp(sk_name, t, cch))) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if (!(wcsnicmp(sk_name, t, cch))) {
/* bingo! ?? */
if (cch < KCONF_MAXCCH_NAME &&
(sk_name[cch] == L'\0' ||
@@ -356,7 +360,11 @@ khcint_RegCreateKeyEx(HKEY hKey,
if (l != ERROR_SUCCESS)
break;
- if (!(wcsncmp(sk_name, t, cch))) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if (!(wcsnicmp(sk_name, t, cch))) {
/* bingo! ?? */
if (sk_name[cch] == L'\0' ||
sk_name[cch] == L'~') {
@@ -594,7 +602,11 @@ khcint_open_space_int(kconf_conf_space * parent,
EnterCriticalSection(&cs_conf_global);
c = TFIRSTCHILD(p);
while(c) {
- if(c->name && !wcscmp(c->name, buf))
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(c->name && !wcsicmp(c->name, buf))
break;
c = LNEXT(c);
@@ -887,7 +899,11 @@ khc_read_string(khm_handle pconf,
if(c->schema && khc_is_schema_handle(conf)) {
for(i=0;i<c->nSchema;i++) {
- if(c->schema[i].type == KC_STRING && !wcscmp(value, c->schema[i].name)) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(c->schema[i].type == KC_STRING && !wcsicmp(value, c->schema[i].name)) {
/* found it */
size_t cbsize = 0;
@@ -1032,7 +1048,11 @@ khc_read_int32(khm_handle pconf, wchar_t * pvalue, khm_int32 * buf) {
if(c->schema && khc_is_schema_handle(conf)) {
for(i=0;i<c->nSchema;i++) {
- if(c->schema[i].type == KC_INT32 && !wcscmp(value, c->schema[i].name)) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(c->schema[i].type == KC_INT32 && !wcsicmp(value, c->schema[i].name)) {
*buf = (khm_int32) c->schema[i].value;
rv = KHM_ERROR_SUCCESS;
goto _exit;
@@ -1151,7 +1171,11 @@ khc_read_int64(khm_handle pconf, wchar_t * pvalue, khm_int64 * buf) {
if(c->schema && khc_is_schema_handle(conf)) {
for(i=0;i<c->nSchema;i++) {
- if(c->schema[i].type == KC_INT64 && !wcscmp(value, c->schema[i].name)) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(c->schema[i].type == KC_INT64 && !wcsicmp(value, c->schema[i].name)) {
*buf = (khm_int64) c->schema[i].value;
rv = KHM_ERROR_SUCCESS;
goto _exit;
@@ -1675,7 +1699,11 @@ khc_get_type(khm_handle conf, wchar_t * value) {
int i;
for(i=0; i<c->nSchema; i++) {
- if(!wcscmp(c->schema[i].name, value)) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(!wcsicmp(c->schema[i].name, value)) {
return c->schema[i].type;
}
}
@@ -1732,7 +1760,11 @@ khc_value_exists(khm_handle conf, wchar_t * value) {
if(c->schema) {
for(i=0; i<c->nSchema; i++) {
- if(!wcscmp(c->schema[i].name, value)) {
+ /* FIX ME - This is not what we intended to do. We want
+ * a case sensitive match but we are running into a problem
+ * because of "HKLM\SOFTWARE" and "HKCU\Software"
+ */
+ if(!wcsicmp(c->schema[i].name, value)) {
rv |= KCONF_FLAG_SCHEMA;
break;
}
diff --git a/src/windows/identity/kconfig/kconfiginternal.h b/src/windows/identity/kconfig/kconfiginternal.h
index 6d5a63cbf..3a23af127 100644
--- a/src/windows/identity/kconfig/kconfiginternal.h
+++ b/src/windows/identity/kconfig/kconfiginternal.h
@@ -89,7 +89,7 @@ extern LONG conf_status;
#define khc_is_config_running() (conf_init && conf_status)
-#define CONFIG_REGPATHW L"Software\\MIT\\NetIDMgr"
+#define CONFIG_REGPATHW L"SOFTWARE\\MIT\\NetIDMgr"
void init_kconf(void);
void exit_kconf(void);