You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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>
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>
[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>
[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>
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.
[New msys2-runtime version] Cygwin: gen_full_path_at: drop never reached code
msys2/msys2-runtime@f60a070
[New msys2-runtime version] Define _AT_NULL_PATHNAME_ALLOWED
msys2/msys2-runtime@4448cc0
[New msys2-runtime version] Cygwin: use new _AT_NULL_PATHNAME_ALLOWED flag
msys2/msys2-runtime@d66c2dd
[New msys2-runtime version] Cygwin: Fix and streamline AT_EMPTY_PATH handling
msys2/msys2-runtime@763848a
The text was updated successfully, but these errors were encountered: