X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=4.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DONT_USE_RAW_EMAIL_IN_BODY,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_CG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20100902051251.GB28391@ednor.casa.cgf.cx> References: <20100902051251 DOT GB28391 AT ednor DOT casa DOT cgf DOT cx> From: Vasya Pupkin Date: Thu, 2 Sep 2010 09:36:29 +0400 Message-ID: Subject: Re: Fwd: Windows File permissions are not being inherited - Cygwin 1.7 - Windows 7 To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Will do as soon as I get this thing to at least compile. Actually, since there is no abstract layer for nt_wfopen(), all calls to this function have to be modified. Alternatively, the function can be modified to ignore perms parameter and alternative version of setup.exe can be compiled then. That is the way I chose, but there is some problem in another file that I cannot fix myself. You can see my previous message about that. Regardless, this is the simple patch: =3D=3D=3D --- filemanip.cc 2010-03-01 18:18:39.000000000 +0300 +++ filemanip.cc.new 2010-09-02 09:33:05.094182900 +0400 @@ -433,8 +433,10 @@ IO_STATUS_BLOCK io; UNICODE_STRING uname; OBJECT_ATTRIBUTES attr; + /* SECURITY_DESCRIPTOR sd; acl_t acl; + */ const char *c; ULONG access, disp; int oflags =3D 0; @@ -489,11 +491,14 @@ PWCHAR wname =3D (PWCHAR) wpath; wname[1] =3D L'?'; RtlInitUnicodeString (&uname, wname); + /* InitializeObjectAttributes (&attr, &uname, OBJ_CASE_INSENSITIVE, NULL, disp =3D=3D FILE_OPEN || perms =3D=3D 0 ? NULL : nt_sec.GetPosixPerms ("", NULL, NULL, perms, sd, acl)); + */ + InitializeObjectAttributes (&attr, &uname, OBJ_CASE_INSENSITIVE, NULL, N= ULL); status =3D NtCreateFile (&h, access | SYNCHRONIZE, &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_VALID_FLAGS, dis= p, FILE_OPEN_FOR_BACKUP_INTENT =3D=3D=3D Instead of commenting code, defines can be used to allow choosing required behaviour at compile time. On Thu, Sep 2, 2010 at 9:12 AM, Christopher Faylor wrote: > On Thu, Sep 02, 2010 at 06:08:37AM +0400, Vasya Pupkin wrote: >>Because I prefer to keep things under control. And I don't think it >>will require a huge amount of work to disable working with permissions >>in setup.exe with command line switch. > > Well, go ahead then. =C2=A0What are you waiting for? =C2=A0Send us a patc= h. > > cgf > > -- > Problem reports: =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/problems.html > FAQ: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http:= //cygwin.com/faq/ > Documentation: =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/docs.html > Unsubscribe info: =C2=A0 =C2=A0 =C2=A0http://cygwin.com/ml/#unsubscribe-s= imple > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple