Cygwin: path_conv: decouple pathconv_flags from path_types

There's an unfortunate amalgamation of caller-provided pathconv_arg
flags with path_types flags which in turn are mostly mount flags.

This leads to a confusion of flag values in sylink_info::pflags and,
in turn, in path_conv::path_flags.

This patch decouples pathconv_flags from the other flags by making
sure that a pathconv_flag is never copied into a variable used for
path_types flags.  Also, remove PATH_NO_ACCESS_CHECK since it's
not necessary.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-06 14:29:53 +01:00
parent c90f4c0e27
commit fde4eaa105
2 changed files with 13 additions and 9 deletions

View File

@ -39,6 +39,8 @@ struct suffix_info
extern suffix_info stat_suffixes[];
/* DO NOT copy any of these files into the same set of flags as the
below path_types. Ever. */
enum pathconv_arg
{
PC_SYM_FOLLOW = 0x0001,
@ -76,7 +78,6 @@ enum path_types
PATH_DOS = MOUNT_DOS,
PATH_IHASH = MOUNT_IHASH,
PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK,
PATH_CTTY = 0x00400000, /* could later be used as ctty */
PATH_OPEN = 0x00800000, /* use open semantics */
/* FIXME? PATH_OPEN collides with