* cygheap.cc (cygheap_user::set_name): Allow to change the user name

if it only differs by case.
This commit is contained in:
Corinna Vinschen
2010-05-31 18:52:02 +00:00
parent 715e56676f
commit 685e55e254
2 changed files with 8 additions and 1 deletions

View File

@@ -446,7 +446,9 @@ cygheap_user::set_name (const char *new_name)
if (allocated)
{
if (strcasematch (new_name, pname))
/* Windows user names are case-insensitive. Here we want the correct
username, though, even if it only differs by case. */
if (!strcmp (new_name, pname))
return;
cfree (pname);
}