Cygwin: path_conv: add PATH_RESOLVE_PROCFD path_types flag
path_conv now sets the PATH_RESOLVE_PROCFD flag in path_flags if the PC_SYM_NOFOLLOW_PROCFD pathconv_arg flag has been set on input *and* the file is actually a proc fd symlink. Add matching path_conv::follow_fd_symlink method for checking and use it in open(2). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -850,7 +850,10 @@ path_conv::check (const char *src, unsigned opt,
|
||||
case virt_fdsymlink:
|
||||
/* Allow open/linkat to do the right thing. */
|
||||
if (opt & PC_SYM_NOFOLLOW_PROCFD)
|
||||
opt &= ~PC_SYM_FOLLOW;
|
||||
{
|
||||
opt &= ~PC_SYM_FOLLOW;
|
||||
sym.path_flags |= PATH_RESOLVE_PROCFD;
|
||||
}
|
||||
/*FALLTHRU*/
|
||||
case virt_symlink:
|
||||
goto is_virtual_symlink;
|
||||
|
Reference in New Issue
Block a user