mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:36:23 +00:00
Allow digits in computer name.
http://www.reactos.org/bugzilla/show_bug.cgi?id=1806#c2 still needs to be checked See issue #1806 for more details. svn path=/trunk/; revision=24243
This commit is contained in:
parent
5d46ef1a26
commit
7bfdc5ceb7
2 changed files with 5 additions and 4 deletions
|
@ -298,7 +298,7 @@ IsValidComputerName (
|
||||||
p = (PWCHAR)lpComputerName;
|
p = (PWCHAR)lpComputerName;
|
||||||
while (*p != 0)
|
while (*p != 0)
|
||||||
{
|
{
|
||||||
if (!(iswctype (*p, _ALPHA || _DIGIT) ||
|
if ((!iswctype (*p, _ALPHA) && !iswctype (*p, _DIGIT)) ||
|
||||||
*p == L'!' ||
|
*p == L'!' ||
|
||||||
*p == L'@' ||
|
*p == L'@' ||
|
||||||
*p == L'#' ||
|
*p == L'#' ||
|
||||||
|
@ -314,7 +314,7 @@ IsValidComputerName (
|
||||||
*p == L'_' ||
|
*p == L'_' ||
|
||||||
*p == L'{' ||
|
*p == L'{' ||
|
||||||
*p == L'}' ||
|
*p == L'}' ||
|
||||||
*p == L'~'))
|
*p == L'~')
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Length++;
|
Length++;
|
||||||
|
|
|
@ -537,7 +537,7 @@ WriteComputerSettings(TCHAR * ComputerName, HWND hwndDlg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to also set DNS hostname */
|
/* Try to also set DNS hostname */
|
||||||
SetComputerNameEx(ComputerNamePhysicalDnsHostname, ComputerName);
|
SetComputerNameEx(ComputerNamePhysicalDnsHostname, ComputerName);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -612,7 +612,8 @@ ComputerPageDlgProc(HWND hwndDlg,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: check computer name for invalid characters */
|
/* No need to check computer name for invalid characters,
|
||||||
|
* SetComputerName() will do it for us */
|
||||||
|
|
||||||
if (!WriteComputerSettings(ComputerName, hwndDlg))
|
if (!WriteComputerSettings(ComputerName, hwndDlg))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue