Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Message-ID: <3703498C.72131F58@cityweb.de> Date: Thu, 01 Apr 1999 12:25:16 +0200 From: Corinna Vinschen X-Mailer: Mozilla 4.51 [en] (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: Geoffrey Noer CC: Chris Faylor , cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: More console changes References: <19990331230036 DOT A3503 AT cygnus DOT com> <19990331214352 DOT A32155 AT cygnus DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 AT cygnus DOT 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