* dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.

* security.cc (read_sd): Call `OemToCharA' to make
        `GetFileSecurity' happy on filenames with umlauts.
This commit is contained in:
Corinna Vinschen 2000-05-02 00:25:43 +00:00
parent f8c723b8f8
commit 64dcb07652
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Tue May 2 2:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
* security.cc (read_sd): Call `OemToCharA' to make
`GetFileSecurity' happy on filenames with umlauts.
Wed Apr 26 23:23:23 2000 Christopher Faylor <cgf@cygnus.com>
* path.cc (normalize_win32_path): Don't add a trailing slash when one

View File

@ -1036,6 +1036,7 @@ LoadDLLfunc (GetUserObjectInformationA, GetUserObjectInformationA@20, user32)
LoadDLLfunc (KillTimer, KillTimer@8, user32)
LoadDLLfunc (MessageBoxA, MessageBoxA@16, user32)
LoadDLLfunc (MsgWaitForMultipleObjects, MsgWaitForMultipleObjects@20, user32)
LoadDLLfunc (OemToCharA, OemToCharA@8, user32)
LoadDLLfunc (OemToCharW, OemToCharW@8, user32)
LoadDLLfunc (PeekMessageA, PeekMessageA@20, user32)
LoadDLLfunc (PostMessageA, PostMessageA@16, user32)

View File

@ -398,7 +398,9 @@ read_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, LPDWORD sd_size)
debug_printf("file = %s", file);
DWORD len = 0;
if (! GetFileSecurity (file,
char fbuf[PATH_MAX];
OemToChar(file, fbuf);
if (! GetFileSecurity (fbuf,
OWNER_SECURITY_INFORMATION
| GROUP_SECURITY_INFORMATION
| DACL_SECURITY_INFORMATION,
@ -407,6 +409,7 @@ read_sd(const char *file, PSECURITY_DESCRIPTOR sd_buf, LPDWORD sd_size)
__seterrno ();
return -1;
}
debug_printf("file = %s: len=%d", file, len);
if (len > *sd_size)
{
*sd_size = len;