diff options
author | Christopher Faylor <me@cgf.cx> | 2005-04-04 16:07:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-04-04 16:07:36 +0000 |
commit | 82ae6271bae18731076156c2a52065cfb89d2f53 (patch) | |
tree | b092483febe8b0ab2c23efb0fff5e0eff6d8b9ae | |
parent | 33ef35c8ad861318c14cc9b5908eff5eeeeccfa0 (diff) | |
download | newlib-82ae6271bae18731076156c2a52065cfb89d2f53.zip newlib-82ae6271bae18731076156c2a52065cfb89d2f53.tar.gz newlib-82ae6271bae18731076156c2a52065cfb89d2f53.tar.bz2 |
* path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end
component.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ef477c1..99a2389 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Christopher Faylor <cgf@timesys.com> + + * path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end + component. + 2005-04-04 Corinna Vinschen <corinna@vinschen.de> * 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 688804a..b4bbe56 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; |