)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":20,"context_line":"for the existence of those first. In order to be able to restore the"},{"line_number":21,"context_line":"original list in any case we store an \"initial list\" as a backup of the"},{"line_number":22,"context_line":"search list before we modify it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Icaffbfa6b2e8efa2bd24a05537cb74b15f4fed96"},{"line_number":25,"context_line":"Signed-off-by: Heiko Hund \u003cheiko@ist.eigentlich.net\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"0e9bde67_521ea38a","line":23,"updated":"2025-03-09 15:21:04.000000000","message":"please reference the github issue about WMIC no longer working on Win11\n\nGithub: OpenVPN/openvpn#642","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":20,"context_line":"for the existence of those first. In order to be able to restore the"},{"line_number":21,"context_line":"original list in any case we store an \"initial list\" as a backup of the"},{"line_number":22,"context_line":"search list before we modify it."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Icaffbfa6b2e8efa2bd24a05537cb74b15f4fed96"},{"line_number":25,"context_line":"Signed-off-by: Heiko Hund \u003cheiko@ist.eigentlich.net\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"7e7bfac6_b367e51d","line":23,"in_reply_to":"0e9bde67_521ea38a","updated":"2025-03-12 04:05:06.000000000","message":"Done","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"71338223df3f62cbfc0df99dc0a839dda2dd4af9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"83a4327c_fc96d365","updated":"2024-12-09 12:44:33.000000000","message":"\"Now this works as well in netsh mode with the interactive service.\"\n\nBy \"netsh mode\" you mean \"--ip-win32 netsh\" which is set for DCO? I would probably write \"for non-DHCP drivers\", or just \"ovpn-dco\". I think --ip-win32 is a bit obscure option.","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"9d158cffed968b9dbd22adf29356c94e84ef409d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8b19e765_5d566638","updated":"2024-12-13 16:33:40.000000000","message":"Please fix uncrustify error","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"6058d964f5139fc72bd95d50acd35d22d85adda0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"50c3f147_7e60473b","updated":"2024-12-23 15:23:21.000000000","message":"Is domain-specific SearchList supposed to be cleared on disconnect? It does not, and when we connect next time without server pushing search domains, old values are still there.","commit_id":"98c9f58c3ec0a0a1b9ba54f0b69a2e9d67cff10a"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"b6aaa638ba989a3a81604562a157ff766da9bb00","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"5dfa0f0d_7571d329","updated":"2025-01-13 08:53:31.000000000","message":"A \".\" is not mandatory in a search domain (as Lev tested), and if our aim is \"is this only whitespace or something else?\" maybe we should check for \"is this only whitespace\" instead.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"ed64e3ea55e970f12b2e973e030405373825b72f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"b79cf0a1_88dfe487","updated":"2025-01-20 11:54:20.000000000","message":"Looks good and does what it says. I tested that pushed search domains are indeed applied and Windows uses them for DNS lookup and than existing search domains are preserved and restored after disconnect.\n\nHowever this warning is still triggered for search-domains: \n\nMon Jan 20 13:52:28 2025 Some --dhcp-option or --dns options require DHCP server, which is not supported by the selected ovpn-dco driver. They will be ignored.\n\nLet\u0027s get rid of it buy not setting the flag in tuntap_options_copy_dns(),","commit_id":"a147bdf91873d99cb40a5ba9aa3f17901acd3bee"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"798a3eea1cb33f3064f5c8373948f05c7209c190","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"e59ee1fe_a2f4b525","updated":"2025-03-05 11:35:24.000000000","message":"Looks good, but DHCP warning is still there.","commit_id":"19e942a6b059bf4718524733265eee538e192cff"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"332a3a8ed16a0a7a850a31623e15646a4f23a571","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"f871ea33_520b93c9","in_reply_to":"e59ee1fe_a2f4b525","updated":"2025-03-06 13:11:18.000000000","message":"The warning is gone after #240, where the code copying --dns values is removed","commit_id":"19e942a6b059bf4718524733265eee538e192cff"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"fca4f51e634fe88456e79b1baaa5d41fd203794f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"4e3fde4b_4ce267f9","in_reply_to":"f871ea33_520b93c9","updated":"2025-03-06 13:12:02.000000000","message":"sorry #840 ;-)","commit_id":"19e942a6b059bf4718524733265eee538e192cff"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"f0f89f4ea575a6d0e950242a522ca78bf8f05a3d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"7a6aa8c9_f5cd4805","updated":"2025-03-09 11:15:14.000000000","message":"Agreed that warning will be removed later. Apart from that, code looks good and does what it says.","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"e928c929_402eb722","updated":"2025-03-09 15:21:04.000000000","message":"a couple of very minor nits, but there\u0027s one thing I consider important enough to clarify before applying.","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0d8c81453d974e0ae9b4a2948ea0a5f0ff3e1eeb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"21bdc669_3c42ef95","updated":"2025-03-12 09:21:48.000000000","message":"There\u0027s still a partly unresolved discussion and it needs to be tested what happens with multiple concurrent VPNs modifying the global search list - but for all normal cases this should work fine.  I\u0027m moving forward, and we can fix this particular corner case later if it turns out to be problematic.","commit_id":"354ee71fe6bcb6b00a727098653c29356d31b280"}],"src/openvpn/tun.c":[{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"9da3b09dd2913b526009ff6d304f42f70be5ccf6","unresolved":true,"context_lines":[{"line_number":229,"context_line":"        {"},{"line_number":230,"context_line":"            dns.domains[dstlen++] \u003d \u0027,\u0027;"},{"line_number":231,"context_line":"        }"},{"line_number":232,"context_line":"        strncpynt(dns.domains + dstlen, o-\u003edomain_search_list[i], srclen);"},{"line_number":233,"context_line":"    }"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    msg(D_LOW, \"%s DNS domains on \u0027%s\u0027 (if_index \u003d %d) using service\","}],"source_content_type":"text/x-csrc","patch_set":3,"id":"0f9f3597_7d564171","line":232,"updated":"2024-12-17 10:10:54.000000000","message":"Hm, this doesn\u0027t appear to work.\n\n  PUSH: Received control message: \u0027PUSH_REPLY,dns search-domains lol1 lol2,\n  \nIn this case srclen is 4, but strncpynt copies first 3 chars and then adds \\0. Shall we use just strncpy?","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"61369fa05fa93b24f3dd1d45904280c08f044a5f","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        {"},{"line_number":230,"context_line":"            dns.domains[dstlen++] \u003d \u0027,\u0027;"},{"line_number":231,"context_line":"        }"},{"line_number":232,"context_line":"        strncpynt(dns.domains + dstlen, o-\u003edomain_search_list[i], srclen);"},{"line_number":233,"context_line":"    }"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"    msg(D_LOW, \"%s DNS domains on \u0027%s\u0027 (if_index \u003d %d) using service\","}],"source_content_type":"text/x-csrc","patch_set":3,"id":"44d589a3_55773eae","line":232,"in_reply_to":"0f9f3597_7d564171","updated":"2024-12-21 22:40:34.000000000","message":"Yeah, in this case it\u0027s better since remaining buffer is checked before to fit the terminating zero. strcpy would work as well, but usually raises an eyebrow with tools. So, adding the missing srclen + 1 for strncpy for the actual fix.","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"9d158cffed968b9dbd22adf29356c94e84ef409d","unresolved":true,"context_lines":[{"line_number":1742,"context_line":"    argv_free(\u0026argv);"},{"line_number":1743,"context_line":"    gc_free(\u0026gc);"},{"line_number":1744,"context_line":"#endif /* if defined(TARGET_LINUX) */"},{"line_number":1745,"context_line":"    /* Empty for _WIN32 and all other unixoid platforms */"},{"line_number":1746,"context_line":"}"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"static void"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"b621b398_0802bd0d","line":1745,"updated":"2024-12-13 16:33:40.000000000","message":"Spurious change that cause uncrustify errors","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"61369fa05fa93b24f3dd1d45904280c08f044a5f","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"    argv_free(\u0026argv);"},{"line_number":1743,"context_line":"    gc_free(\u0026gc);"},{"line_number":1744,"context_line":"#endif /* if defined(TARGET_LINUX) */"},{"line_number":1745,"context_line":"    /* Empty for _WIN32 and all other unixoid platforms */"},{"line_number":1746,"context_line":"}"},{"line_number":1747,"context_line":""},{"line_number":1748,"context_line":"static void"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"d469bffe_01c87c06","line":1745,"in_reply_to":"b621b398_0802bd0d","updated":"2024-12-21 22:40:34.000000000","message":"Acknowledged","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"9d158cffed968b9dbd22adf29356c94e84ef409d","unresolved":true,"context_lines":[{"line_number":1768,"context_line":"    argv_free(\u0026argv);"},{"line_number":1769,"context_line":"    gc_free(\u0026gc);"},{"line_number":1770,"context_line":"#endif /* if defined(TARGET_LINUX) */"},{"line_number":1771,"context_line":"    /* Empty for _WIN32 and all other unixoid platforms */"},{"line_number":1772,"context_line":"}"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"void"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"efa0cc81_d7b34f57","line":1771,"updated":"2024-12-13 16:33:40.000000000","message":"Spurious change that causes uncrustify errors","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"61369fa05fa93b24f3dd1d45904280c08f044a5f","unresolved":false,"context_lines":[{"line_number":1768,"context_line":"    argv_free(\u0026argv);"},{"line_number":1769,"context_line":"    gc_free(\u0026gc);"},{"line_number":1770,"context_line":"#endif /* if defined(TARGET_LINUX) */"},{"line_number":1771,"context_line":"    /* Empty for _WIN32 and all other unixoid platforms */"},{"line_number":1772,"context_line":"}"},{"line_number":1773,"context_line":""},{"line_number":1774,"context_line":"void"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"64d0080e_818b319f","line":1771,"in_reply_to":"efa0cc81_d7b34f57","updated":"2024-12-21 22:40:34.000000000","message":"Acknowledged","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"0555197b7ff0e20ceaecbc0cfcb316662a7586a6","unresolved":true,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    /* interface name is required */"},{"line_number":208,"context_line":"    strncpynt(dns.iface.name, tt-\u003eactual_name, sizeof(dns.iface.name));"},{"line_number":209,"context_line":"    dns.iface.name[sizeof(dns.iface.name) - 1] \u003d \u0027\\0\u0027;"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    /* only use domain when there are no search domains */"},{"line_number":212,"context_line":"    if (o-\u003edomain \u0026\u0026 !o-\u003edomain_search_list[0])"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"44146ab4_84c71d5b","line":209,"updated":"2024-12-23 12:02:11.000000000","message":"strncpynt already takes care of this.","commit_id":"98c9f58c3ec0a0a1b9ba54f0b69a2e9d67cff10a"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"177253907e1bdbfc2830a9a607b18a506e54e8e7","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    /* interface name is required */"},{"line_number":208,"context_line":"    strncpynt(dns.iface.name, tt-\u003eactual_name, sizeof(dns.iface.name));"},{"line_number":209,"context_line":"    dns.iface.name[sizeof(dns.iface.name) - 1] \u003d \u0027\\0\u0027;"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    /* only use domain when there are no search domains */"},{"line_number":212,"context_line":"    if (o-\u003edomain \u0026\u0026 !o-\u003edomain_search_list[0])"}],"source_content_type":"text/x-csrc","patch_set":5,"id":"88e1e941_249de986","line":209,"in_reply_to":"44146ab4_84c71d5b","updated":"2024-12-23 16:38:08.000000000","message":"Acknowledged","commit_id":"98c9f58c3ec0a0a1b9ba54f0b69a2e9d67cff10a"}],"src/openvpnserv/interactive.c":[{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"84adf82e3b89f867d24ca1a6e1a47520cebbfd01","unresolved":true,"context_lines":[{"line_number":1299,"context_line":"    res \u003d TRUE;"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"out:"},{"line_number":1302,"context_line":"    CloseServiceHandle(dnssvc);"},{"line_number":1303,"context_line":"    CloseServiceHandle(scm);"},{"line_number":1304,"context_line":"    return res;"},{"line_number":1305,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"21f75f54_201cbbb0","line":1302,"updated":"2024-12-09 12:28:28.000000000","message":"SAL: \n\nWarning\tC6387\t\u0027dnssvc\u0027 could be \u00270\u0027.\topenvpn\tC:\\Users\\lev\\Projects\\openvpn-build\\src\\openvpn\\src\\openvpnserv\\interactive.c\t1302\t\n\nsame on the following line. Add a NULL check?","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"66c96102e89c72569e02411d17be98fe4d25f509","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"    res \u003d TRUE;"},{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":"out:"},{"line_number":1302,"context_line":"    CloseServiceHandle(dnssvc);"},{"line_number":1303,"context_line":"    CloseServiceHandle(scm);"},{"line_number":1304,"context_line":"    return res;"},{"line_number":1305,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"df2d8e6a_fc1974ba","line":1302,"in_reply_to":"21f75f54_201cbbb0","updated":"2024-12-12 07:51:19.000000000","message":"Done","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"84adf82e3b89f867d24ca1a6e1a47520cebbfd01","unresolved":true,"context_lines":[{"line_number":1581,"context_line":"        wcsncpy(list, domains, wcslen(domains) + 1);"},{"line_number":1582,"context_line":"    }"},{"line_number":1583,"context_line":""},{"line_number":1584,"context_line":"    size \u003d (wcslen(list) + 1) * sizeof(list[0]);"},{"line_number":1585,"context_line":"    err \u003d RegSetValueExW(key, L\"SearchList\", 0, REG_SZ, (PBYTE)list, size);"},{"line_number":1586,"context_line":"    if (err)"},{"line_number":1587,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"d64294ff_24966968","line":1584,"updated":"2024-12-09 12:28:28.000000000","message":"I got a SAL warning:\n\nWarning\tC6053\tThe prior call to \u0027wcsncpy\u0027 might not zero-terminate string \u0027list\u0027.\topenvpn\tC:\\Users\\lev\\Projects\\openvpn-build\\src\\openvpn\\src\\openvpnserv\\interactive.c\t1584\t\n\nI think on line 1581 we have +1 to copy NULL terminator from domains, so this is not an issue? Should we also initialize list with {0} to make SAL happy?","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"66c96102e89c72569e02411d17be98fe4d25f509","unresolved":false,"context_lines":[{"line_number":1581,"context_line":"        wcsncpy(list, domains, wcslen(domains) + 1);"},{"line_number":1582,"context_line":"    }"},{"line_number":1583,"context_line":""},{"line_number":1584,"context_line":"    size \u003d (wcslen(list) + 1) * sizeof(list[0]);"},{"line_number":1585,"context_line":"    err \u003d RegSetValueExW(key, L\"SearchList\", 0, REG_SZ, (PBYTE)list, size);"},{"line_number":1586,"context_line":"    if (err)"},{"line_number":1587,"context_line":"    {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"848dd16c_3cd12015","line":1584,"in_reply_to":"d64294ff_24966968","updated":"2024-12-12 07:51:19.000000000","message":"The actual check is in line 1572 where we make sure there is enough room in the buffer to append the domains including the NUL at the end (+2, one for the comma, the other one for \\0)\n\nwcsncpy() pads the source string wit 0 if count is greater than the len of the source string, so domlen + 1 will do the trick.\n\nI think it is indeed a false positive and wonder what triggers it. Let\u0027s try to init list with zeros and if that defeats the diagnostic, good enough, but it is not necessary.","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"84adf82e3b89f867d24ca1a6e1a47520cebbfd01","unresolved":true,"context_lines":[{"line_number":1645,"context_line":" * @param  domains  domain suffixes to remove as comma separated string"},{"line_number":1646,"context_line":" */"},{"line_number":1647,"context_line":"static void"},{"line_number":1648,"context_line":"RemoveDnsSearchDomains(HKEY key, PCWSTR domains)"},{"line_number":1649,"context_line":"{"},{"line_number":1650,"context_line":"    LSTATUS err;"},{"line_number":1651,"context_line":"    WCHAR list[4096];"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"e58e3f80_84b5ad3c","line":1648,"updated":"2024-12-09 12:28:28.000000000","message":"SAL warning:\n\nWarning\tC6262\tFunction uses \u002716432\u0027 bytes of stack.  Consider moving some data to heap.\topenvpn\tC:\\Users\\lev\\Projects\\openvpn-build\\src\\openvpn\\src\\openvpnserv\\interactive.c\t1648\t\n\nIs 4096 a random \"large enough\" value? Can we make it, say, 2048 to make SAL happy?","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"66c96102e89c72569e02411d17be98fe4d25f509","unresolved":false,"context_lines":[{"line_number":1645,"context_line":" * @param  domains  domain suffixes to remove as comma separated string"},{"line_number":1646,"context_line":" */"},{"line_number":1647,"context_line":"static void"},{"line_number":1648,"context_line":"RemoveDnsSearchDomains(HKEY key, PCWSTR domains)"},{"line_number":1649,"context_line":"{"},{"line_number":1650,"context_line":"    LSTATUS err;"},{"line_number":1651,"context_line":"    WCHAR list[4096];"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"ffa63cf0_730a2c02","line":1648,"in_reply_to":"e58e3f80_84b5ad3c","updated":"2024-12-12 07:51:19.000000000","message":"Yeah, let\u0027s go with 2k and see where we land. Usually this should not be an issue I think as there are normally not so many search domains set. There _is_ no correct value here, unless you re(allocate) from the heap to make sure the local maximum is handled.","commit_id":"223e288243e136cdbbe2e156228c1c991e912ad3"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"9d158cffed968b9dbd22adf29356c94e84ef409d","unresolved":true,"context_lines":[{"line_number":1330,"context_line":"    err \u003d InterfaceLuid(itf_name, \u0026luid);"},{"line_number":1331,"context_line":"    if (err)"},{"line_number":1332,"context_line":"    {"},{"line_number":1333,"context_line":"        MsgToEventLog(M_ERR, L\"InterfaceIdString: \""},{"line_number":1334,"context_line":"                      \"failed to convert itf alias \u0027%s\u0027\", itf_name);"},{"line_number":1335,"context_line":"        goto out;"},{"line_number":1336,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"0d1c989c_d836d102","line":1333,"updated":"2024-12-13 16:33:40.000000000","message":"Why `L\"\"` here and not `TEXT()`?","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"61369fa05fa93b24f3dd1d45904280c08f044a5f","unresolved":false,"context_lines":[{"line_number":1330,"context_line":"    err \u003d InterfaceLuid(itf_name, \u0026luid);"},{"line_number":1331,"context_line":"    if (err)"},{"line_number":1332,"context_line":"    {"},{"line_number":1333,"context_line":"        MsgToEventLog(M_ERR, L\"InterfaceIdString: \""},{"line_number":1334,"context_line":"                      \"failed to convert itf alias \u0027%s\u0027\", itf_name);"},{"line_number":1335,"context_line":"        goto out;"},{"line_number":1336,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"7cee0941_deaae7b2","line":1333,"in_reply_to":"0d1c989c_d836d102","updated":"2024-12-21 22:40:34.000000000","message":"TEXT() expands to L\"\" when UNICODE is defined, but will change for consistency anyway. There\u0027s another one at #766, but unrelated to this changeset. Will try to remember to ship a followup patch for this later.","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"9da3b09dd2913b526009ff6d304f42f70be5ccf6","unresolved":true,"context_lines":[{"line_number":2299,"context_line":"                    DeleteDNS(AF_INET6, item-\u003edata);"},{"line_number":2300,"context_line":"                    break;"},{"line_number":2301,"context_line":""},{"line_number":2302,"context_line":"                    break;"},{"line_number":2303,"context_line":""},{"line_number":2304,"context_line":"                case undo_domains:"},{"line_number":2305,"context_line":"                    UndoDnsSearchDomains(item-\u003edata);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"2b842d94_2e39b8fd","line":2302,"updated":"2024-12-17 10:10:54.000000000","message":"extra \"break\"","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"61369fa05fa93b24f3dd1d45904280c08f044a5f","unresolved":false,"context_lines":[{"line_number":2299,"context_line":"                    DeleteDNS(AF_INET6, item-\u003edata);"},{"line_number":2300,"context_line":"                    break;"},{"line_number":2301,"context_line":""},{"line_number":2302,"context_line":"                    break;"},{"line_number":2303,"context_line":""},{"line_number":2304,"context_line":"                case undo_domains:"},{"line_number":2305,"context_line":"                    UndoDnsSearchDomains(item-\u003edata);"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"da696840_4fc75d6d","line":2302,"in_reply_to":"2b842d94_2e39b8fd","updated":"2024-12-21 22:40:34.000000000","message":"Acknowledged","commit_id":"178a82aa5547c87a2f9d5c243322fd6a715f4187"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"b51be4eef84a22c27c819ceab9f7b7f12d61f130","unresolved":true,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"d44ab783_f4f83bba","line":1390,"updated":"2024-12-26 12:54:27.000000000","message":"Are you sure about the dot? For instance, \"xxx\" appears to be a perfectly valid value for Windows. In this case (SearchList here HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters is set to \"xxx\") this takes precedence over adapter-specific search list. This means that VPN pushed search domains do not work, because we assume that global search list is not valid and add search domains to adapter.\n\nMoreover, is something like \".xxx\" even valid? With SearchList like \"xxx,aaa,bbb\" and \"ping test\" I see outgoing DNS requests to test.xxx, test.aaa and test.bbb. With \".xxx,.aaa,.bbb\" no DNS requests are sent.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"17d5c4e4b7fe344d61f91045bbd79a3056f8a60d","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"4d921f1e_b329741b","line":1390,"in_reply_to":"264e0111_0a8024ee","updated":"2024-12-31 10:16:02.000000000","message":"I used powershell command to edit search list, for example:\n\n  Set-DnsClientGlobalSetting -SuffixSearchList bbbb\n\nBesides, MSFT documentation provides examples without dot prefix: \n\nhttps://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/configure-domain-suffix-search-list-domain-name-system-clients\n\nSo in my tests dot prefix appears invalid and documentation concurs with it.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"2f2967b8c0efe9d6a483393b656389fd3b7d4036","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"e5fcf618_a2f7fb08","line":1390,"in_reply_to":"4d921f1e_b329741b","updated":"2024-12-31 17:41:45.000000000","message":"Yeah, as I said, you can enter anything, but it will not be used unless it is a valid second level fqdn, which has an embedded dot, e.g. \u0027openvpn.net\u0027 will be used, just \u0027net\u0027 will not be used.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"0d72794cf156e751bfa9e90e8084a4a7e283a010","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"264e0111_0a8024ee","line":1390,"in_reply_to":"d44ab783_f4f83bba","updated":"2024-12-30 23:51:30.000000000","message":"While you can enter pretty much any text as SearchList, the resolver parses the values quite tightly. My tests have shown that invalid domain suffixes are ignored and not added to the runtime config. So, I think while ckecking for a dot in the string does not catch all misconfigurations it serves well to determine if we should try at a certain location at least.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000008,"name":"stipa","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"518312cfe0c77bd594d257c4ceb2298c427e3feb","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"fb7b9b98_a376dd6a","line":1390,"in_reply_to":"e5fcf618_a2f7fb08","updated":"2025-01-02 09:31:12.000000000","message":"I used powershell command to add TLD, not editing registry directly, and this worked. I haven\u0027t seen anywhere saying that TLD is forbidden as search domains, but I have seen those been used in practice. So I don\u0027t really understand why we need to have this restriction and a code for it, instead of just checking if SearchList is empty or not.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"df9274030e278d91fce3aabbbe0a79b622cb8505","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    if (!err || err \u003d\u003d ERROR_MORE_DATA)"},{"line_number":1388,"context_line":"    {"},{"line_number":1389,"context_line":"        data[sizeof(data) - 1] \u003d \u0027\\0\u0027;"},{"line_number":1390,"context_line":"        if (strchr(data, \u0027.\u0027) !\u003d NULL)"},{"line_number":1391,"context_line":"        {"},{"line_number":1392,"context_line":"            return TRUE;"},{"line_number":1393,"context_line":"        }"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"a52622c1_17301bfa","line":1390,"in_reply_to":"fb7b9b98_a376dd6a","updated":"2025-01-13 08:46:23.000000000","message":"An empty list will not be used by the resolver, even if it it contains only whitespace characters. So checking for strlen doesn\u0027t work here. So, the idea was to check for a \u0027.\u0027 to make sure the list _is_ actually used, so we add instead of \"create\". I think this way the detection is sufficiently working.","commit_id":"bb2c5a706965a7081feaa5d205c13dfd9ffbac9e"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1168,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1169,"context_line":" */"},{"line_number":1170,"context_line":"static BOOL"},{"line_number":1171,"context_line":"ApplyGpolSettings32()"},{"line_number":1172,"context_line":"{"},{"line_number":1173,"context_line":"    typedef NTSTATUS (__stdcall *publish_fn_t)("},{"line_number":1174,"context_line":"        DWORD StateNameLo,"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"614ca4f1_082ef8e0","line":1171,"updated":"2025-03-09 15:21:04.000000000","message":"`(void)`","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":1168,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1169,"context_line":" */"},{"line_number":1170,"context_line":"static BOOL"},{"line_number":1171,"context_line":"ApplyGpolSettings32()"},{"line_number":1172,"context_line":"{"},{"line_number":1173,"context_line":"    typedef NTSTATUS (__stdcall *publish_fn_t)("},{"line_number":1174,"context_line":"        DWORD StateNameLo,"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"70916549_d4e0161f","line":1171,"in_reply_to":"614ca4f1_082ef8e0","updated":"2025-03-12 04:05:06.000000000","message":"Done","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1208,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1209,"context_line":" */"},{"line_number":1210,"context_line":"static BOOL"},{"line_number":1211,"context_line":"ApplyGpolSettings64()"},{"line_number":1212,"context_line":"{"},{"line_number":1213,"context_line":"    typedef NTSTATUS (*publish_fn_t)("},{"line_number":1214,"context_line":"        INT64 StateName,"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"15f3c9b6_c46bf981","line":1211,"updated":"2025-03-09 15:21:04.000000000","message":"`(void)`","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":1208,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1209,"context_line":" */"},{"line_number":1210,"context_line":"static BOOL"},{"line_number":1211,"context_line":"ApplyGpolSettings64()"},{"line_number":1212,"context_line":"{"},{"line_number":1213,"context_line":"    typedef NTSTATUS (*publish_fn_t)("},{"line_number":1214,"context_line":"        INT64 StateName,"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"2b36d095_cbfd9faa","line":1211,"in_reply_to":"15f3c9b6_c46bf981","updated":"2025-03-12 04:05:06.000000000","message":"Done","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1245,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1246,"context_line":" */"},{"line_number":1247,"context_line":"static BOOL"},{"line_number":1248,"context_line":"ApplyGpolSettings()"},{"line_number":1249,"context_line":"{"},{"line_number":1250,"context_line":"    SYSTEM_INFO si;"},{"line_number":1251,"context_line":"    GetSystemInfo(\u0026si);"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"31278e47_77ce57be","line":1248,"updated":"2025-03-09 15:21:04.000000000","message":"`(void)`","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":1245,"context_line":" * @return BOOL to indicate if the reload was initiated"},{"line_number":1246,"context_line":" */"},{"line_number":1247,"context_line":"static BOOL"},{"line_number":1248,"context_line":"ApplyGpolSettings()"},{"line_number":1249,"context_line":"{"},{"line_number":1250,"context_line":"    SYSTEM_INFO si;"},{"line_number":1251,"context_line":"    GetSystemInfo(\u0026si);"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"12b0644b_5e2f5cad","line":1248,"in_reply_to":"31278e47_77ce57be","updated":"2025-03-12 04:05:06.000000000","message":"Done","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1606,"context_line":" * Reset the DNS search list to its original value"},{"line_number":1607,"context_line":" *"},{"line_number":1608,"context_line":" * Looks for a \"InitialSearchList\" value as the one to reset to."},{"line_number":1609,"context_line":" * If it doesn\u0027t exists, resets to empty, effectively disabling it."},{"line_number":1610,"context_line":" *"},{"line_number":1611,"context_line":" * @param  key  HKEY of the location in the registry to reset"},{"line_number":1612,"context_line":" *"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"17e52f07_1dd206a9","line":1609,"updated":"2025-03-09 15:21:04.000000000","message":"typo here (\"exists\")","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":1606,"context_line":" * Reset the DNS search list to its original value"},{"line_number":1607,"context_line":" *"},{"line_number":1608,"context_line":" * Looks for a \"InitialSearchList\" value as the one to reset to."},{"line_number":1609,"context_line":" * If it doesn\u0027t exists, resets to empty, effectively disabling it."},{"line_number":1610,"context_line":" *"},{"line_number":1611,"context_line":" * @param  key  HKEY of the location in the registry to reset"},{"line_number":1612,"context_line":" *"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"2dd35100_49932acc","line":1609,"in_reply_to":"17e52f07_1dd206a9","updated":"2025-03-12 04:05:06.000000000","message":"Done","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1628,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"ResetDnsSearchDomains: \""},{"line_number":1629,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1630,"context_line":"        }"},{"line_number":1631,"context_line":"        goto out;"},{"line_number":1632,"context_line":"    }"},{"line_number":1633,"context_line":""},{"line_number":1634,"context_line":"    size \u003d (wcslen(list) + 1) * sizeof(list[0]);"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"94c13555_6c14a07a","line":1631,"updated":"2025-03-09 15:21:04.000000000","message":"my understanding of the code flow is that the `goto out` should be inside the `if (err !\u003d ERROR_FILE_NOT_FOUND)` because otherwise the described behaviour \"if it doesn\u0027t exist \u003d FILE NOT FOUND, reset to empty\" can never be triggered.","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"ResetDnsSearchDomains: \""},{"line_number":1629,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1630,"context_line":"        }"},{"line_number":1631,"context_line":"        goto out;"},{"line_number":1632,"context_line":"    }"},{"line_number":1633,"context_line":""},{"line_number":1634,"context_line":"    size \u003d (wcslen(list) + 1) * sizeof(list[0]);"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"ea2a7802_1d8a8a94","line":1631,"in_reply_to":"94c13555_6c14a07a","updated":"2025-03-12 04:05:06.000000000","message":"Yeah that is intentional. If there was no SearchList, there will be no IninitalSearchList created in the first place.","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0d8c81453d974e0ae9b4a2948ea0a5f0ff3e1eeb","unresolved":false,"context_lines":[{"line_number":1628,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"ResetDnsSearchDomains: \""},{"line_number":1629,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1630,"context_line":"        }"},{"line_number":1631,"context_line":"        goto out;"},{"line_number":1632,"context_line":"    }"},{"line_number":1633,"context_line":""},{"line_number":1634,"context_line":"    size \u003d (wcslen(list) + 1) * sizeof(list[0]);"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"3d28cfaf_6da650d8","line":1631,"in_reply_to":"ea2a7802_1d8a8a94","updated":"2025-03-12 09:21:48.000000000","message":"With the adjusted comment (\"doesn\u0027t reset anything\") the code now matches the comment, so fine with me :-)","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0bc98d34f4542b7e50a67cdef4b0b227cce8d4c1","unresolved":true,"context_lines":[{"line_number":1695,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"RemoveDnsSearchDomains: \""},{"line_number":1696,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1697,"context_line":"            return;"},{"line_number":1698,"context_line":"        }"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"        /* If the search list is back to its initial state reset it */"},{"line_number":1701,"context_line":"        if (wcsncmp(list, initial, wcslen(list)) \u003d\u003d 0)"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"c8ba0a57_5dfb1b78","line":1698,"updated":"2025-03-09 15:21:04.000000000","message":"in this case (\"no InitialSearchList can be found\") this whole function would then fail to do anything, as RegSetValueExW() is skipped.  Is this intentional?","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"0d8c81453d974e0ae9b4a2948ea0a5f0ff3e1eeb","unresolved":true,"context_lines":[{"line_number":1695,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"RemoveDnsSearchDomains: \""},{"line_number":1696,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1697,"context_line":"            return;"},{"line_number":1698,"context_line":"        }"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"        /* If the search list is back to its initial state reset it */"},{"line_number":1701,"context_line":"        if (wcsncmp(list, initial, wcslen(list)) \u003d\u003d 0)"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"3e617702_23668b59","line":1698,"in_reply_to":"6b364f9b_c7efb34c","updated":"2025-03-12 09:21:48.000000000","message":"Indeed, we should never end in this state at all - though I do wonder what happens if there are overlapping VPNs modifying the global search list (both adding to it, and then the first existing and resetting the `InitialSearchList`).  Guess we\u0027ll find out when the first issue gets openened :-)","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"},{"author":{"_account_id":1000006,"name":"d12fk","display_name":"Heiko Hund","email":"heiko@openvpn.net","username":"d12fk"},"change_message_id":"bd071a01ed0cadc7c04f5df5d9f844eddc857f58","unresolved":true,"context_lines":[{"line_number":1695,"context_line":"            MsgToEventLog(M_SYSERR, TEXT(\"RemoveDnsSearchDomains: \""},{"line_number":1696,"context_line":"                                         \"could not get InitialSearchList from registry (%lu)\"), err);"},{"line_number":1697,"context_line":"            return;"},{"line_number":1698,"context_line":"        }"},{"line_number":1699,"context_line":""},{"line_number":1700,"context_line":"        /* If the search list is back to its initial state reset it */"},{"line_number":1701,"context_line":"        if (wcsncmp(list, initial, wcslen(list)) \u003d\u003d 0)"}],"source_content_type":"text/x-csrc","patch_set":12,"id":"6b364f9b_c7efb34c","line":1698,"in_reply_to":"c8ba0a57_5dfb1b78","updated":"2025-03-12 04:05:06.000000000","message":"When we get there something is inconsistent in the registry. The SearchList is not empty, but we do not have a InitialSearchList to compare to. Storing the shorter, but non-empty list is as wrong as leaving it in its current state, as it is not empty, not can it be reset to the original list.\n\nIf you rather have the `return` removed and the next branch turned into an `else if` I can do it, but the SearchList will still be in an undefined state after the modification.","commit_id":"b1252fc9c108a086e99298abf0fc0d032eb903ef"}]}
