Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New msys2-runtime version] 4 new items #4547

Closed
github-actions bot opened this issue Aug 9, 2023 · 1 comment
Closed

[New msys2-runtime version] 4 new items #4547

github-actions bot opened this issue Aug 9, 2023 · 1 comment

Comments

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

[New msys2-runtime version] Cygwin: gen_full_path_at: drop never reached code

Cygwin: gen_full_path_at: drop never reached code

The check if the local variable p is NULL is useless.  The preceeding
code always sets p to a valid pointer, or it crashes if path_ret is
invalid (which would be a bug in Cygwin).

Fixes:c57b57e5c43a ("* cygwin.din: Sort.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

msys2/msys2-runtime@f60a070

[New msys2-runtime version] Define _AT_NULL_PATHNAME_ALLOWED

Define _AT_NULL_PATHNAME_ALLOWED

Cygwin needs an internal flag to allow specifying an empty pathname
in utimesat (GLIBC extension). We define it in _default_fcntl.h to
make sure we never introduce a value collision accidentally.
While at it, define the values as 16 bit hex values.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

msys2/msys2-runtime@4448cc0

[New msys2-runtime version] Cygwin: use new _AT_NULL_PATHNAME_ALLOWED flag

Cygwin: use new _AT_NULL_PATHNAME_ALLOWED flag

Convert gen_full_path_at to take flag values from the caller, rather
than just a bool indicating that empty paths are allowed.  This is in
preparation of a better AT_EMPTY_PATH handling in a followup patch.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

msys2/msys2-runtime@d66c2dd

[New msys2-runtime version] Cygwin: Fix and streamline AT_EMPTY_PATH handling

Cygwin: Fix and streamline AT_EMPTY_PATH handling

The GLIBC extension AT_EMPTY_PATH allows the functions fchownat
and fstatat to operate on dirfd alone, if the given pathname is an
empty string.  This also allows to operate on any file type, not
only directories.

Commit fa84aa4dd2fb4 broke this.  It only allows dirfd to be a
directory in calls to these two functions.

Fix that by handling AT_EMPTY_PATH right in gen_full_path_at.
A valid dirfd and an empty pathname is now a valid combination
and, noticably, this returns a valid path in path_ret.  That
in turn allows to remove the additional path generation code
from the callers.

Fixes: fa84aa4dd2fb ("Cygwin: fix errno values set by readlinkat")
Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

msys2/msys2-runtime@763848a

@dscho
Copy link
Member

dscho commented Aug 9, 2023

Since we have a working fix, and the equivalent patch series in git-for-windows/msys2-runtime#56 (which I'm not yet sure we need to take early, I opened that PR basically to convince myself that it fixes the tar xf problem), I'll just go ahead and close this here ticket as "won't fix". We'll benefit from the patches once we upgrade to a newer Cygwin or MSYS2 runtime, anyway. No need to rush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant