delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/12/07/18:14:16

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4B7NEFXJ221626
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4B7NEFXJ221626
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=PI0n5n6J
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40175385842C
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1733613253;
bh=oQLvvwP0WkMQjzYvcecds1uq8VuOc3LnU9zoXtOF7go=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=PI0n5n6J4FuHru2TBUDXK8uobyAi2VujczAPN2LYC6zOa1bnWgI6Nhc3iPgejXdap
VKm0ibFp3F4lPRWztVARVEFtrpFF5Kd0m4Op09sBEkkI1gxiGBOBbAFtA0rz4DdDVA
O9i3aQdZDYRszdE6snXfc1bMLoB4RZwv9CzzRCM8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 653AA3858CDB
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 653AA3858CDB
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1733613224; cv=none;
b=B0VsSJDHKgrVQqZyJPhCeCcr2/cuzXSUM4Qa9sTlClrrYQQ/4jKkeGiIt//W8RslRA+XVRjt9ZqABhWk6L4JgbT6WAISx5CEvKicZ2TNJoLyJ7ZfOuLU15nFHKxj12hShNrmQ/JngUcG9b4oAYP49fXEHc4+dmmIcpsI/Ew+XPU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1733613224; c=relaxed/simple;
bh=tcDPztHXJJM5ccKRyvBJJLRyopPFcmQYmdNYKi+y6UI=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=Zkdpr/Cc2JJX/oVzzg+BpatbcAgIVNKDb1/uUvcoljQePYv0PgoB+2bPR02wtaUsgWdg50sclnU8oSL9xh58JLOkIwouOWslL8zApD5yL9UTGX38mFlA80WMGorzw8wbE1MRvKM+Nu13KoscunBIevZh9nq9PIzDleGZ7WrvKGU=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 653AA3858CDB
Date: Sun, 8 Dec 2024 08:13:38 +0900
To: cygwin AT cygwin DOT com
Subject: Re: SMBFS mount's file cannot be made executable
Message-Id: <20241208081338.e097563889a03619fc467930@nifty.ne.jp>
In-Reply-To: <Zzz7FJim9kIiqjyy@calimero.vinschen.de>
References: <20241112175427 DOT 750ae77a8086594a765862c5 AT nifty DOT ne DOT jp>
<ZzNCXz3o9k40U9zA AT calimero DOT vinschen DOT de>
<20241113181755 DOT 02289e8e8d9af7e19e8f4387 AT nifty DOT ne DOT jp>
<CANV9t=SvYedzG-LmECwdT7kjipOyhgwsZ1yucnTm8mWMnNkJVw AT mail DOT gmail DOT com>
<20241114003740 DOT e573d7ec79d35da76225c9f1 AT nifty DOT ne DOT jp>
<CANV9t=TLh8xD7KBsF-MucZWNjP-L0KE04xUv2-2e=Z5fXTjk=w AT mail DOT gmail DOT com>
<20241114010807 DOT 99f46760b2240d472440c329 AT nifty DOT ne DOT jp>
<20241116002122 DOT 3f4fd325a497eb4261ad80f4 AT nifty DOT ne DOT jp>
<ZztqpBESgcTXcd3d AT calimero DOT vinschen DOT de>
<20241119175806 DOT 321cdb7e65a727a2eb58c8a6 AT nifty DOT ne DOT jp>
<Zzz7FJim9kIiqjyy AT calimero DOT vinschen DOT de>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

This is a multi-part message in MIME format.

--Multipart=_Sun__8_Dec_2024_08_13_38_+0900_AsYZLcTaqjLbIIQV
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Tue, 19 Nov 2024 21:54:44 +0100
Corinna Vinschen wrote:
> On Nov 19 17:58, Takashi Yano via Cygwin wrote:
> > On Mon, 18 Nov 2024 17:26:12 +0100
> > Corinna Vinschen wrote:
> > > We can safely assume that the current user is already authorized on the
> > > SMB server.  So... shouldn't AuthzInitializeResourceManager be
> > > sufficient and the code from class authz_ctx already does what we want?
> > > We may just have to use in in place of calling NtCheckAccess(),
> > > maybe with a tweak or two...
> > 
> > I already tried AuthzInitializeResourceManager(), but the result
> > was the same with current implementation...
> 
> So you tried to call authz_get_user_attribute()?

Yes. But resulted in the same.

> > BTW, I come up with another implementation. This make the things
> > much simpler. What do you think of the patch attached?
> 
> > [...]
> >  int
> >  check_file_access (path_conv &pc, int flags, bool effective)
> >  {
> > @@ -711,10 +618,14 @@ check_file_access (path_conv &pc, int flags, bool effective)
> >      desired |= FILE_EXECUTE;
> >    if (!get_file_sd (pc.handle (), pc, sd, false))
> >      {
> > -      /* Tweak Samba security descriptor as necessary. */
> > -      if (pc.fs_is_samba ())
> > -	convert_samba_sd (sd);
> > -      ret = check_access (sd, file_mapping, desired, flags, effective);
> > +      HANDLE h = CreateFileW (pc.get_nt_native_path ()->Buffer, desired,
> > +			      0, NULL, OPEN_EXISTING,
> > +			      FILE_FLAG_BACKUP_SEMANTICS, NULL);
> > +      if (h != INVALID_HANDLE_VALUE)
> > +	{
> > +	  CloseHandle (h);
> > +	  ret = 0;
> > +	}
> >      }
> >    debug_printf ("flags %y, ret %d", flags, ret);
> >    return ret;
> 
> No, we can't do that, it's too simple.
> 
> Just kidding.
> 
> This is so simple, I'm puzzled we never tried that before.  Or, if we
> did, it's a loooong time ago...
> 
> If we really do this, we don't even need to call get_file_sd().  And it
> should use NtOpenFile and reopen semantics i.e.  pc.init_reopen_attr().
> Also, the sharing flags should allow all access.  And the `effective'
> argument needs to be taken into account.

I have a question. What pc.init_reopen_attr() is for? I tested with
pc.get_object_attr() instead, it works. What handle should I pass
to pc.init_reopen_attr()?

Anyway, I revised the patch as attached. What do you think?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

--Multipart=_Sun__8_Dec_2024_08_13_38_+0900_AsYZLcTaqjLbIIQV
Content-Type: text/plain;
 name="0001-Cygwin-access-Correction-for-samba-SMB-share.patch"
Content-Disposition: attachment;
 filename="0001-Cygwin-access-Correction-for-samba-SMB-share.patch"
Content-Transfer-Encoding: base64

RnJvbSA3NzdiZGY3NTUyN2YzNTNhYzgzMzE3YTgyZTM4Nzk0MjA2YmI2ZGQ1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQ0KRnJvbTogVGFrYXNoaSBZYW5vIDx0YWthc2hpLnlhbm9AbmlmdHkubmUu
anA+DQpEYXRlOiBTdW4sIDggRGVjIDIwMjQgMDc6MzQ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zX2lzX3NhbWJhICgpKQ0KLQljb252ZXJ0X3NhbWJh
X3NkIChzZCk7DQotICAgICAgcmV0ID0gY2hlY2tfYWNjZXNzIChzZCwgZmlsZV9tYXBwaW5nLCBk
ZXNpcmVkLCBmbGFncywgZWZmZWN0aXZlKTsNCisgICAgICBOdENsb3NlIChoKTsNCisgICAgICBy
ZXQgPSAwOw0KKyAgICB9DQorICBpZiAoIWVmZmVjdGl2ZSAmJiBjeWdoZWFwLT51c2VyLmlzc2V0
dWlkICgpKQ0KKyAgICB7DQorICAgICAgLyogUmVjb3ZlciBpbXBlcnNvbmF0aW9uIHRva2VuICov
DQorICAgICAgSEFORExFIHRvayA9IGN5Z2hlYXAtPnVzZXIuaW1wX3Rva2VuICgpID86IGhQcm9j
SW1wVG9rZW47DQorICAgICAgc3RhdHVzID0gTnRTZXRJbmZvcm1hdGlvblRocmVhZCAoR2V0Q3Vy
cmVudFRocmVhZCAoKSwNCisJCQkJICAgICAgIFRocmVhZEltcGVyc29uYXRpb25Ub2tlbiwNCisJ
CQkJICAgICAgICZ0b2ssIHNpemVvZiAodG9rKSk7DQorICAgICAgaWYgKCFOVF9TVUNDRVNTIChz
dGF0dXMpKQ0KKwlkZWJ1Z19wcmludGYoIk50U2V0SW5mb3JtYXRpb25UaHJlYWQoKSBmb3IgcmVj
b3ZlcmluZyAiDQorCQkgICAgICJpbXBlcnNvbmF0aW9uIHRva2VuIGZhaWxlZDogJXkiLCBzdGF0
dXMpOw0KICAgICB9DQogICBkZWJ1Z19wcmludGYgKCJmbGFncyAleSwgcmV0ICVkIiwgZmxhZ3Ms
IHJldCk7DQogICByZXR1cm4gcmV0Ow0KLS0gDQoyLjQ1LjENCg0K

--Multipart=_Sun__8_Dec_2024_08_13_38_+0900_AsYZLcTaqjLbIIQV
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

--Multipart=_Sun__8_Dec_2024_08_13_38_+0900_AsYZLcTaqjLbIIQV--

- Raw text -


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