Mail Archives: cygwin-developers/1999/04/02/02:25:49
Hi Anders,
Following is a new issue with the new Win32 header files. I checked
the Microsoft definitions and Microsoft defines WIN32_STREAM_ID and
cStreamName the same way you have. But the sizes are off according to
Corinna. Any suggestions?
Thanks,
Geoff
On Thu, Apr 01, 1999, Corinna Vinschen wrote:
[...]
> Unfortunately, the new win32 header files are breaking the security features.
> To try this, you may check a call to `chown()' _without_ my patch. You will
> get an error message.
>
> In the meantime I have figured out, that the definition of WIN32_STREAM_ID
> has a negative side effect. The old definition in Windows32/Structures.h was:
>
> typedef struct _WIN32_STREAM_ID {
> DWORD dwStreamId;
> DWORD dwStreamAttributes;
> LARGE_INTEGER Size;
> DWORD dwStreamNameSize;
> WCHAR *cStreamName;
> } WIN32_STREAM_ID;
>
> The new definition in winbase.h defines cStreamName as:
>
> WCHAR cStreamName[ANYSIZE_ARRAY]; // ANYSIZE_ARRAY = 1
>
> In syscalls.cc(chown), the functions `BackupRead()' and `BackupWrite()' are
> used to read the stream headers with the size `sizeof(header) - sizeof(header.cStreamName)'
> which is 20 Bytes :) with the old headers and 22 Bytes :( with the new headers.
>
> After patching this, the new code is nevertheless not able, to write the new
> security descriptor for the new owner with `BackupWrite()' in any case.
> Strange: If I'm logged in as `administrator(500)', writing the owner sid for
> `administrator(500)' or `administrators(544)' is possible, but writing a sid
> for another user (e.g. `admin(1010)' which is member of `administrators(544)', too)
> is impossible.
> This was not the case before the winsup-version with the new windows header files!
> Once again: This error happens in `chown()' _without_ my patches!
>
> Unfortunately, I'm not able, to work on this for at least one week. If somebody else
> would be so kind, to check and, hopefully, patch this, I would be very glad.
>
> Best Regards,
> Corinna
--
Geoffrey Noer Email: noer AT cygnus DOT com
Cygnus Solutions
- Raw text -