From 82ae6271bae18731076156c2a52065cfb89d2f53 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 4 Apr 2005 16:07:36 +0000 Subject: [PATCH] * path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end component. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ef477c1e3..99a23892c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Christopher Faylor + + * path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end + component. + 2005-04-04 Corinna Vinschen * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges on 9x. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 688804a07..b4bbe5681 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -556,7 +556,6 @@ path_conv::check (const char *src, unsigned opt, error = 0; else if ((error = check_null_empty_str (src))) return; - unsigned pflags_or = (opt & PC_NO_ACCESS_CHECK); /* This loop handles symlink expansion. */ for (;;) { @@ -588,7 +587,8 @@ path_conv::check (const char *src, unsigned opt, sym.contents[0] = '\0'; int symlen = 0; - for (;;) + + for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0) { const suffix_info *suff; char pathbuf[CYG_MAX_PATH]; @@ -782,7 +782,7 @@ is_virtual_symlink: else break; } - else if (sym.error != ENOENT && sym.error != ENOSHARE) + else if (sym.error && sym.error != ENOENT && sym.error != ENOSHARE) { error = sym.error; goto out;