]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove the case sensitive comparisions of registry entry
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 30 Nov 2005 16:06:00 +0000 (16:06 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 30 Nov 2005 16:06:00 +0000 (16:06 +0000)
and schema strings.  Microsoft uses HKLM\"SOFTWARE" and
HKCU\"Software".  This means the encoding schema that was
selected does not work and the conflict in case prevents
plugins from being loaded.

Better to enable plugins to work than to allow two realms
that differ only by case on the same platform during the
beta.

ticket: 3253

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

src/windows/identity/kconfig/api.c
src/windows/identity/kconfig/kconfiginternal.h

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