* 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

@ -1,3 +1,8 @@
2010-05-31 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_user::set_name): Allow to change the user name
if it only differs by case.
2010-05-26 Corinna Vinschen <corinna@vinschen.de>
* fhandler_registry.cc (multi_wcstombs): New function.

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);
}