X-Recipient: archive-cygwin@delorie.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: <AANLkTima5VbUF2XFvv00ptE1L=9c9BT2hOOM8td4hhUN@mail.gmail.com> <AANLkTinZs2FvqFtYueGR0-Wg5L9veTLaE7+SJa56R-r4@mail.gmail.com> <i5li5e$tse$1@dough.gmane.org> <AANLkTi=Z8dSKa6fWt6m2dKMG8gVnG4LEZuq+QN1Y=Qb6@mail.gmail.com> <AANLkTinHHFQSrqJuzhnLzUKLw321Pe2qc=2mkao2Z5iU@mail.gmail.com> <AANLkTimzCUXnhekxmjDmmgHgw+ocKt-xBh5Ei=HF5QsB@mail.gmail.com> <AANLkTikLOv2xn2RodtrRfgdGnSYYZrMeKyWBfDA67Js1@mail.gmail.com> <AANLkTimBGg8vpw9bFcbzvaieTv5DvOSbK5ytJnpLcVP0@mail.gmail.com> <20100902051251.GB28391@ednor.casa.cgf.cx>
From: Vasya Pupkin <cygwin@bsrealm.net>
Date: Thu, 2 Sep 2010 09:36:29 +0400
Message-ID: <AANLkTi=9BktV42E8P2w3GyjhHb2H7ehMbavqN-q6J6Yk@mail.gmail.com>
Subject: Re: Fwd: Windows File permissions are not being inherited - Cygwin 1.7 - Windows 7
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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
<cgf-use-the-mailinglist-please@cygwin.com> 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

