From 7124d1c23dd1b8805d17aca83dbe5fc9a41aae81 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 24 Feb 2025 16:35:46 +0100 Subject: [PATCH] Cygwin: fhandler_netdrive: don't enumerate NFS shares on WebDAV server WebDAV resources trigger the code trying to enumerate NFS shares on the server. Disable this by checking for an at-sign as well. Fixes: 8cebbb2b42bf ("Cygwin: fhandler_netdrive::exists: handle WebDAV URLs") Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler/netdrive.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler/netdrive.cc b/winsup/cygwin/fhandler/netdrive.cc index c05a47660..bac62c9b1 100644 --- a/winsup/cygwin/fhandler/netdrive.cc +++ b/winsup/cygwin/fhandler/netdrive.cc @@ -393,8 +393,8 @@ create_thread_and_wait (DIR *dir) /* For shares, use WNet functions. */ /* Try NFS first, if the name contains a dot (i. e., supposedly is a FQDN - as used in NFS server enumeration). */ - if (strchr (dir->__d_dirname, '.')) + as used in NFS server enumeration) but no at-sign. */ + if (strchr (dir->__d_dirname, '.') && !strchr (dir->__d_dirname + 2, '@')) { ndi.provider = WNNC_NET_MS_NFS; ndi.sem = CreateSemaphore (&sec_none_nih, 0, 2, NULL);