From d955b6cfd8b2377a33659048429cdb62f6bf1d32 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 14 Jun 2010 21:16:41 +0000 Subject: [PATCH] * path.cc (path_conv::check): Return with ENOTDIR if component is a device. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3c7e8d1db..04f36a4fa 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2010-06-14 Corinna Vinschen + + * path.cc (path_conv::check): Return with ENOTDIR if component is a + device. + 2010-06-14 Corinna Vinschen * dlfcn.cc (get_full_path_of_dll): Revert patch from 2010-04-29. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index d5d103d9f..8ea7e97f1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -829,6 +829,11 @@ is_virtual_symlink: if (sym.isdevice) { + if (component) + { + error = ENOTDIR; + return; + } dev.parse (sym.major, sym.minor); dev.setfs (1); dev.mode = sym.mode;