This is the mail archive of the cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: More console changes
- To: Geoffrey Noer <noer@cygnus.com>
- Subject: Re: More console changes
- From: Corinna Vinschen <corinna.vinschen@cityweb.de>
- Date: Thu, 01 Apr 1999 12:25:16 +0200
- CC: Chris Faylor <cgf@cygnus.com>, cygwin-developers@sourceware.cygnus.com
- References: <19990331230036.A3503@cygnus.com> <19990331214352.A32155@cygnus.com>
Geoffrey Noer wrote:
>
> On Wed, Mar 31, 1999, Chris Faylor wrote:
> >
> > The biggest patch coming that hasn't been committed
> > is Corinna's security patch. I hope that we can have that in within a
> > week, assuming that it is working ok?
> >
> > Has anyone tried Corinna's patch?
>
> Yes. I ran into some problems (subprocesses started in bash without
> additional cygwin options turned on yielded internal Cygwin errors).
> But I've been totally swamped and haven't had time to pursue fixing
> them or getting Corinna to fix them.
>
> In the interest of getting things done, I suggest someone else take
> this over. I've appended the final patch against the current
> development sources.
>
> --
> Geoffrey Noer Email: noer@cygnus.com
> Cygnus Solutions
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