delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/02/01:37:19

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: <AANLkTima5VbUF2XFvv00ptE1L=9c9BT2hOOM8td4hhUN AT mail DOT gmail DOT com> <AANLkTinZs2FvqFtYueGR0-Wg5L9veTLaE7+SJa56R-r4 AT mail DOT gmail DOT com> <i5li5e$tse$1 AT dough DOT gmane DOT org> <AANLkTi=Z8dSKa6fWt6m2dKMG8gVnG4LEZuq+QN1Y=Qb6 AT mail DOT gmail DOT com> <AANLkTinHHFQSrqJuzhnLzUKLw321Pe2qc=2mkao2Z5iU AT mail DOT gmail DOT com> <AANLkTimzCUXnhekxmjDmmgHgw+ocKt-xBh5Ei=HF5QsB AT mail DOT gmail DOT com> <AANLkTikLOv2xn2RodtrRfgdGnSYYZrMeKyWBfDA67Js1 AT mail DOT gmail DOT com> <AANLkTimBGg8vpw9bFcbzvaieTv5DvOSbK5ytJnpLcVP0 AT mail DOT gmail DOT com> <20100902051251 DOT GB28391 AT ednor DOT casa DOT cgf DOT cx>
From: Vasya Pupkin <cygwin AT bsrealm DOT 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 AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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
<cgf-use-the-mailinglist-please AT cygwin DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019