SMBFS mount's file cannot be made executable
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Dec 10 13:23:36 GMT 2024
On Dec 10 22:10, Takashi Yano wrote:
> On Tue, 10 Dec 2024 14:00:53 +0100
> Corinna Vinschen wrote:
> > diff --git a/winsup/cygwin/local_includes/path.h b/winsup/cygwin/local_includes/path.h
> > index 3dd21d975abf..2a05cf44d40a 100644
> > --- a/winsup/cygwin/local_includes/path.h
> > +++ b/winsup/cygwin/local_includes/path.h
> > @@ -323,7 +323,7 @@ class path_conv
> > }
> > inline POBJECT_ATTRIBUTES init_reopen_attr (OBJECT_ATTRIBUTES &attr, HANDLE h)
> > {
> > - if (has_buggy_reopen ())
> > + if (!h || has_buggy_reopen ())
> > InitializeObjectAttributes (&attr, get_nt_native_path (),
> > objcaseinsensitive (), NULL, NULL)
> > else
> > --
> > 2.47.0
> >
>
> Thanks! Is your patch better than?
> + if (pc.handle ())
> + pc.init_reopen_attr (attr, pc.handle ());
> + else
> + pc.get_object_attr (attr, sec_none_nih);
Well, it fixes the problem once and for all, without having to
add a conditional in multiple places.
Corinna
More information about the Cygwin-patches
mailing list