Changeset 25874 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jan 18, 2010 8:54:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGINA/Dialog.cpp
r25864 r25874 126 126 EnableWindow(hwndDomain, FALSE); 127 127 } 128 else 128 else 129 129 { 130 130 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: Domain not found in combo box ...\n")); … … 143 143 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: Warning! FQDN is too long (max 255 bytes), will be truncated!\n")); 144 144 145 if ( l > 0 146 && wcslen(g_Username) > 0 147 && wcsstr(g_Domain, L".") != NULL) /* if we found a dot (.) in the domain name, this has to be a FQDN */ 145 if (wcslen(g_Username) > 0) /* We need a user name that we can use in caes of a FQDN */ 148 146 { 149 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: Domain seems to be a FQDN!\n")); 150 swprintf(szUserFQDN, sizeof(szUserFQDN) / sizeof(wchar_t), L"%s@%s", g_Username, g_Domain); 151 bIsFQDN = TRUE; 147 if (l > 16) /* Domain name is longer than 16 chars, cannot be a NetBIOS name anymore */ 148 { 149 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: Domain seems to be a FQDN (length)!\n")); 150 bIsFQDN = TRUE; 151 } 152 else if ( l > 0 153 && wcsstr(g_Domain, L".") != NULL) /* if we found a dot (.) in the domain name, this has to be a FQDN */ 154 { 155 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: Domain seems to be a FQDN (dot)!\n")); 156 bIsFQDN = TRUE; 157 } 158 159 if (bIsFQDN) 160 { 161 swprintf(szUserFQDN, sizeof(szUserFQDN) / sizeof(wchar_t), L"%s@%s", g_Username, g_Domain); 162 Log(("VBoxGINA::MyWlxLoggedOutSASDlgProc: FQDN user name is now: %s!\n", szUserFQDN)); 163 } 152 164 } 153 165 } … … 158 170 SendMessage(hwndUserId, WM_SETTEXT, 0, (LPARAM)g_Username); 159 171 else 160 SendMessage(hwndUserId, WM_SETTEXT, 0, (LPARAM)szUserFQDN); 172 SendMessage(hwndUserId, WM_SETTEXT, 0, (LPARAM)szUserFQDN); 161 173 } 162 174 if (hwndPassword) … … 218 230 /* we got the credentials, null them out */ 219 231 credentialsReset(); 220 232 221 233 /* confirm the logon dialog, simulating the user pressing "OK" */ 222 234 WPARAM wParam = MAKEWPARAM(IDOK, BN_CLICKED);
Note:
See TracChangeset
for help on using the changeset viewer.